← Back to Home

WireGuard Split Tunneling with AllowedIPs

WireGuard's AllowedIPs parameter doubles as both an ACL filter and a routing table. NetRoute Pro generates a ready-to-paste AllowedIPs string from any website's domains. No extra ip route commands needed — just edit the peer config and reload.

Prerequisites

Step 1. Generate AllowedIPs in NetRoute Pro

  1. Open the target website in Chrome
  2. Click the NetRoute Pro icon in your extensions
  3. Select the WireGuard platform
  4. Click Analyze Website
  5. Copy the generated AllowedIPs line — it looks like:
AllowedIPs = 104.21.32.0/24, 172.67.182.0/24, 162.159.135.0/24, ...
Tip: enable RIPE BGP optimization in the extension — it replaces individual IPs with real announced BGP prefixes, giving stable subnets that don't break when Cloudflare/Fastly rotate IPs.

Step 2. Paste into your peer config

Linux (wg-quick)

Edit your tunnel config file (typically in /etc/wireguard/, for example /etc/wireguard/wg0.conf). Under the [Peer] section, replace the existing AllowedIPs = ... line with the string you copied:

[Peer]
PublicKey = <your-peer-public-key>
Endpoint = <your-endpoint>:51820
AllowedIPs = 104.21.32.0/24, 172.67.182.0/24, 162.159.135.0/24
PersistentKeepalive = 25

Windows / macOS (GUI)

  1. Open the WireGuard app
  2. Select your tunnel and click Edit
  3. In the config editor, modify the AllowedIPs field under [Peer]
  4. Click Save

Android / iOS

  1. Open the WireGuard mobile app
  2. Tap your tunnel → Edit
  3. Replace the Allowed IPs field value
  4. Tap Save (top right)
Heads up: on Android, tap Back/Save carefully — the app sometimes resets the field on exit if you leave focus without saving explicitly.

Step 3. Restart the tunnel

Reload the peer so the new routing table takes effect.

Verify

Run sudo wg show — the peer should be listed with the new allowed ips values:

sudo wg show

You can also confirm routing with ip route (Linux/macOS) or route print (Windows) — the listed subnets should point through your WireGuard interface.

Common issues

Losing all network access

If you removed 0.0.0.0/0 but your new AllowedIPs doesn't cover the default route you intended to use, only the listed subnets will go through the tunnel — that's the whole point of split tunneling. Make sure your list contains exactly the subnets you want and nothing else is unintentionally missing.

Android tunnel stuck on "connecting"

Re-save the config explicitly: enter edit mode, tap out of the AllowedIPs field, and tap Save again. Some Android versions need this to commit the change.

Error: AllowedIPs has invalid format

Check for trailing commas, stray whitespace, or newline characters inside the value. AllowedIPs must be a single comma-separated list on one logical line.

References

Ready to try?

NetRoute Pro — a free Chrome extension to generate routes from any website.

Install Extension