flash a router with OpenWRT
flash a router with OpenWRT

 Learn the right way to flash a router with OpenWRT with this guide to get your VPN service up and running. 

In the second part of this three-part article, we discuss OpenWRT and how to get your router prepared so that you can reap the full benefits of adding VPN tunneling services to your network. To learn more of the basics of VPNs, refer to the first part of this article. If you’ve already flashed your router with OpenWRTand are having issues, check out part three where we go over troubleshooting or reach out to us.  

If you’ve been interested in the benefits of VPN tunneling, keep on reading to learn how to flash a router with OpenWRT. 

What is OpenWRT? 

The most common use for OpenWRT is as an OS for routers. Where stock firmware can often fall short, OpenWRT offers better customization through its extensive features for optimizing network traffic and configuring common network-related features. 

OpenWRT has become more popular for its stability and reduction in lag. As it relates to VPNs, It allows users to bypass simultaneous connection limitations while also encrypting data from Smart TVs and gaming consoles, which typically do not fully support VPNs.  

Why do I need to flash my router? 

Flashing your router simply means installing new firmware on it. To flash a router with OpenWRT can give you more functionality and possibly improve performance. To learn more about OpenWRT, refer to the first VPN post or check out this video below. 

 

How to Flash a Router with OpenWRT for VPN Services

Ready to begin? We have all the steps outlined in the images below. But before that, in order to get the right firmware for your device, use this firmware selector: https://firmware-selector.openwrt.org/  

First time setup requires you to use the factory image file. NOTE: Use “system upgrade” going forward once factory image is installed. 

 

For the OpenWRT compatible Linksys routers: 

  • Go to the connectivity page 
  • Select factory wrt image file 

 

 

Use the following URL to connect to the newly flashed router: 

192.168.1.1/cgi-bin/luci  

OpenWrt – LuCI 

OpenWrt setup with NordVPN | NordVPN support 

 

The following settings are applied: 

  • openvpn-openssl 
  • ip-full 
  • luci-app-openvpn

Can change my virtual location on the fly? 

No, but you can change it manually on the router by choosing your preferred location. NordVPN will optimize the best VPN server. Download UDP or TCP configuration files, whichever you prefer. (UDP is faster, TCP is more reliable). We recommend UDP. You’ll find the server hostname under the server title. 

https://nordvpn.com/servers/tools   

 

Under the “OVPN configuration file upload” section, name the VPN connection in the “Instance name” field (we have named it “nordvpn_us”.) After that, click on the “Browse” button, locate the downloaded server file and click “Upload”. 

1. Upload 

2. Choose file and provide instance name 

3. Edit instance once uploaded

 

4. In the “OpenVPN instances” section, click the “Edit” button next to the instance you have just created.

 

In the lower field, enter your NordVPN service credential username and password into separate lines (as seen in the image above). You can find your NordVPN service credentials (service username and service password) in the Nord Account dashboard.

5. Click Set up NordVPN manually. NordVPN – Nord Account

 

6. Click on the “Network” tab at the top of the page and choose “Interfaces”

7. Select the “Add new interface…” button and name it “nordvpntun”. 

 

8. Click on the “Protocol” dropdown menu and choose “Unmanaged”.  

9. In the “Interface” dropdown, enter the name “tun0” at the bottom — custom — field and press the Enter key.

10. Click the “Create interface” and “Save” buttons. 

 

 

11. Choose the “Network” tab at the top again and head to the “Firewall” section.

 

 

12. Click the “Add” button and adjust it as follows:

  • Name it “vpnfirewall 
  • Set the “Input” option as “Reject; 
  • Leave “Output” as “Accept” and “Forward” as “Reject; 
  • Check the “Masquerading” option; 
  • Check the “MSS clamping” option; 
  • From the “Covered Networks” dropdown menu choose “nordvpntun; 
  • In the “Allow forward from source zones” dropdown menu, choose “lan; 
  • Click the “Save” button. 

 

 

13. In the “Zones” section, find the zone named “lan”, and click on the “Edit” button.

14. In the “Allow forward to destination zonesuse the dropdown and check the “nordvpntun” entry.

 

 

15. Once more, click “Network” at the top of the page and then choose “DHCP and DNS” from the dropdown list.

16. In the “General Settings” tab, find the “DNS forwardingsoption and enter NordVPN DNS addresses there. The addresses are: 103.86.96.100 and 103.86.99.100

 

 

17. Go to the “Resolv and Hosts Files” tab, check the “Ignore resolve file” checkbox, and click the “Save & Apply” button. 

 

 

18. Lastly, please head back to the “VPN> “OpenVPN” tab.

19. In the “OpenVPN instances” section, check the “Enable” option next to the NordVPN option in the list, and click the “Save & Apply” button.

20. Click the “Start” button next to the created NordVPN instance to connect to the VPN server. 

 

 

Once you have followed these instructions, you should be connected using the configured connection. To check if you were successful, visit NordVPN’s homepage — the status at the top of the page should say “Protected.

If you wish to disconnect the VPN connection, you can click on the “Stop” button next to the NordVPN option in the “VPN” > “OpenVPN” > “OpenVPN instances” section. 

Bonus Resources for OpenWRT VPN Setup Support

Still curious about VPNs? Check out these other articles:

Set Up Your VPN Service: How to Flash a Router with OpenWRT Summary 

Using a VPN is a great advantage to anyone traveling, working remotely, or living abroad. This quality-of-life upgrade offers users peace of mind with greater security and access to all things previously limited by geolocation. Knowing how to flash a router with OpenWRT can further optimize your VPN service so you can connect anywhere worry-free. 

If you are facing issues with your setup, check out our troubleshooting article in part three of this VPN series, or send us a message to see how we can help.

Leave A Comment