I read threads like
Ubuntu 18.04 no DNS resolution when connected to openvpn and https://serverfault.com/questions/528773/networkmanager-is-not-changing-etc-resolv-conf-after-openvpn-dns-push plus suggested threads when writing this post
but still fail to connect with corpo lan when using openvpn.
/etc/resolve.conf:
nameserver 8.8.8.8
nameserver 10.1.1.10
nameserver 127.0.0.53
my.ovpn script
contains at the end:
script-security 2
push "dhcp-option DNS 10.1.1.10"
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
down-pre
Corpo DNS is 10.1.1.10 and after openvpn connection I expect that if domain could not be reloved by google dns (8.8.8.8), then we try to resolve it using second nameserver
. But it does not work like this.
Workaround that works
If in /etc/network/interfaces
I change order of DNS from:
auto lo
iface lo inet loopback
dns-nameservers 8.8.8.8 10.1.1.10
to
auto lo
iface lo inet loopback
dns-nameservers 10.1.1.10 8.8.8.8
then I can access to corpo lan, but whole network start work very, very slow. Specially if I'm out of VPN (they try to resolve 10.1.1.10, cannot connect, then go to 8.8.8.8, but avg load time website id more than 10sec).
I have no idea what is wrong with my configuration.