-
Notifications
You must be signed in to change notification settings - Fork 179
10. Basic AP (Manual Configuration)
Koutto edited this page Nov 1, 2020
·
1 revision
- Install dnsmasq:
apt-get install dnsmasq
- Create a configuration file /etc/dnsmasq.conf as follows:
interface=wlan0
dhcp-authoritative
dhcp-range=192.168.1.2,192.168.1.30,255.255.255.0,12h
dhcp-option=3,192.168.1.1
dhcp-option=6,192.168.1.1
server=8.8.8.8
log-queries
log-dhcp
listen-address=192.168.1.1 # to make DNS and DHCP servers listening only on the interface used for AP
bind-interfaces # make sure to bind only on the provided interface (otherwise bind on all interfaces by default)
- Set IPs and routes:
ifconfig wlan0 up 192.168.1.1 netmask 255.255.255.0
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
- Start dnsmasq:
dnsmasq -C /etc/dnsmasq.conf -d
- Install hostapd:
apt-get install hostapd
- Create a configuration file hostapd.conf:
interface=wlan0
driver=nl80211
ssid=MYWIFI
hw_mode=g
channel=11
macaddr_acl=0
ignore_broadcast_ssid=0
auth_algs=1
wpa=2
wpa_passphrase=mywifipassphrase
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_group_rekey=86400
ieee80211n=1
wme_enabled=1
- Set monitor mode and start hostapd:
# airmon-ng check kill # Might be necessary to kill interfering processes
iwconfig wlan0 mode monitor
ifconfig wlan0 up
hostapd ./hostapd.conf
- Configure forwarding and redirection (to enable Internet access):
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface wlan0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
- 01. WiFi Basics
- 02. 802.11 Specifications
- 03. WPS (WiFi Protected Setup)
- 04. WPA Protocol Overview
- 05. WPA/WPA2 Personal (PSK) Authentication
- 06. WPA/WPA2 PSK Traffic Decryption
- 07. WPA/WPA2 Enterprise (MGT)
- 08. Evil Twin Attacks
- 09. 802.11 Network Selection Algorithms
- 01. WiFi Interfaces Management
- 02. WiFi Connection
- 03. WiFi Monitoring (Passive Scanning)
- 04. Hotspot Captive Portal Bypass
- 05. WiFi Denial of Service
- 06. WEP Authentication Cracking
- 07. WPA/WPA2 Personal (PSK) Authentication Cracking
- 08. WPA/WPA2 Enterprise (MGT) Authentication Cracking
- 09. WPA/WPA2 Personal (PSK) Traffic Decryption
- 10. Basic AP (Manual Configuration)
- 11. Open Network (no passphrase) Rogue AP / Evil Twin
- 12. WPA/WPA2 Personal (PSK) Rogue AP / Evil Twin
- 13. WPA/WPA2 Enterprise (MGT) Rogue AP / Evil Twin