I am quite amateur in the world of VPNs. I've set up an OpenVPN server at home, and I was expecting that by connecting to that server when traveling abroad I would be "virtually" using the Internet as if I am at my home. However, this seems not to be the case, and certain websites are not accessible when abroad. For instance Facebook is not accessible when my VPN connection is active.
Pondering why, I did a traceroute test, and I found the results surprising: traceroute facebook.com
on my laptop abroad (with VPN active) will not terminate after 30 hops (which, IIUC, means a complicated route to facebook.com is being taken from my laptop). But if I ssh
into the machine that hosts my VPN server and do the same, it terminates after 11 hops (which sounds natural). What is interesting is that in both cases my home router (which is connected to the Internet) appears at the top of the list.
My conclusion is somehow the traffic is not "fully" tunneled through my home VPN server.
For reference, here are some of the options I have added to my client config:
redirect-gateway def1 bypass-dhcp bypass-dns
dhcp-option DNS 8.8.8.8
dhcp-option DNS 8.8.4.4
mssfix 1300
UPDATE: After paying more attention, I see that facebook.com gets resolved to two different IPs from my laptop or VPN server.
From my laptop:
$ traceroute facebook.com
traceroute to facebook.com (10.10.34.35), 30 hops max, 60 byte packets
...snip...
But from the VPN server (ssh):
$ traceroute facebook.com
traceroute to facebook.com (157.240.17.35), 30 hops max, 60 byte packets
...snip...
More interestingly traceroute 157.240.17.35
from the laptop connected to the VPN server reaches the destination in 12 hops and exactly traverses the same nodes as traceroute facebook.com
will traverse from the VPN server.
I therefore concluded that there should be a DNS problem, despite dhcp-option
directives in the client config.
I manually specified Google DNS IPs in network manager config and the issue is resolved.
Is this normal? Why Network Manager does not take into account dhcp-option
directives?