OpenWrt Forum Archive

Topic: How to configure 'Fonera' as WAN-LAN bridge?

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

My old AP has broken and I want to replace it with a 'Fonera'. Im tying to get the same behabiour as a I used to have with my old AP so I successfully installed OpenWrt Kamikaze on my Fonera, but I'm having problems configuring the WAN-LAN bridge.

First I will describe what I want to get:
All my wired-LAN computers have the same config

IP: 192.168.0.x
MASK: 255.255.255.0
GW: 192.168.0.1
DNS: 192.168.0.2

There is no DHCP server on the LAN. I want all my wireless-LAN computers have the same config as above. Once a wireless-LAN computers successfully authenticates using WPA-PSK, it should become part of the 192.168.0.x wired LAN and comunication between Wireless-LAN<>Wired-Lan should be possible.

I think the 'wired' configuration part is clear to me (correct me if I'm worng or misunderstand something):

root@OpenWrt:~# cat /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 ifname   eth0
        option proto    static
        option ipaddr   192.168.0.6
        option netmask  255.255.255.0
        option gateway  192.168.0.1
        option dns      192.168.0.2

but the lack of documentation (Wiki seems down at the moment) about Kamikaze makes hard to me to configure wireless part of the bridge. A far as I can undertand, it may be similar to this (again, correct me if I'm worng or misunderstand something)

root@OpenWrt:~# cat /etc/config/wireless
config wifi-device  wifi0
        option type      atheros
        option channel   5
        option diversity 0
        option txantenna 1
        option rxantenna 1

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        option ssid     Fonera
        option hidden   0
        option encryption psk
        option key topsecret

but obviosuly I missed something to create the bridge.

Is it possible to get what I want (that is: use my Fonera as standar AP)?
Can someone help me to configure the bridge?

Tanks in advance.

--Stolz

Note: wpa-supplicant and hostapd have been succesfully installed with ipkg

setup looks good. To create a bridge, put "option network  lan" in config wifi-iface (in wireless) and "option type     bridge" in config interface lan (in network)

you don't need wpa-supplicant.

Thanks for your answer loswillios, and thanks for reading such a big post smile

Few hours before your post I realize I can still read the Wiki using Google's cache and there suggested the same lines as you. Now bridge is working like a charm big_smile
Also I remove wpa-supplicant and add two fireewall rules to /etc/config/firewall:
iptables -A INPUT -i br-lan -j ACCEPT
iptables -A INPUT -o br-lan -j ACCEPT

Rgdrs

I'm trying to do the same thing, but I do have a DHCP server on the WAN side. Note, I'm using the official release of Kamikaze. (7.06)

Basically, I want to turn my Fonera into a true wireless bridge, so that wireless clients can pull IP address from the local DHCP server.

Right now, I can connect to the Fonera, but I can't pull an IP address.

From /etc/config/network

config interface wan
  option ifname eth0
  option proto dhcp

config interface lan
  option type bridge
  option ifname ath0

from /etc/config/wireless

config wifi-device wifi0
  option type atheros
  option channel 5
  option disabled 0

config wifi-iface
  option device wifi0
  option network lan
  option mode ap
  option ssid OpenWRT
  option hidden 0
  option encryption none

I've looked, but I haven't seen a howto that seems to cover this, and I'm not sure I understand the new configuration files.

Thanks!

Stolz wrote:

Also I remove wpa-supplicant and add two fireewall rules to /etc/config/firewall:
iptables -A INPUT -i br-lan -j ACCEPT
iptables -A INPUT -o br-lan -j ACCEPT

iptables -A INPUT -o br-lan -j ACCEPT

iptables v1.3.5: Can't use -o with INPUT

I have the latest stable release 7.07 Kamikaze, and it seems that I can't use -o option. Any idea??

the iptables command was never necessary.

Ok. Then I am missing something. La Fonera have Internet access, because I can access via SSH and download packages for example, but my laptop client can't access Internet.

I have same configuration as first post here, with one more thing "option proto dhcp" at wifi-iface. I have hostapd installed.

Thanks

The discussion might have continued from here.