2

After upgrading to Ubuntu 15.10, the VPN started to behave very strangely. I use Private Internet Access and it worked just fine.

If I connect to a site that's blocked in my country right after I connect to a VPN - it works. However, after maybe 1 minute it's not working anymore: it shows the standard "this site is blocked" page. Interestingly, the ip-address remains the one provided by PIA (checked with Google) and http://whatismyipaddress.com shows the country I'm connecting through, not my country. The VPN connection icon is present and all seems to indicate the VPN works. Except that I can't access the site.

I tried connecting to VPN from my Android device and visiting the sites and it works all the time. So it clearly must be a newly introduced bug.

Update 1: it appears to be a DNS leak problem, looking for a solution how to solve it in Ubuntu.

Update 2: ended up writing PIA's DNS into /etc/resolv.conf manually, resolved my problem.

3
  • I had the same problem. I talked to PIA people and they just suggest setting it up manually rather then using their script. I know this doesn't solve your problem, but it might solve it in a round about way.
    – Goddard
    Nov 17, 2015 at 22:36
  • Well, did it work for you?
    – orion3
    Nov 17, 2015 at 22:38
  • I don't know because I did not try. I ended having to move back to 14.04 for separate reasons.
    – Goddard
    Nov 17, 2015 at 22:39

1 Answer 1

1

So I have also discovered that possibly a bug causes DNS leaks when using a network manager openVPN connection on Ubuntu 15.10

LAN/ISP DNS are not removed and remain available as possible DNS plus the VPN DNS. They cause the leak even though the VPN DNS are present. They might be used or not. It's random

My solution is to reset the VPN DNS (removing LAN DNS) by using a network manager script dispatcher calling dbus to update dnsmasq

Create a script /etc/NetworManager/dispatcher.d/99resetvpndns with the content

#!/bin/sh

interface=$1
status=$2

case $status in
    vpn-up)
    # because dnsmasq keep DNS LAN and leak our DNS, reset DNS servers to PIA ones
    dbus-send --system --dest=org.freedesktop.NetworkManager.dnsmasq --type=method_call /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers
    dbus-send --system --dest=org.freedesktop.NetworkManager.dnsmasq --type=method_call /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers uint32:3520991966
    dbus-send --system --dest=org.freedesktop.NetworkManager.dnsmasq --type=method_call /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers uint32:3520991962
    ;;
    vpn-down)
    ;;
esac

and make it executable with

chmod +x /etc/NetworkManager/dispatcher.d/99resetvpndns

You need to change the uint32 value. There are your VPN DNS in integer form, not quad decimal form. Go to http://www.aboutmyip.com/AboutMyXApp/IP2Integer.jsp to convert your DNS to integer for example.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .