3-Site WireGuard Hub-and-Spoke VPN Setup | MikroTik Guide
The build: One physical MikroTik office router, two MikroTik CHR virtual routers on separate Proxmox hosts, tied together over WireGuard into a hub-and-spoke mesh — with a correctly calculated MTU from day one instead of the default that breaks on PPPoE.
Most WireGuard write-ups cover a single site-to-site tunnel. Real deployments are rarely that simple — you end up with an office, a datacenter hub, and at least one more remote location, and they all need to reach each other reliably. Here's the topology we built for a 3-location mesh, the exact commands used to stand it up, and the MTU math that avoids the most common cause of intermittent WireGuard packet loss.
The Topology
Hub-and-spoke, not full mesh: every spoke talks to the hub, and the hub routes between spokes. This keeps the peer configuration simple — each spoke only needs one WireGuard peer entry (the hub), and the hub's routing table handles inter-spoke traffic.
SiteDeviceRoleWAN Connection
UAE OfficePhysical MikroTik hAP ax³SpokePPPoE (1492 effective MTU)
Datacenter HubMikroTik CHR on Proxmox (VMID 415)HubDatacenter uplink (1500 MTU)
Remote SpokeMikroTik CHR on Proxmox (VMID 521)SpokeDatacenter uplink (1500 MTU)
The one detail that matters more than anything else in this table: the office spoke is behind PPPoE, and the other two aren't. That asymmetry is the root cause behind a whole separate class of WireGuard problems — see our dedicated MTU/packet-loss write-up for the full diagnostic story. This post focuses on getting the MTU right from the start, during initial setup, rather than discovering it later through packet loss.
Generating Keys
Each WireGuard interface needs its own keypair. Generate on the router itself so the private key never leaves it:
/interface wireguard
add name=wg-hub listen-port=51820
:put [/interface wireguard get wg-hub public-key]
Repeat on each of the three routers. Collect the three public keys before configuring peers — you'll need to cross-reference them.
The MTU Calculation (Do This Before You Configure Peers)
Working backward from the constrained link (PPPoE at the office):
Ethernet MTU: 1500
PPPoE overhead: - 8
Effective MTU: 1492
WireGuard overhead: -32
Recommended WG MTU: 1412 (safety margin for re-key control packets)
Apply mtu=1412 to every WireGuard interface in the mesh — hub included — not just the one behind PPPoE. WireGuard doesn't fragment its encrypted payload, so if any single hop in a path uses a larger MTU than the constrained link can carry, frames get silently dropped at that PPPoE boundary regardless of which router assembled them.
/interface wireguard set wg-uae mtu=1412
/interface wireguard set wg-hub mtu=1412
/interface wireguard set wg-remote mtu=1412
Configuring Peers
On the hub, add a peer entry for each spoke with its allowed-address scoped to that spoke's actual subnet — not a blanket 0.0.0.0/0. Getting this list wrong (too narrow, and traffic silently drops; too broad, and you're routing more than you mean to) is common enough that we wrote a separate explainer on how AllowedIPs actually works, plus the specific /32-vs-subnet routing bug it can cause.
/interface wireguard peers
add interface=wg-hub public-key="<uae-office-pubkey>" allowed-address=172.20.10.0/24 endpoint-address=<uae-public-ip> endpoint-port=51820 persistent-keepalive=25s
add interface=wg-hub public-key="<remote-spoke-pubkey>" allowed-address=172.20.70.0/24 endpoint-address=<remote-public-ip> endpoint-port=51820 persistent-keepalive=25s
On each spoke, add exactly one peer entry pointing at the hub, with allowed-address covering every subnet reachable through the hub (its own remote subnets plus any others the hub bridges to):
/interface wireguard peers
add interface=wg-hub public-key="<hub-pubkey>" allowed-address=172.20.60.0/24,172.20.70.0/24 endpoint-address=<hub-public-ip> endpoint-port=51820 persistent-keepalive=25s
persistent-keepalive=25s matters on every peer here, not just the ones behind NAT — it keeps the tunnel state alive through any stateful firewall or conntrack table sitting between the sites, and it's what stops the connection from needing a fresh handshake every time traffic resumes after a quiet period.
Firewall: Accept Before You Forget the Catch-All
A WireGuard interface with no forward-chain accept rule ahead of a default drop is a tunnel that establishes a handshake and then goes nowhere — one of the more confusing failure modes because the interface itself looks perfectly healthy.
/ip firewall filter
add chain=forward in-interface=wg-hub action=accept comment="allow WG hub forward"
add chain=input in-interface=wg-hub action=accept comment="allow WG hub mgmt"
Verifying the Mesh Is Actually Up
/interface wireguard peers print detail
# look at last-handshake on every peer — should be well under 25s
# if a peer shows no handshake at all, check endpoint-address/port first
Quick Reference: Topology Checklist
StepCommand / Check
Generate keys per router/interface wireguard add ...
Set MTU on every interfacemtu=1412 if any endpoint is behind PPPoE
Hub peers: one per spokeallowed-address = that spoke's subnet only
Spoke peer: one, pointing at huballowed-address = all subnets reachable via hub
Forward-chain acceptBefore any catch-all drop rule
Verifylast-handshake under keepalive interval on all peers
FAQ
Why hub-and-spoke instead of a full mesh?
Peer configuration scales linearly instead of quadratically — each spoke needs one peer entry regardless of how many other spokes exist, and adding a fourth site means touching the hub and the new site only, not every existing router.
Do all three routers need the same WireGuard MTU?
Yes. WireGuard doesn't fragment its own encrypted payload, so a single constrained hop (like PPPoE) anywhere in the path caps what every router in that path can safely send, regardless of what MTU any individual interface is configured with.
What if a spoke needs to reach another spoke's subnet directly, not through the hub?
That requires an additional direct peer entry between the two spokes — hub-and-spoke by itself only routes spoke-to-spoke traffic through the hub, which adds one extra hop of latency. Whether that matters depends on the traffic pattern.
Setting up a multi-site VPN mesh? We design and deploy MikroTik WireGuard topologies for distributed teams — get the MTU, AllowedIPs, and firewall order right the first time. Talk to us.