Anyone who has spent evenings flashing third-party firmware onto a cheap plastic router knows the pattern: the hardware is capable of far more than the vendor shipped, but every feature you add has to fight for a few megabytes of flash and a modest slab of RAM. VPN support has always been the clearest example. OpenVPN on a consumer box was possible, but it was never pleasant. It dragged in a TLS library, a mess of certificate handling, and a userspace daemon that pushed every packet across the kernel boundary twice. On a 200 MHz MIPS core that meant single-digit megabits if you were lucky.
WireGuard changes the shape of that problem, and the interesting part is not the cryptography. It is how well the whole design happens to fit the constraints of small router firmware. These are my notes from looking at it with the eyes of someone who used to squeeze features onto a WRT54G, back when getting 1:1 NAT with dynamic NAPT working on a Linksys WRT54G felt like a small victory worth writing up.
Kernel space is the whole story
The single most important property of WireGuard for a SOHO device is that the data path lives in the kernel. Packets arrive on an interface, get decrypted or encrypted, and move on, without a round trip through a userspace process. On a desktop this is a nice optimisation. On a router with a slow CPU and no crypto offload, it is the difference between a VPN you can route your whole LAN through and a VPN you only enable when you must.
Since Linux 5.6 the module is upstream, which means firmware projects no longer carry it as an out-of-tree patch. For a firmware maintainer this matters more than any benchmark. Out-of-tree modules rot. They break on kernel bumps, they get forgotten in release testing, and they are the first thing dropped when a port to a new SoC gets difficult. An upstream module is simply part of the kernel you already ship.
The footprint is equally friendly. The module itself is on the order of a hundred kilobytes, and the userspace side can be as small as a single tool to set keys and peers. Compare that with the OpenVPN stack, where the binary plus OpenSSL could eat a meaningful fraction of a 4 MB flash chip. On modern 16 MB and 128 MB devices this sounds quaint, but plenty of deployed hardware is still tight, and every kilobyte you do not spend on the VPN is one you can spend elsewhere.
A config model made for tiny systems
WireGuard has no notion of a connection, no handshake daemon that must stay running, no certificate authority, and no state files beyond the interface configuration itself. An interface has a private key. A peer has a public key, a list of allowed IPs, and optionally an endpoint. That is the entire mental model.
For firmware this is a gift. The whole configuration serialises to a handful of lines in whatever config store the firmware uses, whether that is NVRAM variables in the old Broadcom style or UCI files on OpenWrt. There is no daemon to supervise, no restart-on-failure logic, no log file slowly filling the overlay. If the kernel is up and the interface exists, the tunnel works. The box can lose power mid-handshake and come back with nothing to repair.
The allowed IPs list doubles as both routing and access control, which takes a moment to internalise. It is cryptokey routing: a packet will only be sent to a peer if its destination matches that peer's allowed IPs, and a decrypted packet is only accepted if its source matches. In effect every peer carries its own ingress filter. That is a sharper default than most SOHO VPN setups ever had, though it does not replace a real firewall policy. I wrote years ago about firewall settings for a home network, and the core advice has not changed: decide what the tunnel interface is allowed to reach and write that down as explicit rules, rather than trusting whatever the GUI generated.
The parts that still bite
It is not all smooth. A few things reliably trip people up on small routers.
- MTU. WireGuard adds 60 bytes of overhead on IPv4 and 80 on IPv6. If your WAN is PPPoE you have already lost 8 bytes, and the default 1420 interface MTU may still be too big. Symptoms are the classic ones: small packets fine, SSH works, large HTTPS transfers stall. Clamp MSS on the tunnel interface and test with ping and the do-not-fragment bit before blaming anything else.
- NAT timeouts. WireGuard is silent when idle, which is elegant right up until the moment your home connection sits behind carrier-grade NAT and the mapping expires. The persistent keepalive option, typically 25 seconds, exists exactly for this. A router behind CGNAT that must accept incoming tunnel traffic needs it on, and plenty of GUIs still ship it off by default.
- Dynamic endpoints. Roaming is built in, since the tunnel follows whichever source address last produced a valid handshake. But if both ends are on dynamic addresses, at least one side needs a stable name, which puts you back in dynamic DNS territory. The failure mode is subtle: the tunnel works for days, then an IP change on the quiet side strands it until a reresolve. Some firmwares run a watchdog that re-resolves the endpoint hostname on handshake silence, and you want that.
- Time. Handshakes involve timestamps to prevent replay. A router that boots with its clock in 1970 and has not yet reached its NTP server can refuse perfectly good handshakes. Order your init scripts accordingly, or make sure the clock is persisted across reboots.
Old habits, new tunnel
What strikes me most is how familiar the workflow feels. The tinkering we did on 2007-era hardware, tunnelling IPv6 before the ISP offered it, as in the old notes on an IPv6 tunnel from SIXXS on a WRT54G with DD-WRT, was all about coaxing one more protocol through a box that was never meant to speak it. The difference is that WireGuard was designed as if someone had actually watched us do that and removed every sharp edge they saw.
There is an auditable, small codebase, described well in the papers and documentation on the WireGuard project site, and a protocol with no negotiation to misconfigure. There is no cipher suite selection, so there is no page in the router GUI where a user can quietly downgrade their own security. For firmware authors that removes a whole class of support tickets. For attackers it removes a whole class of targets.
If you maintain or merely flash SOHO firmware, the practical advice is short. Prefer a build with the kernel module rather than a userspace Go implementation, which costs you RAM and throughput on weak CPUs. Set the MTU deliberately. Turn on persistent keepalive for any peer behind NAT that must be reachable. Treat allowed IPs as the first filter and your firewall as the real one. And keep notes, because the next person to open the admin page, probably you in eighteen months, will not remember why the keepalive is 25 and not zero.
The surprising conclusion, for those of us who remember fighting OpenVPN onto 4 MB of flash, is that the best VPN protocol for a cheap plastic router turned out to be the one that was not designed around routers at all. It was simply designed small, and small is what this class of hardware has always rewarded.