#topicpath

- wi-fi AP を Linux で構築する

/////////////////////////////////////////////////////////////////////////////////
* 目次 [#contents]
#contents();

/////////////////////////////////////////////////////////////////////////////////
* wi-fi AP にする [#wi-fi-ap]

//===============================================================================
** hostapd の設定 [#hostapd]
- hostapd をインストールする
 # aptitude install hostapd

- ThinkPad X230 では、こんな感じ
 [kazu@foerster:4 ~]$ lsmod | grep wifi
 iwlwifi               166761  0 
 mac80211              192806  1 iwlwifi
 cfg80211              137243  2 mac80211,iwlwifi
- mac80211 は、hostapd のサポート対象になっているようだ。
- 取り敢えず、[[hostapd 本家>http://hostap.epitest.fi/hostapd/]] から DL した hostapd.conf を使ってみる。
-- 置き場所は
 /etc/hostapd/hostapd.conf
-- /etc/init.d/hostapd から参照するために
 /etc/default/hostapd
に、下記を記述する
  DAEMON_CONF="/etc/hostapd/hostapd.conf"
- 実行
 root@foerster:/etc/hostapd# /usr/sbin/hostapd /etc/hostapd/hostapd.conf 
 Configuration file: /etc/hostapd/hostapd.conf
 Using interface wlan0 with hwaddr 64:80:99:7a:1e:7c and ssid 'test'
取り敢えず、動いているらしい...
- SSID の書き換え
 $ vi /etc/hostapd/hostapd.conf [RETURN]
 
 # SSID to be used in IEEE 802.11 management frames
 ssid=hogehoge ←適切な SSID に書き換える

- wpa_passphrase は、wpa_passphrase コマンドで生成したものを使う。
 $ wpa_passphrase <SSIS> [passphrase]
-- コマンドラインで [passphrase] を省略して実行した場合、STDIN からの入力が求められる。周りから覗かれる心配がある場合は、コマンドラインに passphrase を指定しない方がいいだろう。


//===============================================================================
** bridge の設定 [#bridge]
- /etc/network/interfaces を編集する
 # The loopback network interface
 auto lo
 iface lo inet loopback
 
 # The primary network interface
 allow-hotplug eth0
 iface eth0 inet dhcp
 
 
 # Wired network interface
 ahto rht0
 iface eth0 inet static
 address 0.0.0.0
 
 # Wireless network interface
 auto wlan0
 iface wlan0 inet static
 address 0.0.0.0
 
 # Bridge network interface
 auto br0
 iface br0 inet static
 address 192.168.1.253
 netmask 255.255.255.0
 network 192.168.1.0
 broadcast 192.168.1.255
 gateway 192.168.1.1
 dns-nameservers 192.168.1.1
 bridge_ports eth0 wlan0
 bridge_stp off


//===============================================================================
** dhcpd の設定 [#dhcpd]
- dhcp server をインストールする
 # aptitude install isc-dhcp-server

- /etc/dhcp/dhcpd.conf の編集


/////////////////////////////////////////////////////////////////////////////////
* 参考リンク [#links]
- [[Debianで無線APを作る(2)Add Star>http://d.hatena.ne.jp/hoge-maru/20110326/1301155960]]
- [[hostapd 本家>http://hostap.epitest.fi/hostapd/]]
- [[hostapd を用いた無線 LAN アクセスポイントの構築>http://masap.sakura.ne.jp/wireless/hostapd.html]]
- [[Ubuntuで無線LANアクセスポイントを構築 [Hostapd で無線LAN AP構築]>http://bibo-log.blog.so-net.ne.jp/2012-05-15]]
- [[Ubuntuで無線LANルーターを構築する>http://netbuffalo.doorblog.jp/archives/3895783.html]]
- [[How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device>http://forum.doozan.com/read.php?2,6300]]
- [[HostAPD, Linux and the iPhone>http://www.redshiftwireless.com/hostapd-linux-and-the-iphone/]]

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS