First of all, here's the network configuration I want use OpenWRT in:
- 220.127.116.11: Internet gateway + firewall
- 18.104.22.168: WRT54G as a wireless + wired router
- 22.214.171.124: LAN SOHO server (DHCP + DNS, Samba, etc)
OK, so first let's start by installing/resetting our firmware.
At the time of this post the latest version of OpenWRT is Backfire 10.3.1. With a WRT54G the download directory you're interested in is brcm47xx/. Now, with regards the confusing content of the directory and its numerous files, the only one you are interested in is
openwrt-brcm47xx-squashfs.trx(the .trx). The .bin files are only there for users of the original Linksys firmware. The admin console should let you go through the upgrade nicely, else you'll find various upgrade/install tutorials in the OpenWRT HOWTOs section.
Now, assuming you have the latest firmware installed, you may want also want to reset the settings to default. There are multiple ways to do just that, as indicated on the OpenWRT failsafe guide. Since I tend to use the serial connection to ensure that I can access the WRT no matter what, my preferred way is just to enter the failsafe mode through the serial console with f+Enter when prompted, and then issue:
firstboot reboot -f
We will now assume that the router has been reset to its intial boot parameters. In this configuration, the default address is 192.168.1.1 so you'll probably want to configure a network interface with a static address of 192.168.1.2 and connect it to one of the 4 ethernet port of the router (but not the 5th "internet" port, as this one is firewalled by default and you won't be able to access the console from it).
OK, with the web interface accessible at 192.168.1.1, we'll do the following:
- In Network → Firewall, delete the LAN and WAN firewall zones and set all the defaults in general settings to "accept". Click save and apply.
- In Network → Static Routes add a route with the following parameters:
- Interface: lan
- Target: 126.96.36.199
- IPv4-Netmask: 255.255.255.0
- IPv4-Gateway: 0.0.0.0
- Click save and apply
- In Network → Switch:
- Delete VLAN #1
- Mark all ports of VLAN #0 as untagged
- Click save and apply
- In Network → Interfaces:
- Delete the WAN network
- Edit the LAN network and in General Setup, make sure the Protocol is set to "Static address" and change it to 188.8.131.52
- Add 184.108.40.206 as a gateway and 220.127.116.11 as custom DNS
- Also make sure to check the "Disable DHCP for this interface" option
- Save (but don't apply)
- In Network → Interfaces → Physical Settings:
- Add "VLAN Interface: "eth0.1""
- Make sure "creates bridge" is selected and enable STP if desired
- Click save and apply.
You can also fine tune your network config by editing
/etc/config/network. Don't forget to issue a
/etc/init.d/network reloadwhen you're done.
Finally, you may want to note that the power supply that Linksys providess with the WRT54G sure is a piece of crap (at least the early ones - I can only hope they have improved on that): even when disconnected and therefore not supplying any power to the router, the PSU consumes 3 Watts (!), or about half of what the device actually uses when active. Talk about wasting watts for nothing...