onsdag den 18. august 2010

Linksys WRT54G as wireless bridge using OpenWrt

This is the closest i have been to being an embedded developer yet.

I tried to change my router into a wireless bridge to avoid having to pay for a USB modem while borrowing my brothers XboX360.

To do that I installed OpenWRT kamikaze on my Linksys WRT54G router.

I had to try it a few times to get the configuration right. In the end I was posting this through my new wireless bridge.

My configuration files ended up like this:

/etc/config/wireless:

config 'wifi-device' 'wlan0'
        option 'type' 'mac80211'
        option 'channel' '05'
        option 'disabled' '0'


config 'wifi-iface'
        option 'device' 'wlan0'
        option 'ssid' 'Wireless'
        option 'mode' 'sta'
        option 'encryption' 'psk'
        option 'hidden' '1'
        option 'isolate' '0'
        option 'bgscan' '0'
        option 'wds' '0'
        option 'key' '<top-secret-SSID-replaced-by-this>'
        option 'macpolicy' 'none'
        option 'network' 'wan'

/etc/config/network:
config 'switch' 'eth0'
        option 'vlan1' '0 5'
        option 'vlan0' '1 2 3 4 5*'


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 'ifname' 'eth0.0'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'


config 'interface' 'wan'
        option 'ifname' 'wlan0'
        option 'proto' 'dhcp'


That was all I needed to get it to work.

Furthermore i stopped the firewall - I haven't checked if that is necessary.

The config files might look a little odd compared to the default ones. The reason for that is that I installed X-Wrt to get a graphical interface. I didn't actually need it but I became kind of desperate in the process.

I also managed to get the router into a state where I could not connect to it anymore. Luckily I discovered that I could boot into the failsafe mode before I gave up on the router. It helped me a couple of times.


Ingen kommentarer:

Send en kommentar