Raspberry Pi WireGuard Gateway for MSP Remote Access: Reach the Whole LAN Without Touching the Router
Use a Raspberry Pi as a WireGuard gateway when the client's router cannot run WireGuard. Browser RDP and SSH to the whole LAN, no router changes.
Every MSP has the client site where the router is the problem. It is the ISP-supplied box with a locked admin page, a hardware firewall from a vendor whose VPN options do not include WireGuard, or an old MikroTik still on RouterOS v6 (MikroTik lists WireGuard among the features that arrived with v7). You cannot replace it this week, the client will not pay to replace it, and you still need to reach the server, the NVR and the switches behind it.
You do not have to touch the router at all. Put a Raspberry Pi on the LAN, make it the WireGuard gateway, and leave the existing router doing exactly what it does today. This post covers how that works, what the Pi actually does to the traffic, and what to watch for.
Why a Pi Works as a Site Gateway
WireGuard has been part of the mainline Linux kernel since 5.6, so any current Linux distribution has it built in, and Raspberry Pi OS is Debian-based, so installing the tools is a single apt command. The hardware is enough for remote access traffic: both the Raspberry Pi 4 and the Raspberry Pi 5 have a Gigabit Ethernet port, and both can be powered over Ethernet with the official add-on PoE HAT (PoE+ HAT on the Pi 5). On a site with a PoE switch, that means one cable and no wall plug.
The Pi is not routing the client's internet traffic. It only carries your sessions into the LAN, so a small board sitting on a shelf beside the switch is plenty.
What the ProxyLink Gateway Script Does
In ProxyLink you create a Router / LAN site, enter the LAN subnet, and choose Linux Gateway as the platform. ProxyLink generates gateway-setup.sh with the tunnel keys already filled in. Copy it to the Pi and run it as root:
scp gateway-setup.sh [email protected]:~ssh [email protected] "sudo bash gateway-setup.sh"
The script does four things:
- Installs WireGuard and iptables using whichever package manager it finds (apt, dnf, yum or pacman).
- Writes the tunnel config to
/etc/wireguard/proxylink.confwith mode 600. - Enables IP forwarding and NAT. Forwarding is made persistent in
/etc/sysctl.d/99-proxylink.conf, and a MASQUERADE rule is added on the Pi's LAN interface. The rules are saved so they survive a reboot. - Starts the tunnel as the systemd service
wg-quick@proxylink, enabled at boot.
The tunnel dials outbound to ProxyLink and holds itself open with a keepalive. Nothing listens on the internet, so you need no port forward, no static IP, and it works behind CGNAT.
Why the Router Needs No Changes
This is the part that usually trips people up when they try a DIY version. When the Pi is just another host on the LAN, a device that receives a connection from the tunnel replies to its default gateway, which is the existing router. That router has never heard of the VPN range, so the reply goes nowhere. The handshake looks perfect and nothing works.
The MASQUERADE rule fixes it. Traffic arriving from ProxyLink leaves the Pi with the Pi's own LAN address as its source, so every device replies to the Pi, and the Pi sends it back through the tunnel. No static route on the router, no change to DHCP, no config on the devices.
Two practical consequences:
- Devices see the Pi's IP as the client. If an NVR, a printer or a switch has an IP allowlist for its management page, add the Pi's address to it. Give the Pi a DHCP reservation so that address never changes.
- Use the wired port. The script picks the interface that carries the default route as the LAN side. Plug the Pi in by Ethernet and leave Wi-Fi off so there is no ambiguity.
VLANs Behind the Same Pi
If the site has a camera VLAN or a PBX VLAN that the main LAN can already route to, declare those subnets on the same tunnel. The Pi forwards to them through the existing router, so one Pi covers the whole site. Install the ProxyLink management agent on the Pi (the setup page shows the one-line command) and each VLAN gets its own translated address range automatically, so overlapping client subnets never collide. The agent also lets you check tunnel health and pending apt updates from the dashboard without an SSH session.
What You Get Once It Is Up
- Browser RDP to Windows servers and PCs on the LAN, no client install.
- Browser SSH and VNC to switches, Linux hosts and the Pi itself.
- HTTP and HTTPS proxy links to NVR, NAS, printer and UPS web interfaces.
- TCP and UDP links for anything else, including SIP on a PBX VLAN.
Access requires a ProxyLink login, and each client site is isolated from your other clients' sites.
Keep the Pi Boring
Treat it like any other piece of client infrastructure: label it, note it in your documentation, give it a reserved IP, and keep it patched. It holds the keys to the site, so lock down SSH on it the same way you would on a server.
Try ProxyLink free at app.proxylink.dev, no card required, free during early access. Setup guides for Linux gateways, MikroTik, pfSense and OPNsense are in the docs. Related: Remote Access Without Port Forwarding.