How Can We Help?
Create a split tunnel in WireGuard®
To create a split tunnel in WireGuard® and route specific traffic outside of the VPNUK connection, you need to modify the configuration file. Here’s how you can do it:
- Download a new WireGuard® configuration file.
- Open the .conf configuaration file in a text editor.
- Locate the
[Interface]
section in the configuration file and add the following line:
PostUp = ip route add IP_ADDRESS/32 via GATEWAY_IP dev INTERFACE_NAME
Replace IP_ADDRESS
with the actual IP address of the website or service you are looking to route through your regular connection (nslookup). Replace GATEWAY_IP
with the IP address of your local network gateway (ipconfig). Replace INTERFACE_NAME
with the name of your network interface (ipconfig), a common network interface is eth0
- Save the configuration file and exit.
- Restart the WireGuard to apply the changes:
Now, when you connect to the WireGuard VPN, traffic to Google.com will be routed directly through your regular internet connection instead of going through the VPN tunnel. Other traffic will still be routed through the VPN as usual.