You are not logged in.

#1 2016-12-26 11:57:12

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

dig and ping resolve dns differently when on VPN

I'm experiencing an issue with DNS resolution.

I use NetworkManager for managing network connections.
I use openconnect (both bare launched via script and via NetworkManager) for VPN connectivity.

There's a host name, say

stash.allegrogroup.com

.

When not on VPN its IP is resolved to

165.160.15.20

The problem is that when I connect to VPN, it is still resolved by all applications to the old value. However, dig already shows new value

$ dig stash.allegrogroup.com

; <<>> DiG 9.11.0-P1 <<>> stash.allegrogroup.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29078
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
; COOKIE: 8e411a171f96ede6 (echoed)
;; QUESTION SECTION:
;stash.allegrogroup.com.                IN      A

;; ANSWER SECTION:
stash.allegrogroup.com. 19      IN      A       10.64.54.53

;; Query time: 27 msec
;; SERVER: 197.86.52.11#53(197.86.52.11)
;; WHEN: Mon Dec 26 12:38:47 CET 2016
;; MSG SIZE  rcvd: 79
$ cat /etc/resolv.conf
# Generated by resolvconf
search allegrogroup.internal home
nameserver 197.86.52.11
nameserver 197.86.48.46
nameserver 192.168.0.1

But ping, firefox and all other apps still use the old value

$ ping stash.allegrogroup.com
PING stash.allegrogroup.com (165.160.15.20) 56(84) bytes of data.

I haven't installed any caching servers. Just in case, restarting systemd-resolvd didn't help.

Thanks in advance for any help.

Last edited by eDio (2016-12-26 13:03:49)

Offline

#2 2016-12-26 13:33:01

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

Re: dig and ping resolve dns differently when on VPN

This looks like a mix-up between ".com" and ".internal" - look at the "search" line in your /etc/resolv.conf

Try:  ping stash.allegrogroup.internal

Offline

#3 2016-12-26 13:42:36

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: dig and ping resolve dns differently when on VPN

Tried, host not found.
Just in case, here's what dig shows

dig stash.allegrogroup.internal

; <<>> DiG 9.11.0-P1 <<>> stash.allegrogroup.internal
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 46422
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
; COOKIE: 02a19c178670420c (echoed)
;; QUESTION SECTION:
;stash.allegrogroup.internal.   IN      A

;; AUTHORITY SECTION:
allegrogroup.internal.  3600    IN      SOA     poz-dmc-011.allegrogroup.internal. hostmaster.allegrogroup.internal. 13802805 900 600 86400 3600

;; Query time: 23 msec
;; SERVER: 197.86.52.11#53(197.86.52.11)
;; WHEN: Mon Dec 26 14:38:28 CET 2016
;; MSG SIZE  rcvd: 14

Offline

Board footer

Powered by FluxBB