My setup:
Router: Running pfSense connected to internet/ISP
- Computer/Desktop: Connected to VPN directly
Symptoms:
- I successfully connect to the VPN
- DNS leaks are created found after a dns test
netstat -r
Code:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 103.121.217.5 0.0.0.0 UG 0 0 0 tun0
103.121.217.1 103.121.217.5 255.255.255.255 UGH 0 0 0 tun0
103.121.217.5 * 255.255.255.255 UH 0 0 0 tun0
158-161-45-62ch. mainrouter.smit 255.255.255.255 UGH 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
So, I would like to setup my system to do the following:
- All traffic directed to 192.168.x.x to use 192.168.1.1 as the default gateway.
- All other trafic to use the VPN default gateway of 103.121.217.5
If it isn't already obvious, I don't know much about VPN's, networking and/or default gateways. Please treat me like a complete newb.
Is it possible to do what I want, and if so, how do I do it.
Reason: When I'm connected to the VPN I can access anything on 192.168.1.x. However, because the default gateway is 192.168.1.1 when I test for a DNS leak my ISP is getting picked up. I can avoid this by removing the route to 192.168.1.1 but then my LAN is not accessible and I cannot print or use my local file sharing or anything. I would like to access 192.168.x.x which I can do by adding the routes, but again, then I have the DNS leak issue.
Any help on this would be greatly appreciated.