🛡️ GANVAS VPN
← All articles

VPN on Your Router: The Complete Practical Guide

Most people run a VPN as an app on each device: laptop, phone, tablet. That works, but it has a ceiling. A smart TV, a game console, a smart speaker, a security camera, a robot vacuum — none of them will run a VPN app. And those are often the very devices leaking the most data. The fix is to put the VPN not on the devices, but on the router itself. Then a single encrypted tunnel protects your entire home network at once.

In this guide we’ll cover why and who needs it, which routers are suitable, how WireGuard differs from OpenVPN on a router, and we’ll set up a VPN client step by step. Plenty of hands-on detail — but firmware-agnostic, because the principles are nearly the same everywhere.

Why Put a VPN on the Router

The idea is simple: your router is the single point through which all home traffic reaches the internet. Encrypt the traffic right there, and every device behind the router is protected — even the ones that can’t protect themselves.

Whole-home protection through one tunnel

  • Every device at once. Set up the VPN on the router once, and the laptop, phone, TV, and console all run through the VPN with no per-device setup.
  • Devices with no app. Smart TVs, PlayStation, Xbox, Apple TV, smart speakers, and IoT sensors have no VPN client. Through the router they still get a protected connection.
  • Guests. Anyone who joins your Wi-Fi automatically goes out through the VPN — nothing to explain or install.
  • Always on. The tunnel is up at all times; you never have to toggle it on each device. Forgetting to “press the button” is no longer possible.

When it’s especially useful

  • You have a lot of smart-home gear and don’t want it “phoning home” directly through your ISP.
  • You need access to foreign services on a TV or console where no VPN app exists.
  • You want the whole family protected without configuring every gadget.
  • You value privacy from your ISP: it only sees a connection to the VPN, not which sites you open. More on that in why you need a VPN.

Pros and Cons vs. an App on Each Device

A router VPN isn’t always “better” than an app. Each approach has its place.

Router pros

  1. One setup for everything. No need to install and update an app on a dozen devices.
  2. Covers devices that can’t run a VPN. Often the only way to protect a TV or console.
  3. Always on. The tunnel doesn’t depend on whether someone remembered to flip a switch.
  4. Less battery drain on mobile devices — encryption happens on the router, not the phone.

Router cons

  1. Speed is capped by the router’s CPU. Budget models simply can’t push encryption at gigabit speeds — more on that below.
  2. No per-device flexibility out of the box. If the router VPN is on, everyone goes through it. To send some devices direct, you need selective routing (covered below).
  3. Switching locations is clunkier. Changing the exit country on a router isn’t as quick as a tap in an app.
  4. Not every router can do it. Many stock firmwares have no VPN client at all — you’ll need new firmware or a new router.

In practice the best setup is a combination: VPN on the router for “dumb” devices (TV, IoT), plus an app on the laptop and phone where you want flexibility and quick country switching. For the desktop client, see the VPN for Windows guide.

Which Routers Support a VPN

There are two big camps: stock firmware with a built-in VPN client, and custom firmware that adds one.

Stock firmware with a VPN client

Many modern routers can act as a VPN client out of the box. Look specifically for VPN Client in the specs (not VPN Server — that’s different: a server lets you into your home network from outside, while a client sends your traffic out through a VPN). WireGuard or OpenVPN client support is found on some Asus, Keenetic, and MikroTik models, as well as GL.iNet — the latter are built around VPN scenarios.

Custom firmware

If the stock firmware can’t do a VPN client, install an alternative:

  • OpenWrt — the most flexible open firmware, supports WireGuard and OpenVPN, with a huge list of compatible devices.
  • AsusWRT-Merlin — an enhanced firmware for Asus routers; adds a convenient VPN client and fine-grained routing.
  • DD-WRT — the veteran, running on many old and new models.
  • GL.iNet — both hardware and OpenWrt-based firmware; WireGuard is set up in a couple of clicks, an excellent choice for a travel router.

Important: flashing firmware voids the warranty and, if done wrong, can “brick” the router. Only do it if you understand the steps and have a recovery path.

Why the CPU matters

Encryption is a load on the CPU. A weak router processor becomes the bottleneck: you have a gigabit line but get 80–150 Mbps through the VPN because the CPU can’t encrypt fast enough. The stronger the CPU (and the lighter the protocol), the higher the speed through the tunnel. If speed is critical, get a router with a fast multi-core processor and hardware crypto support. Measure your real before-and-after speed with our speed test.

WireGuard vs. OpenVPN on a Router

The protocol directly affects speed and router load.

  • WireGuard — modern, very fast, and lightweight. Small codebase, efficient cryptography, minimal CPU load. On a weak router, WireGuard delivers noticeably higher speed. For a router, it’s almost always the preferred choice.
  • OpenVPN — time-tested, flexible, and great at blending in as ordinary TLS traffic. But it’s heavier on the CPU, and on a budget router OpenVPN speeds will be lower than WireGuard.

In short: for a home router, choose WireGuard if you have the option; leave OpenVPN for cases where maximum traffic obfuscation matters and the router is powerful enough. A detailed protocol comparison with numbers is in VPN protocols compared.

Step by Step: Setting Up a WireGuard Client on a Router

The exact menu items differ between firmwares, but the logic is the same everywhere. Here’s a universal walkthrough.

Step 1. Get a WireGuard configuration

You need a ready-made config from your VPN provider. That’s either a .conf file or a set of parameters: your private key, the server’s public key, the server address and port (endpoint), the client’s internal IP, DNS, and an AllowedIPs list. A typical config looks like this:

