Hack a Linux router for fun and profit

Hack a Linux router for fun and profit

Summary: Why put up with the failure of your vendor to provide updates for your broadband router's firmware? Just do it yourself: Linux-style.

SHARE:

There always comes a time when vendors move their support resources from your slightly aged product to their brand-spanking new products. The hardware is fine and capable of doing so much more, but is shackled by the vendor's software.

In short, if you haven't considered user-created firmware by this stage, you really should.

By way of example, the subject shall be my venerable Linksys WRT54G router that I purchased many years ago with the firm knowledge that the firmware was upgradeable and could add features to it that Linksys would not.

Specifically, this was the ability for the router to act as a wireless networking client rather than an access point; essentially it is a movable wireless card on steroids — and the ability to play with its innards via standard Linux commands was attractive.

If you're looking to flash your firmware, the following list is required:

  • An ability to accept possible "bricking" of your device;
  • Technical know-how: if you can't use Linux then don't put it on your router; and
  • Patience: Murphy's Law seems to dominate exercises such as firmware upgrades, if you expect it to be up and working in five minutes, then you are in for a truckload of disappointment.

Originally I used the now legacy White Russian builds from the OpenWrt project and this served me well for many years, until a new ADSL modem appeared on the scene. Trouble with WPA2 authentication appeared and I decided it was time to update my third-party firmware.

Currently the OpenWrt project has replaced White Russian with Kamikaze, so it was the natural upgrade path. Unfortunately, it has taken the Linux motif and structure one step too far for my tastes and the WPA support is still a pain at best.

FreeWRT became an option, but as it is a fork of OpenWrt, I was looking for real alternatives.

Enter DD-WRT (whose wiki is great, but the root page is less than useful), and I am a happy wireless camper again. This is still Linux-based firmware, but unlike the other firmware I tried, all configuration is intended to be performed via the web interface, meaning that you can leave your Linux knowledge at the door.

DD-WRT has an extraordinary number of features packed in, and includes the impressive Wiviz wireless visualiser.

Wiviz provides a great visualisation of the available
wireless nodes around you
(Credit: Chris Duckett/ZDNet.com.au)

The bottom line: as far as router third-party firmware is considered, I have to back DD-WRT 110 per cent. No other firmware comes close in terms of ease of use and feature set.

What is your experience with firmware replacement? What projects would you recommend to others? Let us know in the talkback.

Topics: Open Source, Hardware, Networking, Security, Wi-Fi

About

Chris started his journalistic adventure in 2006 as the Editor of Builder AU after originally joining CBS as a programmer. After a Canadian sojourn, he returned in 2011 as the Editor of TechRepublic Australia, and is now the Australian Editor of ZDNet.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

