What AllowedIPs does
In WireGuard, AllowedIPs does two jobs. It is the list of destinations your device sends into the tunnel. It is also the list of source addresses your device accepts back from that peer.
There is no "exclude" setting. To route all traffic except your LAN, you have to list every block that is left over. This calculator does that subtraction for you, and works as a general CIDR exclude calculator too.
How to build a split tunnel config in 4 steps
- Send through the tunnel: keep
0.0.0.0/0and::/0for "everything", or enter only the remote network you need. - Keep out of the tunnel: add your LAN or click a preset such as RFC 1918.
- Pinned and server IP: add your WireGuard subnet or home LAN under pinned, and your server's public IP.
- Paste: copy the line into the
[Peer]section of the client config, replacing the old AllowedIPs line, then reconnect.
Worked example: WireGuard 0.0.0.0/0 except the local network
Send everything except 192.168.1.0/24. The result is 24 blocks, covering 4,294,967,040 addresses: every IPv4 address except the 256 in your LAN.
Why 24? A CIDR block can't have a hole in it. So the tool cuts 0.0.0.0/0 in half, keeps the half without your LAN, and cuts the other half again. It repeats until the leftover piece is exactly your /24. That is one step for each prefix bit from /1 to /24.
| Step | Split | Keep in the list | Split again |
|---|---|---|---|
| 1 | 0.0.0.0/0 | 0.0.0.0/1 | 128.0.0.0/1 |
| 2 | 128.0.0.0/1 | 128.0.0.0/2 | 192.0.0.0/2 |
| 3 | 192.0.0.0/2 | 224.0.0.0/3 | 192.0.0.0/3 |
| 4 | 192.0.0.0/3 | 208.0.0.0/4 | 192.0.0.0/4 |
| … one more step per bit … | |||
| 23 | 192.168.0.0/22 | 192.168.2.0/23 | 192.168.0.0/23 |
| 24 | 192.168.0.0/23 | 192.168.0.0/24 | 192.168.1.0/24 |
Rule of thumb: removing one block of prefix length p from 0.0.0.0/0 leaves exactly p blocks. A /24 leaves 24. A single IP leaves 32.
Worked example: VPN can't reach the home network on hotel Wi-Fi or a hotspot
Your home network is 10.10.10.0/24. A phone hotspot gives your laptop 10.35.183.58 with mask 255.0.0.0, so the laptop now has a local route for all of 10.0.0.0/8.
Your device uses longest prefix match: when two routes cover an address, the more specific one wins. The local /8 is more specific than the tunnel's /0 routes, so traffic to 10.10.10.x goes out the hotspot instead of the tunnel.
The fix is to list the home network explicitly. A /24 is more specific than the /8, so it wins:
AllowedIPs = 0.0.0.0/0, 10.10.10.0/24, ::/0
Put 10.10.10.0/24 under pinned networks and the away network under "Networks you might be on", and the clash check shows this verdict. Try longest prefix match yourself in the routing simulator.
Full tunnel vs split tunnel
| Full tunnel | Split tunnel | |
|---|---|---|
| AllowedIPs | 0.0.0.0/0, ::/0 | Everything minus your exclusions, or only the remote networks |
| Local printer, NAS, TV | Usually unreachable | Reachable |
| Line length | Two entries | Often 20 to 60 entries |
Ranges people usually keep out of the tunnel:
- RFC 1918 private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16): home and office LANs. See private IP ranges explained.
- Link-local (169.254.0.0/16): addresses a device gives itself when DHCP fails.
- CGNAT (100.64.0.0/10): used by some ISPs and by Tailscale.
- IPv6 unique local (
fc00::/7): the IPv6 version of private ranges.
Common mistakes
- Forgetting ::/0. 0.0.0.0/0 covers IPv4 only, so IPv6 traffic can leak around the tunnel.
- Excluding all of 10.0.0.0/8. If your tunnel subnet is 10.66.66.0/24, you can no longer reach the server's tunnel address. Pin the tunnel subnet.
- Using 192.168.1.0/24 at home. It is the most common default, so you will meet it on other networks. Pick something less common.
- Putting the server's own IP inside the tunnel. The encrypted packets must reach the server directly. Add it in the server IP box.
- Typing the router address. 192.168.1.1/24 is a host, not a network. The tool clears the host bits and tells you.
- Treating AllowedIPs as a firewall. It is routing and source checking, not filtering. Keep a real firewall on the server.
What to do if you can't avoid a clash
If both sides use the same network, routing alone can't fix it. Renumber your home network, route single hosts as /32, or use NAT on the VPN server. The VPN same-subnet conflict guide walks through each option. For many client sites that share ranges, see overlapping client networks.
WireGuard AllowedIPs FAQ
How do I exclude my local network from WireGuard AllowedIPs?
WireGuard has no exclude option, so you list every block that is left after removing your LAN. Put 0.0.0.0/0 and ::/0 under 'Send through the tunnel', add your LAN (for example 192.168.1.0/24) under 'Keep out of the tunnel', and paste the AllowedIPs line the calculator gives you into the [Peer] section of the client config.
Why is the AllowedIPs list so long when I only exclude one subnet?
Every entry must be an aligned CIDR block, and a hole can only be cut out by halving the address space around it. Each halving step leaves one block behind, so removing a /24 from 0.0.0.0/0 leaves 24 blocks and removing a single IPv4 address leaves 32. The list is long but exact.
Why does my VPN stop reaching home when I'm on hotel or phone-hotspot Wi-Fi?
The network you are on probably uses addresses that overlap your home network. Your device treats that range as local and the most specific route wins, so home traffic goes out the Wi-Fi instead of the tunnel. If your home network has a longer prefix than the local one, listing it explicitly in AllowedIPs fixes it. If both are the same size, you need to renumber one side or use NAT.
Does AllowedIPs = 0.0.0.0/0 also cover IPv6, and why does my real IP still show up in one app?
No. 0.0.0.0/0 is IPv4 only. If your connection has IPv6 and the list has no ::/0, IPv6 traffic can leave outside the tunnel, which is a common reason an app or website still sees your real address. Add ::/0, or turn IPv6 off on the device.
Do I need to exclude the VPN server's IP?
The official WireGuard apps handle a plain 0.0.0.0/0 on their own. With a custom list that covers the server's address, some setups can send the encrypted packets into the tunnel itself, which breaks the connection. Excluding the server address is harmless, so it is a safe habit. Behaviour can differ slightly between clients.
Is AllowedIPs the same as a firewall rule?
No. AllowedIPs decides which destinations are routed into the tunnel and which source addresses are accepted from a peer. It does not filter ports or protocols, and it does not stop a peer from reaching services you did not mean to share. Keep a real firewall on the server.
Can I use the output for something other than WireGuard (firewall allow-lists, routes)?
Yes. The result is a plain list of CIDR blocks, so it works anywhere that accepts CIDR: firewall address groups, cloud security groups, route tables or other VPN clients. Use the 'One per line', 'Comma separated' or 'Linux ip route' format instead of the WireGuard line.