1 | sudo apt-get install hostapd |
1 2 3 4 5 6 7 8 9 10 | interface=wlan0 driver=nl80211 ssid=网络名称 channel=6 hw_mode=g wpa=2 wpa_passphrase=密码 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP |
1 | sudo apt-get install isc-dhcp-server |
1 2 3 4 5 6 7 | subnet 192.168.111.0 netmask 255.255.255.0 { range 192.168.111.50 192.168.111.150; option routers 192.168.111.1; option domain-name-servers 8.8.8.8; option ip-forwarding off; option broadcast-address 192.168.111.255; } |
1 | sudo hostapd hostapd.conf -B |
1 | ifconfig wlan0 192.168.111.1 |
1 | /etc/init.d/isc-dhcp-server start |
1 2 | echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |