hostapd で WPA-PSK な無線LANアクセスポイント
グダグダになったので一旦まとめ。
アクセスポイント側 PC
Panasonic CF-B5V + FreeBSD 6.1-RELEASE + WN-G54/CBL
/boot/loader.conf
if_bridge_load="YES" if_ath_load="YES" wlan_wep_load="YES" wlan_tkip_load="YES" wlan_ccmp_load="YES" wlan_xauth_load="YES" wlan_acl_load="YES"
/etc/rc.conf
hostapd_enable="YES" ifconfig_fxp0="UP" ifconfig_ath0="mediaopt hostap mode 11g mtu 1500" cloned_interfaces="bridge0" ifconfig_bridge0="addm fxp0 addm ath0 UP"
/etc/hostapd.conf
interface=ath0 logger_syslog=-1 logger_syslog_level=2 logger_stdout=-1 logger_stdout_level=2 debug=0 dump_file=/tmp/hostapd.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=0 ssid=「SSID」 wpa=1 wpa_passphrase=「パスフレーズ」 wpa_key_mgmt=WPA-PSK wpa_group_rekey=600 wpa_strict_rekey=1 wpa_gmk_rekey=86400 wpa_pairwise=TKIP
「」内は勿論自分の環境に置き換えてください。
で、無線LANアクセスポイントとして動くはずです。
参考:
- man 4 ath
- man 4 if_bridge
- man 8 ifconfig
最後に確認する為に検索したらそのものズバリのページがあった(笑)
http://www.freebsdmall.com/~loader/en_US.ISO8859-1/articles/wireless/article.html
後はアクセス制限をどうするか、hostapd には
# Station MAC address -based authentication # 0 = accept unless in deny list # 1 = deny unless in accept list # 2 = use external RADIUS server (accept/deny lists are searched first) macaddr_acl=0 # Accept/deny lists are read from separate files (containing list of # MAC addresses, one per line). Use absolute path name to make sure that the # files can be read on SIGHUP configuration reloads. #accept_mac_file=/etc/hostapd.accept #deny_mac_file=/etc/hostapd.deny
という設定があるのですが、検証出来ていません。