Hi,
I have a fonera+ (2201A) and have installed openwrt bleeding edge.
Client mode works and AP also works. But i want the FON to be a client and an AP at the same time. When I try this it doesn't work (my client mode doesn't even recieve an ip address)
this is my current config:
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 'netmask' '255.255.255.0'
option 'ifname' 'eth0.0'
option 'macaddr' ''
option 'ip6addr' ''
option 'ip6gw' ''
option 'ipaddr' '192.168.3.20'
option 'gateway' ''
config 'interface' 'wan'
option 'proto' 'dhcp'
option 'macaddr' ''
option 'ipaddr' ''
option 'ip6addr' ''
option 'netmask' ''
option 'gateway' ''
option 'ip6gw' ''
option 'ifname' 'ath0'
config 'interface' 'wanwifi'
option 'proto' 'dhcp'
option 'ifname' 'ath0'
------------------------------------------------------
config 'wifi-device' 'wifi0'
option 'type' 'atheros'
option 'agmode' '11bg'
option 'maxassoc' ''
option 'distance' ''
option 'diversity' '1'
option 'txantenna' '0'
option 'rxantenna' '0'
option 'disabled' '0'
option 'mode' '11g'
option 'channel' '0'
#config 'wifi-iface'
# option 'device' 'wifi0'
# option 'network' 'wanwifi'
# option 'mode' 'ap'
# option 'ssid' 'openwrt'
config 'wifi-iface'
option 'device' 'wifi0'
option 'network' 'wanwifi'
option 'mode' 'sta'
option 'bssid' ''
option 'server' ''
option 'port' ''
option 'hidden' '0'
option 'isolate' '0'
option 'bgscan' '0'
option 'frag' ''
option 'rts' ''
option 'wds' '0'
option 'key2' ''
option 'key3' ''
option 'key4' ''
option '80211h' ''
option 'compression' ''
option 'bursting' ''
option 'ff' ''
option 'wmm' ''
option 'xr' ''
option 'ar' ''
option 'turbo' ''
option 'macpolicy' 'none'
option 'txpower' '6'
option 'ssid' 'RICKY'
option 'key' 'XX:XX:XX:XX:XX'
option 'encryption' 'wep'
--------------------------------------------------
config defaults
option syn_flood 1
option input DROP
option output ACCEPT
option forward DROP
config zone
option name lan
option input ACCEPT
option output ACCEPT
option forward DROP
config zone
option name wan
option input DROP
option output ACCEPT
option forward DROP
option masq 1
config 'zone'
option 'name' 'wanwifi'
option 'network' 'wanwifi'
option 'input' 'DROP'
option 'output' 'ACCEPT'
option 'forward' 'DROP'
option 'masq' '1'
config 'forwarding'
option 'src' 'lan'
option 'dest' 'wanwifi'
config forwarding
option src lan
option dest wan
### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
# option src lan
# option src_ip 192.168.45.2
# option dest wan
# option proto tcp
# option target REJECT
# block a specific mac on wan
#config rule
# option dest wan
# option src_mac 00:11:22:33:44:66
# option target REJECT
# block incoming ICMP traffic on a zone
#config rule
# option src lan
# option proto ICMP
# option target DROP
# port redirect port coming in on wan to lan
#config redirect
# option src wan
# option src_dport 80
# option dest lan
# option dest_ip 192.168.16.235
# option dest_port 80
# option proto tcp
# include a file with users custom iptables rules
#config include
# option path /etc/firewall.user
### FULL CONFIG SECTIONS
#config rule
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 80
# option dest wan
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
# option target REJECT
#config redirect
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 1024
# option src_dport 80
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
----------------------------------------------------------------------
root@OpenWrt:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 * 255.255.255.0 U 0 0 0 br-lan
192.168.1.0 * 255.255.255.0 U 0 0 0 ath0
default 192.168.1.1 0.0.0.0 UG 0 0 0 ath0
_____________________________________________
root@OpenWrt:~# ifconfig
ath0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:79722 errors:0 dropped:0 overruns:0 frame:0
TX packets:30937 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:67269262 (64.1 MiB) TX bytes:2309296 (2.2 MiB)
br-lan Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.3.20 Bcast:192.168.3.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31545 errors:0 dropped:0 overruns:0 frame:0
TX packets:40183 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1948875 (1.8 MiB) TX bytes:34131673 (32.5 MiB)
eth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:34073 errors:0 dropped:0 overruns:0 frame:0
TX packets:42180 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2864855 (2.7 MiB) TX bytes:34463280 (32.8 MiB)
Interrupt:255 Base address:0x1000
eth0.0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:34073 errors:0 dropped:0 overruns:0 frame:0
TX packets:42179 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2319687 (2.2 MiB) TX bytes:34349965 (32.7 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1740 (1.6 KiB) TX bytes:1740 (1.6 KiB)
wifi0 Link encap:UNSPEC HWaddr XX:XX:XX:XX:XX:XX-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:55659 errors:0 dropped:0 overruns:0 frame:3712
TX packets:31177 errors:292 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:195
RX bytes:38054480 (36.2 MiB) TX bytes:3247892 (3.0 MiB)
Interrupt:3 Memory:b0000000-b00ffffc
root@OpenWrt:~# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
eth0.0 no wireless extensions.
wifi0 no wireless extensions.
br-lan no wireless extensions.
ath0 IEEE 802.11g ESSID:"XXXXXXXXX" Nickname:""
Mode:Managed Frequency:2.412 GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate:36 Mb/s Tx-Power=18 dBm Sensitivity=1/1
Retry:off RTS thr:off Fragment thr:off
Encryption key:xxxxxxxxxx Security mode:restricted
Power Management:off
Link Quality=25/70 Signal level=-71 dBm Noise level=-96 dBm
Rx invalid nwid:1785 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
------------------------------------------------
This configuration makes my router work in client mode and routs it through my pc.
Whenever i uncomment
#config 'wifi-iface'
# option 'device' 'wifi0'
# option 'network' 'wanwifi'
# option 'mode' 'ap'
# option 'ssid' 'openwrt'
nothing works anymore.
Could anyone post what i have to change in order to make it work?
I'm a newbie at this (and at linux in general) so don't overestimate my capabilities .
If it would be useful to post some more info I would be more then willing to do this.