When you connect to a WireGuard VPN, your device has to make a decision for every piece of data it sends: "Should this go through the secure VPN tunnel, or should it go directly to the internet?" The setting that controls this decision is AllowedIPs. How you configure it determines whether you are using a "full-tunnel" or a "split-tunnel" VPN.

Understanding the difference is crucial for customizing your VPN to your exact needs.

Full-Tunneling: Maximum Security

This is the most common and secure configuration. In a full-tunnel setup, all of your device's internet traffic is routed through the WireGuard server.

If you have followed our basic setup guides, you are already using a full-tunnel configuration.

How it works: You tell your client that every possible IP address on the internet should be accessed through the VPN.

The Configuration (AllowedIPs): In your client's [Peer] section, you set AllowedIPs to 0.0.0.0/0, ::/0. This is a universal catch-all that means "every IPv4 address and every IPv6 address."

[Peer]
PublicKey = YOUR_SERVER_PUBLIC_KEY
Endpoint = your.server.com:51820
AllowedIPs = 0.0.0.0/0, ::/0

Pros:

Cons:


Split-Tunneling: Maximum Flexibility

In a split-tunnel setup, you decide exactly which traffic goes through the VPN. All other traffic goes directly to the internet as normal.

How it works: You give your client a specific list of IP addresses or subnets that should be accessed through the VPN.

The Configuration (AllowedIPs): In your client's [Peer] section, you list only the specific IP ranges you want to tunnel.

[Peer]
PublicKey = YOUR_SERVER_PUBLIC_KEY
Endpoint = your.server.com:51820
# Only send traffic for these specific networks through the VPN
AllowedIPs = 10.0.0.0/24, 192.168.1.0/24

Pros:

Cons:

How to Configure a Split-Tunnel

Let's imagine a common use case: you want to use your VPN to securely access your home network (192.168.1.0/24) and your Pi-hole running on the VPN server (10.0.0.1), but you want all other traffic to be fast and direct.

Here’s how you would configure your client:

[Interface]
PrivateKey = YOUR_CLIENT_PRIVATE_KEY_HERE
Address = 10.0.0.3/32
# Use a public DNS. The Pi-hole DNS will only be used for the tunneled traffic.
DNS = 1.1.1.1

[Peer]
PublicKey = YOUR_SERVER_PUBLIC_KEY_HERE
Endpoint = your.server.com:51820

# This is the magic part!
# We are telling the client: "Only use the VPN for these destinations."
AllowedIPs = 192.168.1.0/24, 10.0.0.1/32

What this configuration does:

Conclusion

Choosing between full-tunnel and split-tunnel depends entirely on your needs.

The flexibility of the AllowedIPs setting is one of WireGuard's most powerful features. Experiment with it to create the perfect setup for you!