OpenVPN perde o DNS após a suspensão

1

No Ubuntu 16.04, eu tenho o Network Manager configurado para usar automaticamente uma conexão OpenVPN na inicialização do sistema. Isso funciona bem.

No entanto, quando a máquina é reiniciada após ser suspensa, embora a VPN seja reconectada, não consigo navegar (ou pingar) sites porque os nomes de host não podem ser resolvidos. Por alguma razão, as pesquisas de DNS estão falhando.

ping: unknown host www.google.com

Isso só começou a acontecer há algumas semanas, não sei o que mudou.

Saída de cat /etc/NetworkManager/NetworkManager.conf :

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

Saída de cat /etc/resolv.conf :

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1

Saída de host -v www.apple.com (antes de suspender):

Trying "www.apple.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41111
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 9, ADDITIONAL: 7

;; QUESTION SECTION:
;www.apple.com.         IN  A

;; ANSWER SECTION:
www.apple.com.      1287    IN  CNAME   www.apple.com.edgekey.net.
www.apple.com.edgekey.net. 1516 IN  CNAME   www.apple.com.edgekey.net.globalredir.akadns.net.
www.apple.com.edgekey.net.globalredir.akadns.net. 1516 IN CNAME e6858.dsce9.akamaiedge.net.
e6858.dsce9.akamaiedge.net. 20  IN  A   104.94.190.92

;; AUTHORITY SECTION:
dsce9.akamaiedge.net.   1516    IN  NS  n3dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n1dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n6dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  a0dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n4dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n5dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n0dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n7dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n2dsce9.akamaiedge.net.

;; ADDITIONAL SECTION:
a0dsce9.akamaiedge.net. 1516    IN  AAAA    2600:1480:e800::c0
n0dsce9.akamaiedge.net. 1516    IN  A   88.221.81.194
n1dsce9.akamaiedge.net. 1516    IN  A   23.62.100.157
n2dsce9.akamaiedge.net. 1516    IN  A   95.101.2.121
n3dsce9.akamaiedge.net. 1516    IN  A   95.101.79.79
n4dsce9.akamaiedge.net. 1516    IN  A   23.62.100.159
n5dsce9.akamaiedge.net. 1516    IN  A   23.62.100.164

Received 504 bytes from 127.0.1.1#53 in 66 ms
Trying "e6858.dsce9.akamaiedge.net"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60195
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 9, ADDITIONAL: 9

;; QUESTION SECTION:
;e6858.dsce9.akamaiedge.net.    IN  AAAA

;; ANSWER SECTION:
e6858.dsce9.akamaiedge.net. 20  IN  AAAA    2a02:26f0:60:186::1aca
e6858.dsce9.akamaiedge.net. 20  IN  AAAA    2a02:26f0:60:199::1aca

;; AUTHORITY SECTION:
dsce9.akamaiedge.net.   1516    IN  NS  n0dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n2dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n3dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  a0dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n4dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n1dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n5dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n6dsce9.akamaiedge.net.
dsce9.akamaiedge.net.   1516    IN  NS  n7dsce9.akamaiedge.net.

;; ADDITIONAL SECTION:
a0dsce9.akamaiedge.net. 1516    IN  AAAA    2600:1480:e800::c0
n0dsce9.akamaiedge.net. 1516    IN  A   88.221.81.194
n1dsce9.akamaiedge.net. 1516    IN  A   23.62.100.157
n2dsce9.akamaiedge.net. 1516    IN  A   95.101.2.121
n3dsce9.akamaiedge.net. 1516    IN  A   95.101.79.79
n4dsce9.akamaiedge.net. 1516    IN  A   23.62.100.159
n5dsce9.akamaiedge.net. 1516    IN  A   23.62.100.164
n6dsce9.akamaiedge.net. 1516    IN  A   23.62.100.165
n7dsce9.akamaiedge.net. 1516    IN  A   23.62.100.166

Received 454 bytes from 127.0.1.1#53 in 29 ms
Trying "e6858.dsce9.akamaiedge.net"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44627
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;e6858.dsce9.akamaiedge.net.    IN  MX

;; AUTHORITY SECTION:
dsce9.akamaiedge.net.   600 IN  SOA n0dsce9.akamaiedge.net. hostmaster.akamai.com. 1489520008 1000 1000 1000 1800

Received 109 bytes from 127.0.1.1#53 in 28 ms

Saída de host -v www.apple.com (após a suspensão):

Trying "www.apple.com"
;; connection timed out; no servers could be reached
    
por freddybob 13.03.2017 / 22:47

1 resposta

0

Na terça-feira (18/04/2017), as atualizações do meu sistema incluíam novas versões de vários pacotes relacionados ao DNS (incluindo dnsutils e dnsmasq-base ). Uma vez que estes foram instalados, o problema desapareceu.

    
por freddybob 21.04.2017 / 11:55