If you have a Wireguard VPN installed as specified here and want to only route specific traffic through it while the rest goes directly from your computer, you need to make some changes to your WireguardClient.conf file.
The examples below use the target IP address 126.96.36.199. Change it for your own target IP. You have two ways to accomplish this:
- In the [Interface] section remove or comment the DNS directive
- In the [Peer] section, change the values for AllowedIPs to your target IP:
AllowedIPs = 188.8.131.52/32
… where 184.108.40.206 would be your target IP.
- Copy the IPs listed in the [Interface] / DNS directive
- In the [Peer] section, change the values for AllowedIPs to your target IP and the IPs of the DNSs copied before while adding a /32 to the end of each IP.
AllowedIPs = 220.127.116.11/32, 18.104.22.168/32, 22.214.171.124/32
As you can see, all the IPs listed in the two options above end with a /32. These are CIDR ranges. Use this calculator for help.
Hope this helps.
Leave a Reply