How I doubled my Internet speed with OpenWRT

OpenWRT is a powerful Linux distribution for embedded devices, such as my router, and this is the story of how I used it to double my bandwidth at no extra cost to myself.

How? By doubling the number of Internet connections I have.

My setup

My internet

My internet is through Comcast (unfortunately).

Comcast has an initiative called Xfinity WiFi. When you rent a cable modem/router combo from Comcast (as one of my nearby neighbors apparently does), in addition to broadcasting your own WiFi network, it is kind enough to also broadcast “xfinitywifi,” a second “hotspot” network metered separately from your own.

This hotspot allows Comcast customers to connect with their credentials.

My router

My router is a Buffalo WZR-HP-AG300H. Crucially, this router 1) supports OpenWRT and 2) has two independent radios. I use one of them for my home WiFi network.

My idea

By now, you’ve probably put two and two together.

I use my router’s extra radio to connect to the xfinitywifi hotspot, then load balance my outbound traffic across the connection I pay for and the bonus xfinitywifi connection.

Obviously this is a pretty specific scenario, but if you have:

A hotspot you have credentials for within range A router that supports both OpenWRT That same router has a spare radio

How to set this up

1. Install OpenWRT

Find your router on OpenWRT’s table of hardware and follow the instructions to install it, getting your WiFi and network set up as usual.

2. Install multi-wan software in OpenWRT

Open your router’s web interface and navigate to /cgi-bin/luci/admin/system/packages and install luci-app-mwan3 . This (along with its dependencies) allows you to support multiple internet connections with round-robin load balancing between them (with connection pinning for HTTPS).

3. Authenticate a MAC address with xfinitywifi

The xfinitywifi hotspot requires authentication, not via WPA2 or other normal network security, but with a Comcast login. It remembers this login by way of your MAC address. Unfortunately, it is not very easy to authenticate directly through the router, so instead we will authenticate a MAC address through a computer, then switch the apparent MAC address the router uses.

Generate a fake MAC address. Here’s one: 02:67:1c:16:1f:21 Spoof your MAC address (for your wireless adapter) on your computer. Be sure to find out how to do it on your Linux/Mac/Windows system. Remember to record your old MAC address. With your MAC address spoofed, connect to xfinitywifi and enter your Comcast credentials Disconnect from xfinitywifi and restore your original MAC address

4. Connect the router to xfinitywifi

In your OpenWRT web (LuCI) interface at /cgi-bin/luci/admin/network/wireless , press Scan on your available radio, and select Join Network for xfinitywifi . Name it wan2 and add it to the wan firewall group. Save & Apply your settings.

Now, go to /cgi-bin/luci/admin/network/network/wan2 and go to the Advanced Settings tab. Paste your fake and authenticated MAC address into the “Override MAC address” field. Save & Apply your settings.

5. Prepare mwan3 for a wireless WAN

In your OpenWRT web (LuCI) interface at cgi-bin/luci/admin/network/network/wan/ , click the Advanced Settings tab and enter 10 under Use gateway metric and Save your settings.

At cgi-bin/luci/admin/network/network/wan2/ , click the Advanced Settings tab and enter 20 under Use gateway metric and Save your settings.

In your OpenWRT web (LuCI) interface at /cgi-bin/luci/admin/network/mwan/advanced/networkconfig , you will see your network config file. Paste this section at the bottom, adjusting as necessary with settings from your xfinitywifi connection:

config route 'default_wan2' option interface 'wan2' option target '0.0.0.0' option netmask '0.0.0.0' option gateway '192.168.1.1' option metric '20'

Normally this last step is not necessary, but for some reason mwan3 seems to need it to work with wireless networks.

Submit your changes.

Check it!

Go to cgi-bin/luci/admin/network/mwan and you should see both networks green!

At least you will if you’re the luckiest person ever. More likely you’ll run into problems, check out the mwan docs and Google around.

Another good test is to a website that tells you your IP and refresh several times and ensure you see two different IP addresses.

Good luck!