kuroの覚え書き

96の個人的覚え書き

OpenWRT/Foneraでクライアント再び



いままで成功しそうでダメだったFON鯖の無線化。

http://blogs.yahoo.co.jp/momongamemonga/40954228.html

こちらの記事を元にやっと安定動作するようになった。

(前回の設定失敗から1年・・・)

http://d.hatena.ne.jp/k-kuro/20080812/p1

この時に設定したのと基本的には同じようなものだが

/etc/config/network


config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0

config interface lan #こっちの設定はいじる必要があるか不明
option type bridge
option proto static
option ipaddr 192.168.0.10
option netmask 255.255.255.0
option gateway 192.168.0.1
option dns 192.168.0.1

config interface wan #以下の設定を追加
option proto static
option ipaddr 192.168.1.10 #FONに割り振るアドレス
option netmask 255.255.255.0
option gateway 192.168.1.1 #上位ルータの無線LAN側プライベートアドレス
option dns 192.168.1.1 #上位ルータがDNSをブリッジしている


/etc/config/wireless


config wifi-device wifi0
option type atheros
option channel auto

# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0

config wifi-iface
option device wifi0
option network wan
option mode sta #clientモード
option ssid <SSID> #上位ルータのssid
option encryption psk2
option key '*****************' #パスワード

そしてこれがキモのfirewall設定

/etc/config/firewall


config zone
option name wan
# option input REJECT #元の設定はコレ
option input ACCEPT #コレを書き足すというかACCEPTにする
option output ACCEPT
option forward REJECT
# option masq 1 #コメントアウト

あとは上位ルーターに穴をあけてやれば外部からもアクセスできるな。


以下覚え書き

root@OpenWrt:~# opkg list_installed

base-files-atheros - 14-r14511 -

bridge - 1.4-1 -

busybox - 1.11.2-2 -

dnsmasq - 2.46-1 -

dosfstools - 2.11-3 -

dropbear - 0.51-2 -

fdisk - 2.13.0.1-2 -

firewall - 1-1 -

gpioctl - 1.0-1 -

hostapd-mini - 0.6.6-1 -

hotplug2 - 0.9+r102-2 -

iptables - 1.4.0-1 -

iptables-mod-conntrack - 1.4.0-1 -

iptables-mod-nat - 1.4.0-1 -

kernel - 2.6.26.5-atheros-1 -

kmod-crc-itu-t - 2.6.26.5-atheros-1 -

kmod-crc7 - 2.6.26.5-atheros-1 -

kmod-fs-msdos - 2.6.26.5-atheros-1 -

kmod-fs-vfat - 2.6.26.5-atheros-1 -

kmod-ipt-conntrack - 2.6.26.5-atheros-1 -

kmod-ipt-core - 2.6.26.5-atheros-1 -

kmod-ipt-nat - 2.6.26.5-atheros-1 -

kmod-ipt-nathelper - 2.6.26.5-atheros-1 -

kmod-madwifi - 2.6.26.5+r3314-atheros-2 -

kmod-mmc - 2.6.26.5-atheros-1 -

kmod-mmc-over-gpio - 2.6.26.5-atheros-2 -

kmod-mmc-spi - 2.6.26.5-atheros-1 -

kmod-nls-base - 2.6.26.5-atheros-1 -

kmod-nls-cp437 - 2.6.26.5-atheros-1 -

kmod-nls-iso8859-1 - 2.6.26.5-atheros-1 -

kmod-nls-utf8 - 2.6.26.5-atheros-1 -

kmod-ppp - 2.6.26.5-atheros-1 -

kmod-pppoe - 2.6.26.5-atheros-1 -

kmod-spi-bitbang - 2.6.26.5-atheros-1 -

kmod-spi-gpio - 2.6.26.5-atheros-1 -

libblkid - 1.40.11-1 -

libgcc - 4.1.2-14 -

liblua - 5.1.4-2 -

libncurses - 5.6-1 -

libuci - 0.7.3-1 -

libuci-lua - 0.7.3-1 -

libuuid - 1.40.11-1 -

lua - 5.1.4-2 -

luci-admin-core - 0.8.6-1 -

luci-admin-full - 0.8.6-1 -

luci-admin-mini - 0.8.6-1 -

luci-app-firewall - 0.8.6-1 -

luci-app-mmc_over_gpio - 0.8.6-1 -

luci-cbi - 0.8.6-1 -

luci-core - 0.8.6-1 -

luci-http - 0.8.6-1 -

luci-i18n-english - 0.8.6-1 -

luci-ipkg - 0.8.6-1 -

luci-sgi-cgi - 0.8.6-1 -

luci-sys - 0.8.6-1 -

luci-theme-base - 0.8.6-1 -

luci-theme-openwrt - 0.8.6-1 -

luci-uci - 0.8.6-1 -

luci-uvl - 0.8.6-1 -

luci-web - 0.8.6-1 -

mtd - 8 -

nano - 2.0.7-1 -

opkg - 4564-3 -

ppp - 2.4.3-10 -

ppp-mod-pppoe - 2.4.3-10 -

swap-utils - 2.13.0.1-2 -

uci - 0.7.3-1 -

uclibc - 0.9.29-14 -

udevtrigger - 106-1 -

wireless-tools - 29-2 -

wpa-cli - 0.6.3-1 -

wpa-supplicant - 0.6.3-1 -