Let’s Get It Started:
Prerequisites:
- INTERFACES(5) – /etc/network/interfaces – network interface configuration for ifup and ifdown
$ cat /etc/network/interfaces.d/wlan0
iface wlan0 inet static
address 172.31.31.172
netmask 255.255.255.0
$
$ sudo apt-get -qq update && apt-get -qq install dnsmasq
$ cat /etc/dnsmasq.d/dhcp-range
dhcp-range=172.31.31.177,172.31.31.199,12h
$ sudo systemctl restart dnsmasq
$ sudo systemctl status dnsmasq
$
- HOSTAPD(8) – hostapd – IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
$ sudo apt-get -qq update && apt-get -qq install hostapd
$ sudo gzip --stdout --decompress /usr/share/doc/hostapd/examples/hostapd.conf.gz > /etc/hostapd/hostapd.conf
$ sudo sed --in-place 's|DAEMON_CONF=|DAEMON_CONF=/etc/hostapd/hostapd.conf|' /etc/hostapd/hostapd.conf
$ sudo editor /etc/hostapd/hostapd.conf
$ sudo systemctl daemon-reload
$ sudo systemctl restart hostapd
$ sudo systemctl status hostapd
$
- IPTABLES(8) – iptables/ip6tables — administration tool for IPv4/IPv6 packet filtering and NAT
iptables --table nat --append POSTROUTING --out-interface wlan0 --jump MASQUERADE
- SYSCTL(8) – sysctl – configure kernel parameters at runtime
$ sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
$
boom shakalaka
Like this:
Like Loading...