# ifconfig wlan0 down # ifconfig wlan0 192.168.126.1 # ifconfig wlan0 up
# aptitude install isc-dhcp-server
設定内容: INTERFACES="wlan0"; subnet 192.168.126.0 netmask 255.255.255.0 { range 192.168.126.10 192.168.126.254; option domain-name-servers 8.8.8.8; option routers 192.168.126.1; default-lease-time 600; max-lease-time 7200; }
# /etc/init.d/isc-dhcp-server start
# aptitude install hostapd
interface=wlan0 driver=nl80211 ssid=${SSID} hw_mode=g channel=11 wpa=2 wpa_passphrase=${PASSPHRASE} wpa_key_mgmt=WPA-PSK
# /etc/init.d/hostapd start
# iptables -t nat -A POSTROUTING -s "192.168.126.10/255.255.255.0" -o eth0 -j MASQUERADE