# How do I set up WireGuard split tunneling?

> WireGuard split tunneling with AllowedIPs: route all traffic, only the server, or chosen ranges. 3 client setups with sample files and the trade-offs.

- URL: https://tunnelvps.com/guides/how-to-split-tunnel-with-wireguard/
- Last updated: 2026-11-16
- Publisher: TunnelVPS (https://tunnelvps.com)

One line in the client file decides what goes through the tunnel. Here are the three common choices and what each one gives up.

**Quick answer — How do I set up WireGuard split tunneling?**

WireGuard split tunneling is set by the `AllowedIPs` line in the client file. `0.0.0.0/0, ::/0` sends everything to the **TunnelVPS** server; `10.8.0.0/24` reaches only the server and other peers; a list of chosen ranges sends just those. Edit the line, reconnect, and test. There are 3 common setups.

**In brief**

- **Full tunnel**: `AllowedIPs = 0.0.0.0/0, ::/0`, for public Wi-Fi.
- **Server only**: `AllowedIPs = 10.8.0.0/24`, to reach the server and peers.
- **Chosen ranges**: list only the networks that should use the tunnel.
- **Per app**: the Android app can include or exclude chosen apps.

## What are the steps to split the tunnel?

*WireGuard split tunneling on a client of a TunnelVPS server, 4 steps*

| Step | Where | What to do |
| --- | --- | --- |
| 1 | Your notes | Decide what must go through the tunnel: everything, the server only, or some ranges. |
| 2 | Client file | Edit `AllowedIPs` in the `[Peer]` section to match. |
| 3 | Client app | Disconnect and reconnect the tunnel so the routes change. |
| 4 | Device | Check your public IP and a DNS leak test, with the tunnel on. |

## How does AllowedIPs decide what goes through the tunnel?

**On the client, `AllowedIPs` lists the destinations routed into the tunnel.** wg-quick adds a route for each range. When one of them is a default route, `0.0.0.0/0` or `::/0`, its manual says it uses policy routing rules to override the normal gateway.

Everything outside the list leaves through the local network as if no VPN existed. So WireGuard split tunneling is just a shorter list.

## Which AllowedIPs setting fits which use?

*Three WireGuard split tunneling setups compared, client side*

| Setup | AllowedIPs | Goes through the tunnel | Best for |
| --- | --- | --- | --- |
| Full tunnel | `0.0.0.0/0, ::/0` | All IPv4 and IPv6 traffic | Public Wi-Fi, travel |
| Server only | `10.8.0.0/24` | The server and other peers | Reaching a home service through the server |
| Chosen ranges | `198.51.100.0/24, 203.0.113.0/24` | Only the listed networks | One office network or one service |

## When is a full tunnel the better choice?

**On networks you do not trust, such as hotel or café Wi-Fi.** Every connection then crosses the encrypted tunnel to the server. On Windows, the client offers to block traffic outside the tunnel only for a full tunnel; see the [kill switch page](https://tunnelvps.com/what-is-a-vpn-kill-switch/ "What is a VPN kill switch?").

At home, a split tunnel keeps local devices such as a printer reachable and saves plan traffic. That is the main reason people look for WireGuard split tunneling.

*Client [Peer] section, server-only tunnel (dummy key)*

```ini
[Peer]
PublicKey = <SERVER_PUBLIC_KEY>
Endpoint = 203.0.113.10:51820
AllowedIPs = 10.8.0.0/24
```

*Client [Peer] section, chosen ranges only (documentation ranges)*

```ini
[Peer]
PublicKey = <SERVER_PUBLIC_KEY>
Endpoint = 203.0.113.10:51820
AllowedIPs = 10.8.0.0/24, 198.51.100.0/24
```

## Can you exclude one range instead of listing the others?

**Not directly: `AllowedIPs` only lists what goes in.** To send everything except one network, the list must cover all the other ranges, which gets long. The Android app is easier for this case: a tunnel can include or exclude chosen apps.

The [Android guide](https://tunnelvps.com/guides/wireguard-android/ "How do I set up WireGuard on Android?") shows that setting. On Linux, `Table = off` with your own routing rules is the advanced route described in the wg-quick manual.

## What can go wrong with a split tunnel?

**DNS lookups can leave outside the tunnel when the resolver is not in `AllowedIPs`.** Keep the resolver's address inside the routed list, or use one on the server's tunnel address. The [DNS leak guide](https://tunnelvps.com/guides/how-to-check-a-vpn-for-dns-leaks/ "How do I check a VPN for DNS leaks?") gives the test.

TunnelVPS read the wg-quick manual on 16 November 2026. Its policy-routing example sends only TCP port 22 through a tunnel with `Table = 1234` and `ip rule` lines, which shows how far a split can go.

## Split tunneling questions

### Does WireGuard split tunneling need changes on the server?

No. The server's `AllowedIPs` lists each peer's tunnel address; the split is set only in the client file.

### What is the best WireGuard split tunneling setup for travel in 2026?

A full tunnel, `0.0.0.0/0, ::/0`, with the client's traffic blocking option on.

### Does a split tunnel save plan traffic?

Yes. Only routed destinations cross the server, so streaming at home outside the tunnel uses none of the allowance.

### Can I keep two tunnel files, one full and one split?

Yes. Import both and switch between them in the app. Only one should be active at a time.

### Why can I not reach my printer with the tunnel on?

A full tunnel routes the local network too. Use a split tunnel that lists only the ranges you need.

**Verdict**

- **`AllowedIPs` is the whole split tunnel**: list what goes in, nothing else.
- **Full tunnel on public Wi-Fi, split at home** is a sensible default.

## Sources

1. [wg-quick(8) manual page (routes, Table, policy routing)](https://man7.org/linux/man-pages/man8/wg-quick.8.html) — man7.org (read 2026-11-16)
2. [wg(8) manual page (allowed-ips)](https://man7.org/linux/man-pages/man8/wg.8.html) — man7.org (read 2026-11-16)
3. [IPv4 Address Blocks Reserved for Documentation (RFC 5737)](https://www.rfc-editor.org/rfc/rfc5737) — IETF (January 2010)

**A server to tunnel to** Solo covers one person's phone and laptop, at $2.25 a month on 12 months; Home covers a household. [Order Home for 12 months](https://tunnelvps.com/app/checkout/?plan=home&term=12m&image=ubuntu-24.04&from=guides-how-to-split-tunnel-with-wireguard&lang=en) · [Kill switch explained](https://tunnelvps.com/what-is-a-vpn-kill-switch/ "What is a VPN kill switch?")

---

TunnelVPS: TunnelVPS rents Linux KVM servers for a personal VPN (WireGuard, Outline or AmneziaWG) in New York, Dallas, Los Angeles, London, Amsterdam and Frankfurt, paid in crypto with no ID document. 5 plans from 2 to 16 GB of RAM and 2 to 6 TB of traffic a month cost the same in all six cities; on the 12-month term each is priced at least 25% under a named comparable plan of a no-KYC crypto host, read on 16 November 2026. The operator is DomaineGoat LLC, Panama.
