WireGuard AllowedIPs calculator
WireGuard has no "exclude" setting: to route everything except your LAN or one address, AllowedIPs must list every other network. Enter what the tunnel should carry and what it should skip, and get the exact AllowedIPs line, a ready [Peer] block and the commands to check the routes. Everything runs in your browser.
Runs entirely in your browser. Nothing you type leaves the page.
Usually 0.0.0.0/0, ::/0 (everything). For a tunnel that only reaches a remote network, enter that network instead, for example 10.0.0.0/24. Separate entries with commas, spaces or new lines.
Your LAN, private ranges or single addresses (a bare IP counts as /32 or /128).
Added back after the exclusions. Put your WireGuard tunnel subnet here if it falls inside an excluded range.
An IP address, not a hostname. It is excluded as a single address, which prevents the Linux routing loop.
- On Linux with wg-quick, a list without /0 that covers the server's public IP sends the encrypted packets into the tunnel. Enter the server IP above to exclude it.
Result
AllowedIPs = 0.0.0.0/1, 128.0.0.0/2, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.168.0.0/24, 192.168.2.0/23, 192.168.4.0/22, 192.168.8.0/21, 192.168.16.0/20, 192.168.32.0/19, 192.168.64.0/18, 192.168.128.0/17, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 224.0.0.0/3, ::/0
[Peer]
PublicKey = <server public key>
Endpoint = SERVER_PUBLIC_IP:51820
AllowedIPs = 0.0.0.0/1, 128.0.0.0/2, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.168.0.0/24, 192.168.2.0/23, 192.168.4.0/22, 192.168.8.0/21, 192.168.16.0/20, 192.168.32.0/19, 192.168.64.0/18, 192.168.128.0/17, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 224.0.0.0/3, ::/0
PersistentKeepalive = 25
# What the peer captures, as loaded in the kernel
sudo wg show wg0 allowed-ips
# An excluded address: must NOT use the WireGuard interface
ip route get 192.168.1.10
# A tunnelled address: must use the WireGuard interface
ip route get 1.1.1.1
Split tunneling is precise on a server you control
On your own WireGuard server you decide every range that goes through it, the endpoint address never changes, and excluding it is one line. Contabo's entry VPS includes a public IPv4 address and full root access.
Affiliate link: we may earn a commission, at no extra cost to you. The calculator stays free and does not depend on it.
Why one exclusion turns into two dozen lines
AllowedIPs does two jobs at once: it is the list of destinations the client sends into the tunnel, and the list of source addresses it accepts back from the peer. Both are written as CIDR blocks, and a CIDR block is always a power-of-two range aligned on its own size. Cutting one /24 out of the whole IPv4 space therefore leaves one block for every bit between /0 and /24: 24 prefixes. That is not a bug in the output, it is the shortest exact answer.
Everything except 192.168.1.0/24, IPv6 still fully tunnelled:
AllowedIPs = 0.0.0.0/1, 128.0.0.0/2, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.168.0.0/24, 192.168.2.0/23, 192.168.4.0/22, 192.168.8.0/21, 192.168.16.0/20, 192.168.32.0/19, 192.168.64.0/18, 192.168.128.0/17, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 224.0.0.0/3, ::/0On Linux, wg-quick already keeps directly connected LAN routes usable in full-tunnel mode, through its suppress_prefixlength 0 rule. An explicit exclusion matters most on Android and iOS, on Windows when you want the kill-switch off for local access, for networks that are not directly connected (a second subnet behind your router), and for public addresses you want to reach outside the VPN, such as a bank that blocks VPN exits.
Ranges people usually exclude
Exclude only what you need: every range you skip is traffic that leaves the tunnel unprotected. These are the standard reserved ranges and the reason to skip each one.
| Range | What it is | Exclude it when |
|---|---|---|
| 192.168.1.0/24 | A typical home LAN (check yours) | You need the printer, NAS or router while connected |
| 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 | All RFC 1918 private IPv4 | You move between networks you do not know in advance |
| 169.254.0.0/16 | IPv4 link-local (RFC 3927) | Self-assigned devices, or the cloud metadata address 169.254.169.254 on a VM |
| fc00::/7 | IPv6 unique local (RFC 4193) | Your LAN devices also use IPv6 ULA addresses |
| fe80::/10 | IPv6 link-local (RFC 4291) | Rarely needed: per-interface routes already win |
| 203.0.113.10/32 | One public address (example) | A service that refuses VPN traffic, or the server's own IP on Linux |