0

At work, we have an OpenVPN connection setup for connecting to our AWS VPN.

We use Route53 for resolving the ec2 hostnames. The (Network Manager) VPN client on the Ubuntu machines (on Mac it works fine) has a strange behavior - upon VPN connection, hostnames are resolved correctly, however, after a short time (less than 30 seconds) they're not resolved anymore.

I can see that the DNS changes before/after the problem.

This is before:

$ route
Kernel IP routing table
Destination         Gateway           Genmask         Flags Metric Ref    Use Iface
default             ip-<localhost-ip> 0.0.0.0         UG    600    0        0 <wlan0>
<vpn>.0.0           *                 255.255.0.0     U     50     0        0 tun0
<vpc>.0.0           ip-<vpn-int-ip>   255.255.0.0     UG    0      0        0 tun0
ec2-<public-vpn-ip> ip-<localhost-ip> 255.255.255.255 UGH   600    0        0 <wlan0>
link-local          *                 255.255.0.0     U     1000   0        0 <wlan0>
<localhost.ip>      *                 255.255.255.0   U     600    0        0 <wlan0>

$ dig <ec2hostname>.<sub>.<domain>

; <<>> DiG 9.10.3-P4-Ubuntu <<>> <ec2hostname>.<sub>.<domain>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48894
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;<ec2hostname>.<sub>.<domain>.        IN    A

;; ANSWER SECTION:
<ec2hostname>.<sub>.<domain>.    4    IN    A    <ec2host.ip>

;; Query time: 45 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Thu Jul 12 11:19:53 CEST 2018
;; MSG SIZE  rcvd: 63

This is after:

$ route
Kernel IP routing table
Destination         Gateway         Genmask         Flags Metric Ref    Use Iface
default             <router.addr>   0.0.0.0         UG    600    0        0 <wlan0>
<vpn>.0.0           *               255.255.0.0     U     50     0        0 tun0
<vpc>.0.0           ip-<vpn-int-ip> 255.255.0.0     UG    0      0        0 tun0
ec2-<public-vpn-ip> <router.addr>   255.255.255.255 UGH   600    0        0 <wlan0>
link-local          *               255.255.0.0     U     1000   0        0 <wlan0>
<localhost.ip>      *               255.255.255.0   U     600    0        0 <wlan0>

$ dig <ec2hostname>.<sub>.<domain>

; <<>> DiG 9.10.3-P4-Ubuntu <<>> <ec2hostname>.<sub>.<domain>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 45122
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;<ec2hostname>.<sub>.<domain>.        IN    A

;; AUTHORITY SECTION:
int.            3449    IN    SOA    sns.dns.icann.org. noc.dns.icann.org. 2018070637 3600 1800 604800 3600

;; Query time: 2 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Thu Jul 12 11:19:31 CEST 2018
;; MSG SIZE  rcvd: 104

What is happening?

0

After a couple of hours of failed attempt, it turns out that Network manger requires Search domains to be set.

This doesn't example the behavior itself (DNS resolution works correctly for 30 seconds, then not anymore), however it solves the problem.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.