Updated by Bertel King, Jr. on 05/15/2017
You’ve replaced the operating system on your computer and on your phone, but what about your router? If you salivate at the idea of turning your router into an SSH server, VPN, traffic-shaping system, or a BitTorrent client — consider OpenWrt.
OpenWrt is an embedded Linux distribution that can be installed on various routers. OpenWrt has a web interface, and it may be more stable than your hardware’s default firmware. If you find yourself having to restart your router every few days because it’s become bogged down, you’re a candidate for OpenWrt.
With privacy concerns stemming from cloud computing and Internet of Things adoption, the OpenWrt community has grown enough to have hosted not one, but two summits dedicated to the project. You could be the next person to fall in love with tinkering with their router.
Uses for OpenWrt
If the idea of having a modular Linux distribution available on your router doesn’t excite you with all the possibilities, you may be reading the wrong article. But we’ll give you a list of the cool things you could do with OpenWrt , aside from having it function as a router:
- Use the SSH Server for SSH Tunneling: OpenWrt includes an SSH server so you can access its terminal. If you expose the SSH server to the Internet (be sure to secure it with key-based authentication instead of a weak password), you can access it remotely and use SSH tunneling to forward your traffic over the encrypted connection. This allows you to securely access websites from public Wi-Fi and access websites that can only be accessed in your home country while travelling abroad.
- Set Up a VPN: SSH tunneling works similarly to a VPN in many ways, but you could also set up a proper VPN on your OpenWrt router.
- Install a BitTorrent Client: With some sort of network-attached storage or a router with an integrated USB port and an attached USB storage device, you could use your router itself as a BitTorrent client.
- Run Server Software: OpenWrt’s software repositories contain packages that allow it to function as a web server, IRC server, BitTorrent tracker, and more. You’re probably already using a router, so why not have that same router function as a server? For starters, routers require much less power than computers.
- Perform Traffic-Shaping and QoS: OpenWrt allows you to perform traffic-shaping and quality of service on the packets travelling through your router, prioritizing certain types of traffic. You could even prioritize traffic going to specific computers, de-prioritizing traffic going to other computers.
- Create a Guest Network: OpenWrt’s wiki contains instructions for setting up a special wireless network for guests, one that’s separate from your main network for security purposes. You can even throttle the guest network’s speed.
- Capture and Analyze Network Traffic: You can use tcpdump to log all the packets travelling through your router to a network share and open the file with a tool like Wireshark to analyze your network’s traffic.
This isn’t a complete list, not by a long shot – but it should get you thinking about what’s possible with OpenWrt. It’s an embedded Linux system with a wide variety of software packages available for it, and in many ways it’s as flexible as a computer running Linux — although its hardware is much more constrained.
OpenWrt was originally developed for the Linksys WRT54G, but it now supports many more router models. You can find a list of supported hardware on OpenWrt’s website.
You’re about to replace your router’s built-in firmware with the OpenWrt Linux system, akin to flashing a custom ROM to your smartphone. The wiki details four different ways to install OpenWrt on your router.
If you’re lucky, the process is as straightforward as selecting a file and hitting a the upgrade button. If not, you may need to access your router’s bootloader via an ethernet port or serial port and get more hands-on.
The Terminal & Web Interface
Once OpenWrt is installed, you can access its BusyBox shell using an SSH client like PuTTY on Windows or the ssh command built into Linux and Mac systems. Busybox is a common shell used on embedded Linux systems, and OpenWrt includes common programs like the vi text editor for editing files. Like other Linux systems, you can run various scripts on it and set up cron jobs to perform actions on a schedule.
OpenWrt uses the opkg package manager to install packages from its repositories, which contain thousands of packages. It also uses the UCI (Unified Configuration Interface) for configuring your system. The OpenWrt wiki has all the information you should need.
You don’t really need to know all of this, however. OpenWrt includes LuCI, a web interface for configuring your OpenWrt router. The web interface contains a variety of different configuration pages, including a package manager page that allows you to browse, search, and install available packages. The number of packages you can install depend on the storage space available on your router. There’s nowhere near enough room to install everything. However, OpenWrt’s modular nature allows you to choose which features you want installed and assemble your own router operating system.
Some software packages also have LuCI configuration pages, allowing you to easily configure them after installing them. Note that not all software available for OpenWrt has a LuCI interface, so you may have to get down-and-dirty in the terminal when configuring some software.
Does Your Router Need OpenWrt?
OpenWrt isn’t the ideal solution for everyone. Most people will be happy with their router’s default firmware. Others will want a drop-in replacement firmware like DD-WRT. OpenWrt is more flexible, but if you just want a web interface with more features, you’re probably better off with another replacement router firmware.
Have you ever used OpenWrt or any other third-party router firmwares? What do you use them for? Leave a comment to share your experiences and any clever tricks you’ve picked up.
Image Credit: Mayuree Moonhirun via Shutterstock.com