Open caiwang opened 9 years ago
Comment by unissoft-bj Monday Feb 23, 2015 at 11:10 GMT
channel=2 ssid=mmtx
ignore_broadcast_ssid=1
Send empty SSID in beacons and ignore probe request frames that do not specify full SSID, i.e., require stations to know SSID. default: disabled (0) 1 = send empty (length=0) SSID in beacon and ignore probe request for broadcast SSID 2 = clear SSID (ASCII 0), but keep the original length (this may be required with some clients that do not support empty SSID) and ignore probe requests for broadcast SSID
auth_algs=1 wpa=1 wpa_psk_file=/etc/hostapd-psk wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP TKIP rsn_pairwise=CCMP
auth_algs=1 allows only WPA2 authentication algorithms. 2 is WEP. Never ever use WEP (wired equivalent privacy) because it has been thoroughly broken for years, and is trivially easy to crack. 3 allows both. wpa=2 allows only WPA2. 1 is WPA1, and 3 allows both. wpa_psk_file points to the file containing the shared keys. wpa_key_mgmt specifies the encryption key algorithms you want to allow. Your choices are WPA-PSK, WPA-EAP, or both. PSK is pre-shared key. EAP is Extensible Authentication Protocol, which is a framework that supports a number of different authentication methods. You do not need it for your little pre-shared key setup. wpa_pairwise and rsn_pairwise control which ciphers are allowed for encrypting your data, and you can use CCMP, TKIP, or both. CCMP is much stronger than TKIP, so you could try allowing only CCMP. Windows clients are notorious for being finicky and troublesome with strong security, so you might have to allow TKIP for them.
hostapd -d /etc/hostapd/hostapd.conf
http://www.ibm.com/developerworks/library/l-wifiencrypthostapd/
Comment by unissoft-bj Monday Feb 23, 2015 at 12:31 GMT
rm /etc/hostapd/hostapd.conf
echo "interface=wlan0" >> /etc/hostapd/hostapd.conf echo "driver=nl80211" >> /etc/hostapd/hostapd.conf echo "hw_mode=g" >> /etc/hostapd/hostapd.conf echo "ssid=mmtx" >> /etc/hostapd/hostapd.conf echo "channel=2" >> /etc/hostapd/hostapd.conf
echo "ignore_broadcast_ssid=1" >> /etc/hostapd/hostapd.conf echo "auth_algs=1" >> /etc/hostapd/hostapd.conf echo "wpa=1" >> /etc/hostapd/hostapd.conf echo "wpa_psk_file=/etc/hostapd-psk" >> /etc/hostapd/hostapd.conf echo "wpa_key_mgmt=WPA-PSK" >> /etc/hostapd/hostapd.conf echo "wpa_pairwise=CCMP TKIP" >> /etc/hostapd/hostapd.conf echo "rsn_pairwise=CCMP" >> /etc/hostapd/hostapd.conf
echo "00:00:00:00:00:00 matrixadmin" > /etc/hostapd-psk
Issue by unissoft-bj Monday Feb 23, 2015 at 08:52 GMT Originally opened as https://github.com/caiwang/ihostsrc/issues/32
Channel list
https://www.juniper.net/techpubs/hardware/netscreen-appliances/5gtwireless/wireless_channels.pdf
实际测试hostapd支持channel 1~11, 不支持channel 12,13 Feb 23 18:58:55 ihost hostapd: wlan0: IEEE 802.11 Configured channel (12) not found from the channel list of current mode (1) IEEE 802.11g Feb 23 18:58:55 ihost hostapd: wlan0: IEEE 802.11 Hardware does not support configured channel Feb 23 18:59:14 ihost hostapd: wlan0: IEEE 802.11 Configured channel (13) not found from the channel list of current mode (1) IEEE 802.11g Feb 23 18:59:14 ihost hostapd: wlan0: IEEE 802.11 Hardware does not support configured channel
硬件所支持的频点