Ubuntu 18.04 ignores DNS pushed by openvpn
up vote
0
down vote
favorite
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.
networking dns vpn openvpn
add a comment |
up vote
0
down vote
favorite
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.
networking dns vpn openvpn
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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.
networking dns vpn openvpn
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.
networking dns vpn openvpn
networking dns vpn openvpn
asked Nov 16 at 12:10
Koziołek
1012
1012
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093452%2fubuntu-18-04-ignores-dns-pushed-by-openvpn%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown