I'm cutting out my reply from Mr. M's howto, since his guide was for Kamikaze.
I would like to express my thanks to Mr.M's guide, which I have used parts of to update my STA-Bridge/Route from 8.09 to Backfire 10.03.1-RC3 on my WL500GP running a Toshiba WLL4071-D4 (AR5006G) replacement-card.
dmesg spits out this as my chipset:
ath5k phy0: Atheros AR5213A chip found (MAC: 0x59, PHY: 0x43)
ath5k phy0: RF5112B multiband radio found (0x36)
I am now posting this connected to the lan-port of my OpenWRT Box using ath5k drivers, which in turn is a client of a WPA2 PSK remote router! Huge props to the devs for making this work!
Disclaimer: This guide should be seen as a W.i.P. or a proof-of-concept at most and avoided in production scenarios without further fine-tuning. This should be obvious, once you get to the firewall-part.
The following configuration uses a virtual interface to separate the wireless-master-connection (e.g. uplink to internet through remote AP) from the local network with a different subnet (I usually have another router connected to my OpenWRT box, which I then use to create my own network at home). When this virtual interface is set up to use dhcp, it is possible to "transparently" jump between available access-points without changing anything on the network depending on OpenWRT. Might be useful together with AAP or something the-like.
I have yet to test QoS, WME, upnp, etc. If you can, lend me a hand (or a head) here! (I don't bittorrent or play WoW. I do use VoIP, though.)
E.g.:
|ISP| = |Remote Router| - |OpenWRT| - |Other Wi-Fi Router|
| |
LAN (subnet #1) LAN (subnet #2)
Steps taken:
Update to usual 2.6 Backfire release for Broadcom (openwrt-brcm47xx-squashfs.trx), using i.e. "mtd -r write <firmware.trx> linux" from a CIFS-share on my Mac.
telnet into the box; passwd; vi /etc/opkg.conf (set to local mirror);
opkg remove kmod-b43 kmod-b43legacy [s]wpad-mini[/s]
opkg install kmod-ath kmod-ath5k [s]wpa-supplicant[/s]
wifi down
rm /etc/config/wireless
wifi detect > /etc/config/wireless
Create a virtual interface by adding this to /etc/config/network
#### AIRWIRE config
config interface airwire
[s]option ifname radio0[/s]
option proto dhcp
I also changed the IP Address of lan to my personal subnet (different from the wireless: i.e. 192.168.100.x) and turned off WAN (proto none)
My /etc/config/wireless looks like this:
config wifi-device radio0
option type mac80211
option channel 1
option macaddr 00:11:xx:xx:xx:xx
option hwmode 11g# REMOVE THIS LINE TO ENABLE WIFI:
# option disabled 1config wifi-iface
option device radio0
option network airwire
option mode sta
option ssid ChooseYourPoison
option encryption psk2
option key XXXXXXXXXX
Note that the network is set to airwire (the virtual interface that we added to /etc/config/network). Don't ask me about radio0, that's just the default output from wifi detect.
my /etc/config/firewall looks like this (it's propably [s]more[/s] less than sub-optimal, but it does work; please provide a meaningful fix if you have the time!):
config defaults
option syn_flood 1
option input [s]ACCEPT[/s]DROP
option output ACCEPT
option forward [s]ACCEPT[/s]DROP
option drop_invalid 0config zone
option name lan
option network lan
option input [s]ACCEPT[/s]DROP
option output ACCEPT
option forward [s]ACCEPT[/s]DROP
option masq 1config zone
option name airwire
option network airwire
option input [s]ACCEPT[/s]DROP
option output ACCEPT
option forward [s]ACCEPT[/s]DROP
option masq 1config zone
option name wan
option input REJECT
option output ACCEPT
option forward REJECT
option masq 1
option mtu_fix 1config forwarding
option src lan
option dest airwire
Do all this and then
/etc/init.d/network restart and watch your OpenWRT box get an IP address from the other AP.
Hope this helps, enjoy
EDIT: Updated to reflect jow's comments. Please read the firewall drop vs. reject wiki-page for more information on how to configure the firewall. Using DROP in simple terms would be like a stealth mode, where, if you have not established a connection from your side first, a connection attempt from the outside would be silently dropped (thus not revealing anything, not even whether the IP is available), whereas a REJECT would allow a response a-la "This port on this IP is unavailable". If you need "unsolicited" traffic from outside the zones, you should create special rules (e.g. port-forwarding) or as a last resort use ACCEPT.
(Last edited by ==qp== on 16 Sep 2010, 23:05)