计算机‎ > ‎软件‎ > ‎Linux‎ > ‎

修改 hostapd 基本配置

发布者:guo rue,发布时间:2014年6月4日 21:06   [ 更新时间:2014年6月4日 22:31 ]
http://wiki.guoruei.org/computer/software/linux/raspberry-pi-raspbian-wifi-hotspot-lan-router-dns
在这篇文章中,进行了基本的 hostapd 配置,今天将加强这个配置的安全性。

其中
ignore_broadcast_ssid=0 改为 1 ,就启用了 SSID隐藏,这样别人就不能直接扫描到你的 SSID 了。
macaddr_acl:,指定MAC地址过滤规则,0表示除非在禁止列表否则允许,1表示除非在允许列表否则禁止,2表示使用外部RADIUS服务器;
accept_mac_file:指定允许MAC列表文件所在;
deny_mac_file:指定禁止MAC列表文件所在;

好的,开始
sudo nano /etc/hostapd/hostapd.conf
修改为
# Basic configuration

interface=wlan0
ssid=wlan2.guoruei.net
channel=2
#bridge=br0

# WPA and WPA2 configuration

macaddr_acl=1
accept_mac_file=/etc/hostapd/hostapd.accept
auth_algs=1
ignore_broadcast_ssid=1
wpa=2
wpa_passphrase=youpassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
beacon_int=100
auth_algs=3
wmm_enabled=1

# Hardware configuration

driver=rtl871xdrv
ieee80211n=1
hw_mode=g
device_name=RTL8192CU
manufacturer=Realtek

然后去设置这个
sudo nano /etc/hostapd/hostapd.accept
添加
00:00:00:00:00:00
11:11:11:11:11:11
根据需要填啦。一行一个。保存,退出。

重启服务
sudo service hostapd start

-------------------------------------------------------------------------------

或者把上文 accept_mac_file=/etc/hostapd/hostapd.accept 换成 deny_mac_file=/etc/hostapd/hostapd.deny
然后去设置这个
sudo nano /etc/hostapd/hostapd.deny
同样一行一个
00:00:00:00:00:00
11:11:11:11:11:11
保存退出。

记得重启服务哦。
sudo service hostapd start

或者干脆这个系统重启算了。
reboot