You are not logged in.

#1 2016-08-09 17:34:34

adiemme
Member
Registered: 2016-08-09
Posts: 2

DNS resolution issue

Hi all,

I am facing a strange issue with the DNS servers.
I am using openvpn, and i am using the update-resolv-conf script to update the resolv.conf file once i am connected to the vpn.
What i dont get is:
1) Why does this removes the previous DNS server and adds the one got connecting to the VPN?
2) Why if i do have more than 1 DNS server, the second one is ignored?

Details:
Before connecting to the vpn
[root@alinux adiemme]# cat /etc/resolv.conf
# Generated by resolvconf
nameserver 8.8.8.8
nameserver 192.168.2.254

After i am connected to the vpn
[root@alinux adiemme]# cat /etc/resolv.conf
# Generated by resolvconf
nameserver 8.8.8.8
nameserver 192.168.99.1

Trying to ping a host that can be resolved using 192.168.99.1
[root@alinux adiemme]# ping ztest1
ping: ztest1: Name or service not known

Tcpdump on wlan0
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
19:31:41.101086 IP 192.168.2.10.47632 > 8.8.8.8.53: 60956+ A? ztest1. (28)
19:31:41.101120 IP 192.168.2.10.47632 > 8.8.8.8.53: 50688+ AAAA? ztest1. (28)
19:31:41.182007 IP 8.8.8.8.53 > 192.168.2.10.47632: 50688 NXDomain 0/1/0 (103)
19:31:41.185932 IP 8.8.8.8.53 > 192.168.2.10.47632: 60956 NXDomain 0/1/0 (103)

Tcpdump on tun0
[root@alinux adiemme]# tcpdump -ni tun0 port 53
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tun0, link-type RAW (Raw IP), capture size 262144 bytes

But if i use the utilities like Dig, using @nameserverip it resolves correctly.
Ping, doesn't.

So basically that dns server is ignored.
Does anybody know how can i fix those issues?

Cheers

Offline

#2 2016-08-21 07:37:43

adiemme
Member
Registered: 2016-08-09
Posts: 2

Re: DNS resolution issue

bump

Offline

#3 2016-08-21 07:39:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: DNS resolution issue


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2016-08-21 10:20:21

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: DNS resolution issue

What you really want, is to query the appropriate DNS servers.

If you really want to only change /etc/resolv.conf, then your other alternative, as a probably-unsatisfactory quick fix, is to have *all* DNS queries forwarded to the VPN's DNS server. So /etc/resolv.conf would just contain 1 nameserver entry.

Offline

Board footer

Powered by FluxBB