CF-R3 に FreeBSD 6.1-RELEASE インストール 番外編
■ hostapd で WPA-PSK な無線LANアクセスポイント
昨日の続き。取り敢えずメモ書き程度に。
IO-DATA の WN-G54/CBL です。ソフマップで2980でした。2000円台後半で買えるようです。FreeBSD では ath で認識されます。(GENERICカーネルには ath ドライバが入っていません。カーネル再構築しない場合は # kldload if_ath.ko が必要です)
その他にも
wlan_wep.ko
wlan_tkip.ko
wlan_ccmp.ko
wlan_xauth.ko
wlan_acl.ko
辺りのカーネルモジュールを追加しておきます.
# ifconfig ath0
ath0: flags=8802mtu 1500 ether **:**:**:**:**:** media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid "" channel 1 authmode OPEN privacy OFF txpowmax 100 protmode CTS burst
hostap モードに変更
# ifconfig ath0 mediaopt hostap
ath0: flags=8802mtu 1500 ether 00:a0:b0:77:a0:19 media: IEEE 802.11 Wireless Ethernet autoselect (autoselect ) status: no carrier ssid "" channel 1 authmode OPEN privacy OFF txpowmax 100 protmode CTS burst dtimperiod 1
hostapd は 6.0-RELEASE 以降で取り入れられています。
hostapd - user space IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator and RADIUS authentication server
設定ファイルの雛形は /usr/src/contrib/hostapd/ にあります。README と hostapd.conf を参考に設定します。デフォルトの /etc/rc.d/hostapd 起動スクリプトでは設定ファイルは /etc/hostapd.conf にある事を前提にしているようですので、こちらにコピーしていじくります。
interface の指定と WPA 周りの設定をしたら debug モードで起動するか確認します。
# hostapd -d -t hostapd.conf
無事に起動すると
ath0: flags=8843mtu 2290 inet6 ****%ath0 prefixlen 64 scopeid 0x4 ether **** media: IEEE 802.11 Wireless Ethernet autoselect (autoselect ) status: associated ssid **** channel 1 bssid **** authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit txpowmax 39 protmode CTS burst dtimperiod 1 bintval 100
な状態になるはずです。別の無線LAN付き PC からアクセスしてみて接続できるか確認してみましょう。