no dns resolver when OpenVPN is running

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

no dns resolver when OpenVPN is running

robert rottermann
hi there

i installed OpenVPN a long time ago and I started it manually from the cli up to
now. Everything worked fine.


Today I installed network-manager-openvpn-gnome, and now can open the vpn
connection from the UI which ist much more convenient.

only ...

As long as the VPN is running, the dns resolver does not work any more, and I
can not connect to the internet.


how can I fix that?

robert


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: no dns resolver when OpenVPN is running

Paul Smith-2
Please be sure to provide information on what version of Ubuntu you're
using.  Here I'll assume a recent version:

On Sat, 2017-10-21 at 18:26 +0200, robert rottermann wrote:
> As long as the VPN is running, the dns resolver does not work any more, and I
> can not connect to the internet.

These are two different things: is it that DNS is not working (e.g., you
can access systems on the internet but only by their IP address), or is
it that you cannot connect to the internet at all (your network
connection is not up)?

If it's DNS, then probably you don't have your resolver configured
properly... maybe you undid the original network-manager resover
configuration "back in the day"; normally it takes care of things.

Look at your /etc/resolv.conf file.  Is it a file, or a symbolic link?
If the latter, where is it pointing?

If you want to use network-manager (and I agree, it's extremely handy to
use it for VPN) then you want your /etc/resolv.conf to look like this:

  $ ls -al /etc/resolv.conf 
    <...> /etc/resolv.conf -> ../run/NetworkManager/resolv.conf

That is, it's a symbolic link to the /run/NetworkManager/resolv.conf
file.  When my VPN is running, the contents of this file look like:

  $ cat /etc/resolv.conf 
  # Generated by NetworkManager
  search <vpn-domains>
  nameserver 127.0.1.1

And, there's a dnsmasq instance running on my system:

  $ ps -aef | grep 'dnsmasq.*127\.0\.1\.1'
  nobody    1269  1007  0 Oct18 ?        00:00:01 /usr/sbin/dnsmasq
    --no-resolv --keep-in-foreground --no-hosts --bind-interfaces
    --pid-file=/var/run/NetworkManager/dnsmasq.pid
    --listen-address=127.0.1.1 --cache-size=0 --conf-file=/dev/null
    --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq
    --conf-dir=/etc/NetworkManager/dnsmasq.d

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: no dns resolver when OpenVPN is running

robert rottermann
thanks

after playing around and checking what you suggest
the dns resolution works up a sudden ..

thanks for your good infuence :)
hop it keeps
robert

On 21.10.2017 18:39, Paul Smith wrote:
> Please be sure to provide information on what version of Ubuntu you're
> using.  Here I'll assume a recent version:
yes 16.04
>
> On Sat, 2017-10-21 at 18:26 +0200, robert rottermann wrote:
>> As long as the VPN is running, the dns resolver does not work any more, and I
>> can not connect to the internet.
> These are two different things: is it that DNS is not working (e.g., you
> can access systems on the internet but only by their IP address), or is
> it that you cannot connect to the internet at all (your network
> connection is not up)?
acces to an ip address works
it is only the resolver that seems not to work

>
> If it's DNS, then probably you don't have your resolver configured
> properly... maybe you undid the original network-manager resover
> configuration "back in the day"; normally it takes care of things.
>
> Look at your /etc/resolv.conf file.  Is it a file, or a symbolic link?
> If the latter, where is it pointing?
>
> If you want to use network-manager (and I agree, it's extremely handy to
> use it for VPN) then you want your /etc/resolv.conf to look like this:
>
>    $ ls -al /etc/resolv.conf
>      <...> /etc/resolv.conf -> ../run/NetworkManager/resolv.conf
>
> That is, it's a symbolic link to the /run/NetworkManager/resolv.conf
> file.  When my VPN is running, the contents of this file look like:
>
>    $ cat /etc/resolv.conf
>    # Generated by NetworkManager
>    search <vpn-domains>
>    nameserver 127.0.1.1
>
> And, there's a dnsmasq instance running on my system:
>
>    $ ps -aef | grep 'dnsmasq.*127\.0\.1\.1'
>    nobody    1269  1007  0 Oct18 ?        00:00:01 /usr/sbin/dnsmasq
>      --no-resolv --keep-in-foreground --no-hosts --bind-interfaces
>      --pid-file=/var/run/NetworkManager/dnsmasq.pid
>      --listen-address=127.0.1.1 --cache-size=0 --conf-file=/dev/null
>      --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq
>      --conf-dir=/etc/NetworkManager/dnsmasq.d
>


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

RE: no dns resolver when OpenVPN is running

J.Witvliet
In reply to this post by robert rottermann
"The DNS-resolver does not work anymore" is rather broad.
Is the DNS-server:
a) your local DNS-server?
b) your ISP DNS-server?
c) your VPN-provider DNS-server?

Please check the config on the vpn-server-side.
As an option, the vpn-server *can* push DNS-resolvers, (but don't have to)
Check potential internal/external-network conflicts
Is the server pushing an alternative default-gateway?
Can you ping the DNS-servers (see /etc/resolv.conf)  when VPN is down AND up
Firewall issue's when TUN-device gets up


-----Original Message-----
From: ubuntu-users [mailto:[hidden email]] On Behalf Of robert rottermann
Sent: zaterdag 21 oktober 2017 18:27
To: Ubuntu user technical support, not for general discussions
Subject: no dns resolver when OpenVPN is running

hi there

i installed OpenVPN a long time ago and I started it manually from the cli up to now. Everything worked fine.
Today I installed network-manager-openvpn-gnome, and now can open the vpn
connection from the UI which ist much more convenient.

only ...

As long as the VPN is running, the dns resolver does not work any more, and I
can not connect to the internet.
how can I fix that?


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users