[Interface]
PrivateKey = <your private key>
Address = 10.7.0.2/32
DNS = 10.7.0.1

[Peer]
PublicKey = <server public key>
Endpoint = server.example.com:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25

Step 2. Create a VPN client in the router settings

Find the VPN → WireGuard → Client section (or a config import). If the firmware can import a .conf — just upload the file; it’s the most reliable path. If not, fill in the fields manually.

Step 3. Fill in keys and endpoint

  1. PrivateKey — the client private key from the [Interface] section.
  2. Address — the client’s internal IP (e.g., 10.7.0.2/32).
  3. Peer PublicKey — the server’s public key.
  4. Endpoint — the server address and port (server.example.com:51820).
  5. AllowedIPs0.0.0.0/0, ::/0 so all traffic goes through the VPN. (This is also where selective routing is done — see below.)
  6. PersistentKeepalive25 seconds so the connection doesn’t “fall asleep” behind NAT.

Step 4. Set the DNS

Enter the DNS server from the config (often the tunnel’s internal address like 10.7.0.1, or the provider’s DNS). This is critical against DNS leaks — there’s a dedicated section below.

Step 5. Enable kill switch / block on drop

If the firmware supports it, turn on an option like Block routed clients if tunnel goes down or Kill switch. Then if the tunnel drops, your devices won’t spill out onto the open internet directly through your ISP — they simply lose access, which is safer.

Step 6. Bring up the tunnel and verify

Enable the client and wait for a successful handshake. Then, from any device behind the router, open the VPN check and confirm that the VPN server’s IP is shown, not your real one. Run a WebRTC test too.

Selective Routing (Split Tunneling) on the Router

Often you don’t need to send absolutely everything through the VPN. Your bank may block logins from a foreign IP, local streaming is faster direct, and games run better without the extra hop. Selective routing solves this.

By device

In Merlin, OpenWrt, and many stock firmwares you can set rules for which devices (by IP or MAC) go through the VPN and which go direct. For example: TV and console through the VPN, work laptop bypassing it.

By domain or route

A finer option is to route only specific domains or subnets through the VPN by adding the needed ranges to AllowedIPs or via policy-based routing. This way you can send, say, only foreign streaming services through the VPN while keeping the rest of your traffic local and fast.

Rule of thumb

  • “Dumb” devices (TV, IoT) and anything you want hidden from your ISP — through the VPN.
  • Banking, local government services, latency-sensitive games — direct.

DNS and Leak Prevention on a Router

A router VPN is useless if DNS queries leak around the tunnel: your ISP still sees which sites you open. That’s a DNS leak.

How to avoid a DNS leak

  1. Set the DNS from the VPN config on the router itself; don’t leave the ISP’s DNS.
  2. Disable the ISP DNS handed out over DHCP on the WAN interface, if the firmware allows.
  3. Stop devices from using their own DNS. Some smart devices hardcode, for example, 8.8.8.8. Ideally, redirect (DNAT) all DNS traffic (port 53) to the tunnel’s DNS.
  4. Don’t enable third-party DNS services that bypass the VPN without understanding the consequences.

After setup, always verify the result: the mechanics of leaks are covered in what is a DNS leak, and a quick practical browser test is the WebRTC test.

Double VPN, Tuning, and Troubleshooting

Router + device (double protection)

You can combine a VPN on the router with a VPN app on the device. Traffic is then encrypted twice and exits from different points. It’s stronger for privacy, but speed drops and latency rises. Suitable when privacy matters more than speed.

Performance tuning

  • MTU. The most common source of trouble. Because of tunnel overhead, the default 1500 MTU is sometimes too big, and large packets start dropping: pages “hang,” speed sags. For WireGuard, try lowering MTU to 1420, and if problems persist, lower still — to 1380 or 1280.
  • PersistentKeepalive. A value of 25 helps keep the connection alive behind NAT and stabilizes the handshake.
  • Server choice. The closer the VPN server geographically, the lower the latency and the higher the speed.

Common problems

  • No handshake. Check that the keys are correct, the endpoint and port are right, and that the router lets UDP out on that port. Sometimes an ISP or firewall blocks the needed port — try another.
  • Slow speed. You’re most likely hitting the router’s CPU limit, or using OpenVPN instead of WireGuard. Switch to WireGuard, pick a nearby server, and check the router’s CPU load. Measure with the speed test.
  • Pages load halfway / hang. A classic symptom of the wrong MTU — lower the value step by step.
  • Some sites unreachable. A foreign IP may be the issue — set up selective routing to send those resources direct.

How GANVAS Fits In

A router specifically needs a WireGuard config — most routers don’t speak exotic protocols, but nearly every one with a VPN client understands WireGuard.

With GANVAS you can export your own WireGuard config for free (as well as VLESS — for desktop and mobile clients) and use it anywhere: laptop, phone, and router. For a router, take the WireGuard config, paste the keys, endpoint, and DNS using the steps above — and your entire home network ends up protected by a single tunnel.

You can start with a free VPN: get a config, test it on a device (for example, via the VPN for Windows guide), then carry the same approach over to your router. If you’re choosing between services, take a look at the comparison.

Running a VPN on your router is one of the most reliable ways to protect the whole home at once. Set it up once, and the TV, console, smart devices, and guests automatically go online through an encrypted tunnel. Try GANVAS VPN: fast servers, export of your own WireGuard configs, and DNS leak protection.