Skip to main content
Back to blog

Running a VPN on Your Router: Coverage Instead of Control

How-To

Running a VPN on Your Router: Coverage Instead of Control article illustration

A VPN tunnel has to be terminated somewhere, and wherever you terminate it is what decides who is covered. Put it on a laptop and the laptop answers for itself. Put it on the router and the answer is given once, for everything on the network behind it.

That is a trade rather than an upgrade, and both halves of it are worth seeing before you move anything.

What moves when the tunnel moves

The router becomes the peer. Your devices carry on speaking to their default gateway in the clear, exactly as they did before, and the router holds the private key and does the encrypting on the way out.

So the thing you are configuring is a route, not an application preference. WireGuard’s own account of its routing makes the distinction concrete: the tunnel is an ordinary network interface, and “when sending packets, the list of allowed IPs behaves as a sort of routing table, and when receiving packets, the list of allowed IPs behaves as a sort of access control list”. A list of destinations decides what enters the tunnel. No application sits in the loop to be switched on or off.

None of this is a workaround. The project describes WireGuard as “designed as a general purpose VPN for running on embedded interfaces and super computers alike”, and says it is suitable for “both small embedded devices like smartphones and fully loaded backbone routers”. Consumer hardware is inside the intended range rather than stretched past it, which says something about the design and nothing about the specific router on your shelf.

Some devices have no setting to change

A television, a games console, a smart speaker: where a device has no VPN client of its own, there is no menu to go to. Moving the tunnel one hop upstream is the placement that reaches those devices, and it reaches them precisely because they do not have to know about it. They keep handing traffic to the same gateway address.

OpenWrt, whose documentation covers running a router as a VPN client, states the first goal of that setup plainly: “Encrypt your internet connection to enforce security and privacy.” Its goal list carries a second item that is easy to skip past, because it runs the other way: “Access your LAN services remotely without port forwarding.” The same interface that carries your network out can carry you back in, which is a second job for one piece of configuration and worth knowing the hardware does both.

What you give up is the per-item decision

On a device the choice is made app by app, and the per-app version of the same decision covers what that buys you. Behind a router, everything leaves by the same exit unless you go and build the routing rules yourself.

That cuts in both directions. A service that objects to traffic arriving from a VPN now objects for the whole network at once, rather than for the one machine you chose to route that way. A device you would happily have left alone is covered whether it benefits or not. And there is one exit for all of it, so the network appears wherever the tunnel ends, including on the devices for which that is a nuisance rather than a feature.

The reverse is the reason to do it. You configure it once, on one piece of hardware, and a device joining next month inherits the arrangement without anybody setting it up.

Each address family is named separately

This is the part that slips quietly, and it is worth more care than the rest of the configuration put together.

OpenWrt’s documented peer configuration does not use a single entry meaning everything. It adds two to the allowed list, 0.0.0.0/0 and ::/0, and gives the tunnel interface an IPv4 address and an IPv6 address of its own. Its testing step matches that shape: routing is verified with traceroute and traceroute6, two commands rather than one, and its troubleshooting reads both ip rule show and ip -6 rule show.

The reason there are two is in WireGuard’s description of the list. It notes that 0.0.0.0/0 “is a wildcard”, and that “any combination of IPv4 and IPv6 can be used, for any of the fields”. The wildcard is wide, and it is wide within one family.

The inference is mine rather than either project’s, and it follows from WireGuard’s own comparison of the allowed list to a routing table. A list naming the IPv4 wildcard alone installs an IPv4 default route into the tunnel and nothing for IPv6. Traffic in a family the list did not name is not refused at the tunnel, because it is never offered to the tunnel. It goes out the way it was already going. What that then exposes to your provider is covered in what reaches your provider when traffic skips the tunnel, which treats it as one of the standard ways traffic gets around a VPN.

The router-specific part is the blast radius. On one laptop a missing address family is one machine’s traffic. On the router it is the television, the console and every phone on the network, and the devices that cannot be configured are the same devices that cannot tell you anything is wrong.

So test for it rather than assuming. Our Network Leak Check answers this particular question: alongside the visible IPv4 address, the provider it is attributed to and an approximate location, it reports whether a publicly routable IPv6 address of yours is on display outside the tunnel. Its name is the limit of its scope. It is a Network Leak Check, so read the IPv6 line as the answer here and do not read it as an audit of which resolvers your network is using, which it does not claim to be.

A dropped tunnel is a firewall question here

When the handshake stops, something has to decide what your traffic does next. On a device, the feature built for that moment is a named setting you can turn on. On a router no such switch is waiting: what happens depends on whether your firewall still leaves the network a path to the plain upstream connection.

OpenWrt takes a position on arranging that, and it is a position about trust rather than a promise about failure. Its guide says to “consider VPN network as public” and to “assign VPN interface to WAN zone to minimize firewall setup”. The tunnel is treated as no more trustworthy than the open internet and filed in the same zone as it, which keeps the rule set small. What that arrangement does the moment a tunnel stops answering is a separate question, settled by which forwarding paths you left in place.

A routing error here is quiet, which is the other reason to check rather than assume. The same guide warns that network addresses “require a netmask or they will default to defining a subnet of /32, and fail to route to the other end of the tunnel”. Nothing announces that. The tunnel simply carries nothing.

Testing coverage device by device

Our VPN check in your browser reports what a site sees of whichever connection you are on, and its own advice for a disappointing result is specific: “If you expected a VPN to be active, reconnect your VPN app, switch server, refresh this page, and compare the result again.”

Read that for what it takes for granted. It assumes a VPN app on the device you are reading from, and with the tunnel held by the router there is no app there to reconnect. The equivalent step is the router’s administration page. The page’s own hedge applies either way: a site “should usually” see the tunnel’s address rather than the one your provider assigned, which describes the common case and not a guarantee.

What the check does give you is an answer about the one device you ran it from, and on this setup that is the useful question. Coverage is the claim being made, so put it to the test more than once. Run it on a phone, then on anything else with a browser, and compare the answers.

OpenWrt’s own troubleshooting list is a sensible place to start when a result disagrees with what you built: check that the keys match, then the tunnel route, then the addresses, then the firewall.

Where the decision lands

If the reason you want a VPN is a device that cannot run one, the router is the placement that answers it, and no device-side arrangement does the same job. If the reason is one application on one laptop, moving the tunnel to the router is a large change bought for a small return, and the per-app choice is what you hand over to get it.

The tunnel is also one entry on a page holding several other things worth settling. The administrator password, whether the interface answers from outside, and how long the firmware will still be maintained all sit alongside it, and the rest of that administration page has a sequence worth following. A tunnel configured on hardware nobody is patching is a tunnel with a date on it.