#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 に書き換える //=============================================================================== ** 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]]