Linux搭建AP热点

1.安装环境

WIFI硬件: RTL8802bu

DHCP服务器:dnsmasq

AP配置: hostapd

2. 配置DHCP服务器

编辑/etc/dnsmasq.conf

interface=wlan0
listen-address=192.168.0.1
#no-dhcp-interface=
dhcp-range=192.168.0.50,192.168.0.150,12h
server=/google.com/8.8.8.8

启动

dnsmasq -C /etc/dnsmasq.conf

3. 配置AP热点

编辑/etc/hostapd.conf

interface=wlan0
driver=nl80211
ssid=My_wifi
channel=6
hw_mode=g
ignore_broadcast_ssid=0
auth_algs=1
wpa=3
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

启动

hostapd /etc/hostapd.conf

Related Posts