WireGuard AllowedIPs Explained: Routing + Security
Quick takeaway: AllowedIPs looks like a routing field. It's also, simultaneously, WireGuard's entire access-control mechanism. One field, two jobs — and understanding both is the difference between a mesh that "mostly works" and one that behaves predictably as you scale it.
If you've configured more than one WireGuard tunnel, you've typed AllowedIPs (or, on MikroTik, allowed-address) many times without necessarily stopping to unpack what it's actually doing. It looks like a routing field — a list of subnets reachable through this peer. It is that. It's also, simultaneously, the entire access-control mechanism for the tunnel.
Need WireGuard Configured Right?
Need help? Connect on WhatsApp 👉 wa.link/uw9n3f
Or ask on website chat for freelancer support.
The Two Jobs, One Field
Every WireGuard peer entry has exactly one AllowedIPs list, and that list does two unrelated-sounding things:
Job 1: Outbound Routing — "Who Do I Encrypt This For?"
When your router needs to send a packet out through a WireGuard interface, and that interface has multiple peers configured (as a hub does), it has to decide which peer's key to encrypt the packet with. It does this by checking the packet's destination address against every peer's AllowedIPs list on that interface, and picking whichever peer's list contains the most-specific matching entry. This is why documentation calls it "cryptokey routing" — the routing decision and the encryption key selection are the same lookup.
Packet destined for 172.20.70.30?
→ Peer "Site-C" has 172.20.70.0/24 in its AllowedIPs → encrypt for Site C, send.
Job 2: Inbound Authorization — "Am I Willing to Accept This?"
When a packet arrives decrypted from a given peer, WireGuard checks the packet's source address against that same peer's AllowedIPs list. If the source doesn't match anything in the list, the packet is dropped — silently, inside the kernel module, before it ever reaches your firewall rules, before any log line is written.
Packet arrives from peer "Site-A", claims source 10.90.0.21?
→ Is 10.90.0.21 covered by Site-A peer's AllowedIPs? No → dropped, no log.
This second job is a security feature, not a bug: it stops a compromised or misbehaving peer from claiming to be a source address it has no business using — built-in anti-spoofing that doesn't rely on your firewall doing it separately. But it means every legitimate source that will ever transit through a given peer must be explicitly listed, or its traffic silently vanishes.
This is exactly the mechanism behind a real incident we wrote up separately — a hub-and-spoke mesh where a missing /32 entry silently broke cross-site routing for one road-warrior device. Read the full story: The Missing /32 That Broke Multi-Site Routing.
Why This Trips People Up
Most other VPN technologies separate these two concerns. With IPsec, for instance, you typically configure "traffic selectors" for what's allowed and a separate routing table for how to get there — two systems, two places to look when something's wrong. WireGuard collapses them into one field, which is elegant once you understand it, but means a single incomplete list breaks both routing and authorization at once, and the failure mode (silent drop, no log) gives you almost no signal about which job actually failed.
A Worked Example: Adding a Second Device Behind a Spoke
Say Site A (a spoke) already has one road-warrior client working correctly. Someone adds a second device — a work laptop — connecting through the same spoke. The spoke's own WireGuard peer list gets a new client entry, correctly configured:
/interface wireguard peers add interface=wg-client name="laptop-2" \
public-key="EXAMPLE+Laptop2PublicKeyAAAABBBBCCCC=" \
allowed-address=10.90.0.22/32
That's sufficient for the laptop to reach Site A's own LAN — Site A resolves that locally. But if the laptop also needs to reach Site B (the hub) or Site C (another spoke), there's a second place that needs updating: the hub's own peer entry that represents "everything behind Site A." If that entry's AllowedIPs still only lists the original road-warrior's tunnel IP, the new laptop's traffic gets encrypted correctly by Site A, arrives at the hub, and is silently dropped there.
# On the HUB, not on Site A:
/interface wireguard peers set [find name="Site-A"] \
allowed-address=10.90.0.2/32,172.20.10.0/24,172.20.11.0/24,10.90.0.21/32,10.90.0.22/32
^^^^^^^^^^^^^ added
This is the single most common cause of "the new device can reach the local office but nothing else" reports on a hub-and-spoke mesh — a one-line fix once you know to look for it, versus a long, confused investigation if you don't.
Practical Rules of Thumb
Peer typeWhat AllowedIPs should contain
Leaf / client peer (phone, laptop, single server)Short and specific — usually just that device's own tunnel /32, or its /32 plus a local LAN if it's itself a small router
Hub's entry for a spokeThe union of everything reachable through that spoke — its LAN subnet(s), plus the tunnel IP of every device that connects through it
0.0.0.0/0Routes everything through this peer — correct for a full-tunnel VPN exit, wrong for a site-to-site or split-tunnel client
When you provision a new client behind an existing spoke, there are two places to update, not one: the spoke's own peer list (routine), and the hub's record of what that spoke is allowed to relay (easy to forget).
Debugging Checklist
When a WireGuard-connected device can reach some destinations but not others:
Check traffic counters on the affected peer. No tx spike on a connection attempt → the client's own AllowedIPs never routed it into the tunnel (client-side problem). A tx spike with no reply → likely dropped somewhere downstream (server-side AllowedIPs, routing, or firewall problem).
Walk every hop the packet would cross, and at each one ask: is the source address covered by the AllowedIPs of the peer entry it's arriving through? Is the destination covered by the AllowedIPs of the peer entry it needs to leave through?
Remember the check is symmetric but the lists usually aren't identical — a spoke's list of "what I'll accept from the hub" and the hub's list of "what I'll accept from this spoke" serve different purposes and legitimately contain different entries. What's not normal is a hub's list simply being stale relative to what devices actually connect through a given spoke today.
Is AllowedIPs the same as a firewall rule?
No, and that distinction matters. A firewall rule is evaluated by your OS's packet filter, after the packet has already been accepted. AllowedIPs is evaluated inside WireGuard's own kernel module, before the packet ever reaches your firewall. A packet WireGuard rejects never generates a firewall log line — because your firewall never sees it.
Can overlapping AllowedIPs across peers cause problems?
Yes — if two peers on the same interface have overlapping entries, WireGuard (like standard cryptokey routing) picks the most specific matching prefix, which can produce confusing, hard-to-predict results. Treat overlapping AllowedIPs across different peers as a configuration conflict to clean up, not something to rely on.
What's the difference between wg-quick, MikroTik, and mobile WireGuard here?
None, at the protocol level. The AllowedIPs behavior described here is core WireGuard protocol behavior and applies identically across MikroTik RouterOS, Linux wg-quick, and mobile WireGuard apps — only the configuration syntax differs.
Designing or auditing a multi-site mesh?
Getting AllowedIPs right across a growing hub-and-spoke network is exactly the kind of detail that's easy to get wrong once, and expensive to debug later. We can review your peer configuration before it becomes a support ticket.
Book a free 30-min consult →
All IPs and keys in this post are documentation examples (RFC 1918 / RFC 5737 style). The AllowedIPs behavior described is part of the core WireGuard protocol and applies identically across MikroTik RouterOS, wg-quick, and mobile WireGuard apps — only the configuration syntax differs.