WireGuard AllowedIPs Calculator

Send everything through WireGuard except your local network. Enter what goes in the tunnel and what stays out, and get the exact AllowedIPs line for a split tunnel, for IPv4 and IPv6. It also checks if a hotel, office or hotspot network will clash with your home network.

CIDR, single IP or range, separated by commas, spaces or new lines.

Your LAN, printers, NAS or any range that should use the local network.

Networks that must go through the VPN even if they sit inside an excluded or locally used range, for example your WireGuard subnet or your home LAN.

One IPv4 or IPv6 address, not a hostname. It is kept out of the tunnel, because the encrypted tunnel packets must not be routed into the tunnel itself.

The hotel, office or hotspot network. Enter the address your device got with its mask, like 10.35.183.58/8 or 10.35.183.58/255.0.0.0.

Results update as you type. Everything runs in your browser.

If your WireGuard interface address (for example 10.66.66.1/24) falls inside an excluded range, add it under pinned networks.

Tip: add your VPN server's public IP above. The official apps handle a plain 0.0.0.0/0 on their own, but a custom list that covers the server's address can send the encrypted packets into the tunnel on some setups. Excluding it is harmless. Behaviour can differ slightly between clients.

25 entries is normal for this kind of split tunnel. The list is exact: every block is needed to cover what is left, and nothing more.

Your AllowedIPs line 25 entries (IPv4 24, IPv6 1)

Output format
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

IPv4

Blocks
24
Addresses in the tunnel
4,294,967,040
Addresses excluded
256
  • 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

IPv6

Blocks
1
Addresses in the tunnel
2^128
Addresses excluded
0
  • ::/0
Show the working: why the line is this long

After removing the exclusions, these address ranges are left. Each one is cut into the fewest aligned CIDR blocks.

Remaining ranges and the number of blocks each needs
First addressLast addressBlocks
0.0.0.0192.168.0.2556
192.168.2.0255.255.255.25518
::ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff1

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

  1. Send through the tunnel: keep 0.0.0.0/0 and ::/0 for "everything", or enter only the remote network you need.
  2. Keep out of the tunnel: add your LAN or click a preset such as RFC 1918.
  3. Pinned and server IP: add your WireGuard subnet or home LAN under pinned, and your server's public IP.
  4. 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.

How 0.0.0.0/0 is halved step by step around 192.168.1.0/24
StepSplitKeep in the listSplit again
10.0.0.0/00.0.0.0/1128.0.0.0/1
2128.0.0.0/1128.0.0.0/2192.0.0.0/2
3192.0.0.0/2224.0.0.0/3192.0.0.0/3
4192.0.0.0/3208.0.0.0/4192.0.0.0/4
… one more step per bit …
23192.168.0.0/22192.168.2.0/23192.168.0.0/23
24192.168.0.0/23192.168.0.0/24192.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 compared with split tunnel
Full tunnelSplit tunnel
AllowedIPs0.0.0.0/0, ::/0Everything minus your exclusions, or only the remote networks
Local printer, NAS, TVUsually unreachableReachable
Line lengthTwo entriesOften 20 to 60 entries

Ranges people usually keep out of the tunnel:

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.

Related tools

More Network Tools

Free tools for network engineers — no signup, no rate-limit walls.

Browse all tools by job →