The other day I realized that the dd-wrt custom firmware I was running on my Linksys WRT54G version 3 router was out of date and susceptible to a serious security vulnerability (see here: http://milw0rm.com/exploits/9209). So like a good system administrator, I immediately proceeded to upgrade to the latest version.
While this should have been a simple process, the router spit back a “firmware upgrade failed” message. Next thing I know, the web interface is gone and the lights are flashing on the front. One of the good signs was that it still recognized when I plugged something into one of the LAN ports and it was returning TTL=100 when pinged. This was a very good sign since it meant that the router was not completely bricked and was still recoverable. The TTL=100 means that the firmware loader is working, but it is waiting for firmware. Excellent!
So now it was time to attempt to recover it. I went to the Linksys site and downloaded the latest firmware for my router. I then loaded a program called TFTP. You can get a copy of that here. Next I changed my network adapter to assign itself a static IP address of 192.168.1.100 (if you don’t do this, you won’t be able to interact with the router). Open the TFTP program and set “server” to 192.168.1.1, leave password blank, select the Linksys firmware you just downloaded, and leave retries at 3. Now I was ready to feed the router some firmware.
Timing is everything with this. The easiest way I found is to watch the light on my network adapter card. In order to upload the firmware, you must unplug the power from your router (leave the network cable running from your computer to the router plugged in of course). Now, while keeping an eye on the light on your network adapter, plug in the router. As soon as the network adapter’s light comes on, hit the “Upgrade” button in the TFTP program. You should receive a “successfully installed firmware” message. If not, try again. Remember that you must send the router the firmware at a very specific time for it to work.
Now that you have the default Linksys firmware working (and you’ve waited for the power light on the front to stop flashing), you can leave it as is or attempt to upgrade to new firmware. After having the trouble with dd-wrt, I decided that it was time to switch to something different. I chose to switch to Tomato. I am very happy with Tomato! Everything runs faster and better with it. Not to mention it manages connections much more efficiently.