11 comments
Log in or register to join the discussion
  • DD-WRT forever!

    I want to have DD-WRT's babies.

    I mean my Linksys does. Yeah, that's it
    anonymous
  • Testament to the Sad State of Wireless Interfaces

    I think the very fact that anyone feels inclined to hack wireless functions is testament to the poor state of most wireless functions.
    Under WinXP my home WiFi keeps dropping out at a distance of 5m! I suspect too many homes around are on the same channel, but does my WinXP WiFi interface tell me of such packet collisions? No, it just drops the link.
    I LOVE Ubuntu, but the lack of easy WiFi driver install is SUCH a pain, that I may need to revert to WinXP till XP is truly dead.
    With WinXP at least the driver is there. WinXP keeps asking you to re-supply the WPA key heaps of times, as if it can't remember a thing. Plus WinXP never has a clue as to the WiFi networks you DO want to connect to versus those you don't.... it supposedly 'ranks' them, but in practice fails to honour such rankings and keeps trying to connect to networks you've previously disconnected from. Instead of "Connect" and "Disconnect" you also need "Always Connect to this one" and "Never connect to this one", and to have those network names saved somewhere....
    Why, Oh Why can't those in WiFi land come up with robust software solutions.
    anonymous
  • There are commercially viable hacks too.

    Years and years ago I hacked the firmware for Linksys NSLU2. A computer the size of a deck of cards, sold as a NAS server, but usable for just about anything. I also hacked on PVRs, digital TV and digital media and decided to combine all of these to design a way of putting a digital TV PVR on the network and hooked up to the internet. That led to plenty of excited people, including a few at a company called IceTV.

    As a result, IceTV commissioned me to develop a custom wireless router that could be used to deliver their EPG product (and other services) to Topfield PVRs. I chose the Netgear WGT634U which proved to be a very poor wireless router, but an excellent hardware platform for the project. The end product was the IceBox and it received the blessing from Netgear Australia. The IceBox customised router caused a sales spike in Netgear WGT634U in Australia. Unfortunately, Netgear was having trouble with the quality of their own firmware and decided to discontinue the product globally.

    But, why stop when you're onto a good thing? It was clear that there was a need for a customised wireless router to hook up people's entertainment to the Internet. I repeated the effort again, creating IceBox2, which was based on an Asus router.

    So, that's my story of hacking Linux routers for profit. :-)
    anonymous
  • Dude ubuntu supports tons of wireless devices

    Dude ubuntu supports tons of wireless devices if you want you can ask on the forums for help.

    More to the point. i like openwrt better than dd-wrt. I like using ntop and flows from my openwrt so i can see what happens on my network. ^^
    anonymous
  • That's the problem

    That's the problem, there are too many people out there asking for help. I have a Broadcom based PCI that is flakey and requires NDISWrapper (which I hate) and three different Atheros chipsets in various stages of support, from none to WEP being the only thing reliable (and dangerous).

    The only trusty weapon I have is a Netgear WG111v2 USB that always works, always.

    Until there is better support, out of the box (or even through each official repository) for full WPA2 + AES on more devices without compiling or using Windows drivers AND the devices are Rock Solid during use then the support is still sketch.

    Don't think I am a hater, I love Linux, and I know the drivers are Windows focused or even need reverse engineering (and I understand the effort required to get where we are), but it still has a ways to go before I would say it supports Tons of wireless devices.
    anonymous
  • Wireless Vendors' IPRs Limit Driver Availability

    Ubuntu (out of the box) auto-finds virtually ALL hardware, and installs reasonable drivers for such hardware... and in the main they work till the device fails. However, virtually NONE of the WiFi mini-cards inside PCs or laptops are supported. The reason is that companies like Broadcom (www.broadcom.com) which is a huge supplier to all major laptop suppliers REFUSES to allow its firmware to be used. Broadcom supplies drivers for M$ to redistribute at will, yet with Ubuntu and other Linux versions, you need to download and then compile special software which seeks to 'scrape' the firmware and then attach other Linux code to develop a driver. We need to have drivers just available as part of the distribution, not where you need to download and compile, or try NDISWRAPER or other 'clumsy workarounds'.

    And frankly, Linux is now of such market share that someone should simply post the full drivers somewhere for download, and if Broadcom et al sought to stop that, it would be one hell of a fight, and I think Dell, HP etc would be on the side of saying "Yep, if they bought the device with that mini-card inserted, they have a RIGHT to be able to operate an OS of their choice on it."
    anonymous
  • Sveasoft Alchemy

    Before all the fallout with Sveasoft locking up the code and requiring registration, I installed Sveasoft Alchemy on my WRT54G. It's worked well so I haven't messed with anything else, but if I ever change it, I was looking at DD-WRT or X-WRT (OpenWRT w/ some web interface enhancements).
    anonymous
  • Tomato Linux

    I've been using Tomato Linux for a year on my wrt54gs v1.1 and very happy with it. no problems.

    http://www.polarcloud.com/tomato
    anonymous
  • Who you gonna trust?

    The problem with Tomato is that it includes proprietary software. I've been bitten too many times by proprietary vendors who later go bust, particularly smaller ones. I'm not willing to devote my time to something that may not be here tomorrow, and will surely go away someday -- unless it's open-sourced.

    Likewise dd-wrt seems to have a history of flirting with closing it's code.

    I finally settled on openwrt. It seems to have a fine web interface for those interested in such things. What I want out of a platform is one that will leverage the time I spend learning how to use it. First and foremost that means a FLOSS license through and through, because a true FLOSS project lives, and grows, forever; or at least until a markedly better FLOSS project comes along.
    anonymous
  • I switched to DD-wrt and love it.

    I can only say that the upgrade from linksys wrt54gs firmware to dd-wrt firmware was worth it.

    My real problem with dd-wrt is finding out knowing which routers of the N generation support are supported with dd-wrt.

    To be frank dd-wrt spoils you so much with features you never want to go back to proprietary again.
    anonymous
  • Tomato rocks

    I've used Tomato on about a dozen installed routers. What better way to provide encrypted ssh tunneling for remote support on the cheap! If only Linksys hadn't wrecked the WRT54G after version 4. Paying extra for the WRT54GL kind of blows.
    anonymous