Ubuntu Server 18.04.2-DNS 名称解析不起作用

Ubuntu Server 18.04.2-DNS 名称解析不起作用

我有一台运行 Ubuntu 18.04 的虚拟机,运行正常,但最近发现无法更新服务器。似乎是 DNS 名称解析问题。

我已确认DNS工作正常,并且没有防火墙禁止正确的名称解析。

我看到有人提到名称解析错误,但显然我无法执行名称解析,因此无法更新服务器。有什么帮助吗?

Apt 更新时的原始错误:

user001@server001:~$ sudo apt-get update
sudo: unable to resolve host server001: Resource temporarily unavailable
[sudo] password for user001:
Err:1 https://download.docker.com/linux/ubuntu bionic InRelease
  Temporary failure resolving 'download.docker.com'
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/bionic/InRelease  Temporary failure resolving 'download.docker.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

名称解析失败:

user001@server001:~$ ping google.co.uk
ping: google.co.uk: Temporary failure in name resolution
user001@server001:~$

针对同一服务器的 NSLookup 工作正常:

user001@server001:~$ nslookup
> server 192.168.0.201
Default server: 192.168.0.201
Address: 192.168.0.201#53
> google.co.uk
Server:         192.168.0.201
Address:        192.168.0.201#53

Non-authoritative answer:
Name:   google.co.uk
Address: 172.217.169.3
Name:   google.co.uk
Address: 2a00:1450:4009:818::2003
> exit

Systemd-resolve 输出:

user001@server001:~$ systemd-resolve --status
Global
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 2 (ens160)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.0.201
                      192.168.0.1

几点补充。我使用的是 Netplan,IP 信息是通过 DHCP 分配的。所有这些都是默认的。该服务器用于运行 docker for dev。

有人能建议下一步吗?

谢谢

相关内容