Claiming My Free OpenVPN clients
Tags: homelab, networking
Published: 2020-08-12 09:19:59

---
title: Claiming My Free OpenVPN clients
published: true
date: 2020-08-10 00:00:00 UTC
tags: homelab,networking
canonical_url: https://flyingnobita.com/posts/2020/08/10/installing-ddwrt
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/o78tr0bm5qvm4v1lm4pe.jpg
---

My NordVPN subscription allows up to 6 devices connected simultaneously. This isn’t enough and has caused some of my devices to drop their VPN connections when new devices come online.

Luckily there’s a trick I can use on my home router to overcome this.

## Table of Contents 

1. [Installation](#installation)
2. [Not What I Expected…](#not-what-i-expected)
3. [Broly To The Rescue](#broly-to-the-rescue)
4. [Reinstalling and Configuring OpenVPN](#reinstalling-and-configuring-openvpn)
  1. [Split Tunneling](#split-tunneling)
5. [Conclusion & Caveats](#conclusion--caveats)

Most VPN services give you gives you several methods of connecting to their VPNs. Besides native apps for Windows, macOS, iOS, etc., most also allow you to connect with OpenVPN.

You can check your router setup to see if it supports OpenVPN _Client_ (OpenVPN _Server_ is for hosting your VPN which doesn’t apply here).

Although the new D-Link DIR-882 router that I bought [recently](/posts/2020/06/06/home_server_2) doesn’t natively support OpenVPN clients, DD-WRT does!

[DD-WRT](https://dd-wrt.com) is a popular custom firmware that supports [a large collection of routers](https://dd-wrt.com/support/router-database). It adds a lot of functionality to your router without any additional costs. If you don’t like it, you can always reinstall the stock firmware (useful if you need to return the router to the manufacturer for repair/warranty purposes as they probably don’t accept your router with custom firmware installed).

One of the many features that DD-WRT supports is OpenVPN Clients with split tunnelling (which I will discuss later on in this post).

# Installation

After seeing a [success story](https://sushantbhosale.com/install-dd-wrt-d-link-dir-882/) and more people posting on the DD-WRT forum [here](http://forums.dlink.com/index.php?topic=73607.0) from other people with the same router model as mine, I was confident and followed the instructions. Some caveat while installing:

1. when booting the router into crash recovery mode, the LEDs blink red in a few seconds and is ready
2. plug the ethernet cable from the computer to a LAN port on the router during crash recover mode
3. as factory-to-ddwrt.bin and the dlink-dir882-a1-webflash.bin are both on the latest version, after uploading factory-to-ddwrt.bin, there is no need to upgrade the firmware with dlink-dir882-a1-webflash.bin

# Not What I Expected…

![DD-WRT Screen](https://res.cloudinary.com/flyingnobita/image/fetch/c_limit,f_auto,q_auto,w_768/https://flyingnobita.com/assets/images/posts/installing_ddwrt__ddwrt.png)<figcaption><p>DD-WRT Screen</p>
</figcaption>

I was pretty excited to see DD-WRT up and running with very little efforts and hiccups. Unfortunately, the smile on my face disappeared just as quickly.

The first thing I did was to set up the SSID for wireless access. This was a little painful as the setup page would randomly freeze up. Worse still, my devices have trouble finding the new SSIDs and staying connected to it. I tried changing some of the _Advanced Settings_ like _TX Power_ and _Gain_ but it didn’t work and I had no idea what I was doing.

On the verge of reverting to stock firmware and running the thoughts of buying an additional router that supports OpenVPN in stock, I searched online for others with similar issues.

# Broly To The Rescue

Although I couldn’t find anyone experiencing the same problems as me, I did find another version of the firmware based on DD-WRT specifically for my router model. This [“Broly” version](https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1095476) was last updated on Aug 3, 2020, whereas the “official” DD-WRT version was updated on Aug 6, 2019! The Broly version has a lot of features added in and existing ones updated, with a lot of people giving positive comments.

![Broly's 1st Post](https://res.cloudinary.com/flyingnobita/image/fetch/c_limit,f_auto,q_auto,w_768/https://flyingnobita.com/assets/images/posts/installing_ddwrt__broly_rants.png)<figcaption><p>Broly’s 1st Post</p>
</figcaption>

![Broly's Changelog](https://res.cloudinary.com/flyingnobita/image/fetch/c_limit,f_auto,q_auto,w_768/https://flyingnobita.com/assets/images/posts/installing_ddwrt__broly_changelog.png)<figcaption><p>Broly’s Changelog</p>
</figcaption>

Initially, I was a bit baffled from the “rants” on OP’s first post, but seeing the frequent updates in the changelogs was reassuring.

# Reinstalling and Configuring OpenVPN

Installing the Broly firmware uses the exact method as installing DD-DRT.

Upon installation, I was greeted with a similar layout as the original DD-WRT but I noticed that the fields and options are more updated. I was no longer experiencing any crashes and my devices were able to connect to the new SSID. Compare to the stock D-Link firmware, there were a lot more tabs filled with new features.

![DD-WRT OpenVPN Client Configuration](https://res.cloudinary.com/flyingnobita/image/fetch/c_limit,f_auto,q_auto,w_768/https://flyingnobita.com/assets/images/posts/installing_ddwrt__ddwrt_openvpn.png)<figcaption><p>DD-WRT OpenVPN Client Configuration</p>
</figcaption>

I found the OpenVPN page and configured the settings accordingly. All the devices connected were having its connection routed through the VPN. Even devices that I wasn’t sure would work over the VPN, like my smart TV, worked flawlessly.

## Split Tunneling

With traffic from all my devices going through the VPN, I can no longer access the services that I exposed from outside my home. I need a way for the machine that hosts my exposed services to skip the VPN.

This is where split tunnelling comes in. In the OpenVPN Client section of DD-WRT, there is a field called _Policy Based Routing_. You can enter a CIDR IP range here and these IPs will have their traffic bypass the VPN. Simple.

# Conclusion & Caveats

Now that I have reduced the VPN connections of all my home network devices to 1, I have 5 connections available for my mobile devices.

Overall I was fairly pleased with the overall installation and configuration process. It was fairly easy and straight forward.

However, there’re still some things that I need to work out:

1. The internet speed according to internet speed test websites (e.g. Speednet.net, fast.com) has dropped dramatically. It went from ~700Mbps to ~20Mbps. That’s **~97% speed reduction**! Interestingly, I haven’t noticed too much of a speed difference in everyday surfing. And I am still able to stream 4K videos from YouTube.
2. I can’t access the USB drive that I plugged into the router. I don’t know if it’s because it was windows formatted or if I need to do further settings in DD-WRT (I’ve already got it to auto-mount)