Let's take an example of setting up a route to a specific host through a WireGuard VPN provider when you access the Internet via a local ISP.
1. Configure access to the Internet through a WireGuard VPN provider.
2. Use the nslookup utility to find out which Internet address resolves the whatismyipaddress.com domain name:
nslookup whatismyipaddress.com
Non-authoritative answer:
Address: 104.16.155.36
NOTE: Important! The domain address may change (in this example, it is 104.16.155.36). If the setup shown in this article does not work, you need to run nslookup again and check the domain name address.
3. Using the tracert utility (in Windows), determine the route of the IP packet from the home client node to the destination server node.
Standard ICMP packet transmission to the host whatismyipaddress.com (104.16.155.36) in tracert:
C:\Users\User>tracert whatismyipaddress.com
Tracing route to whatismyipaddress.com [104.16.155.36]
over a maximum of 30 hops:
1 1 ms 1 ms 1 ms 192.168.201.1
2 2 ms 1 ms 1 ms 192.168.8.1
3 2 ms 2 ms 2 ms EMEA.Germany.5504.IP1.regusnet.com [217.110.233.97]
4 2 ms 2 ms 7 ms hosting-240.43.rev.fr.colt.net [213.41.43.240]
5 2 ms 2 ms 2 ms 193.114.169.141
6 31 ms 30 ms 4 ms de-cix-frankfurt.as13335.net [80.81.193.129]
7 3 ms 7 ms 4 ms 172.70.248.5
8 3 ms 3 ms 3 ms 104.16.155.36
At the end of the trace, we can see that the IP packet routing goes through the servers of the local ISP Regus Offenbach Kaiserlei (from Hop 3) to the whatismyipaddress.com node (104.16.155.36).
The resource whatismyipaddress.com will show the IP address allocated by the ISP:
4. Create a static route to the IP address 104.16.155.36 of the whatismyipaddress.com domain:
In the static route parameters, select:
Route Type: 'Route to host';
Destination host address: 104.16.155.36 (this is the address of the whatismyipaddress.com domain);
Interface: the name of the WireGuard interface through which the routing is done, in our example, 'KeenVPN WG'.
NOTE: Important! If Connection Priorities are configured, the interfaces for connections through the ISP and the VPN provider must be in the same profile.
5. Check the IP packet route from the client to the destination node, the whatismyipaddress.com domain:
C:\Users\User>tracert whatismyipaddress.com
Tracing route to whatismyipaddress.com [104.16.155.36]
over a maximum of 30 hops:
1 <1 мс <1 мс <1 мс 192.168.1.1
2 48 ms 49 ms 48 ms 10.15.0.0
3 48 ms 50 ms 49 ms vss-xx-yy.fr.eu [5.39.47.47]
4 49 ms 49 ms 49 ms 10.117.81.26
5 49 ms 49 ms 48 ms 10.173.16.108
6 148 ms 50 ms 49 ms 10.195.64.0
7 53 ms 53 ms 53 ms par-th2-sbb2-nc4.fr.eu [54.36.50.226]
8 52 ms 52 ms 52 ms 10.215.2.85
9 56 ms 53 ms 53 ms cloudflare.as1338.fr.eu [54.36.50.29]
10 54 ms 53 ms 53 ms 172.71.124.2
11 53 ms 53 ms 53 ms 104.16.155.36
At the end of the trace, we see that the IP packet routing goes through the VPN provider's WireGuard gateway server to the whatismyipaddress.com host (104.16.155.36).
The whatismyipaddress.com resource will show the IP address allocated by the VPN provider: