Ubuntu terminal no connectivity when running openvpn [SOLVED]

edited September 2017 in Linux VPN Setup Posts: 2
I set up the VPN via the installer in the GUI and have test that it works.

I then rebooted and, without any desktop session, set up terminal access. I used this guide.

openvpn starts without error and the last log message is:
   Thu Sep 21 09:55:11 2017 Initialization Sequence Completed

Afterwards DNS resolution fails.
    ⟫ curl checkip.dyndns.org
    curl: (6) Could not resolve host: checkip.dyndns.org

How do I resolve this?
Post edited by PIAAustin on


  • Hi Jem,

    The manual OpenVPN setup doesn't handle DNS so you probably still have your ISP's DNS somewhere.

    You can try to either add
    script-security 2
    up /etc/openvpn/update-resolv-conf

    If you're using a Debian-based distro, otherwise you can try

    echo -e "nameserver\nnameserver" | sudo tee /etc/resolv.conf

    which will set PIA's DNS globally. If that  still doesn't work, we'll need the output of ip route. 

    The first is to be added to the VPN profile, while the second are terminal commands. The first will also need to be removed if it doesn't work as it will likely cause OpenVPN to error out if the script doesn't exist.

    I hope this has helped!
  • JemJem
    Posts: 2
    Option 1 did the trick. Thank you.
  • No problem!
  • Posts: 396
    You can try to either add
    script-security 2
    up /etc/openvpn/update-resolv-conf
    down /etc/openvpn/update-resolv-conf
    doesn't the resolver config need an update when the VPN is taken back down?
Sign In or Register to comment.