乌班图20.04“名称解析临时失败”——最近重新安装

6

我租了一台来自Contabo的VPS大约半年了,一直都很好用,但最近开始出现“名称解析临时失败”的错误。我看到这是个DNS错误,已经尝试使用nameserver 8.8.8.8nameserver 1.1.1.1,但问题仍然存在。

昨天我完全重新安装了这个VPS,但仍然没有解决问题。

/etc/resolv.conf:

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0
search invalid

resolvectl 状态:

Global
       LLMNR setting: no                  
MulticastDNS setting: no                  
  DNSOverTLS setting: no                  
      DNSSEC setting: no                  
    DNSSEC supported: no                  
          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 (eth0)
      Current Scopes: DNS          
DefaultRoute setting: yes          
       LLMNR setting: yes          
MulticastDNS setting: no           
  DNSOverTLS setting: no           
      DNSSEC setting: no           
    DNSSEC supported: no           
  Current DNS Server: 213.136.95.11
         DNS Servers: 213.136.95.10
                      213.136.95.11
          DNS Domain: invalid 

我有一个Discord机器人,通常问题就出在那里。


1
你解决了吗? - Geir
1
在这里遇到了相同的问题。 - Shery
1个回答

1
我会尝试编辑DNS IP地址在/etc/netplan/01-netcfg.yaml中,用于Ubuntu 17.10及以上版本的Contabo VPS。

/etc/netplan/01-netcfg.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      match:
        macaddress: REDACTED
      addresses:
        - REDACTED
        #- REDACTED
      #gateway6: fe80::1
      routes:
        - to: 0.0.0.0/0
          via: REDACTED
          on-link: true
      nameservers:
        search: [ invalid ]
        addresses:
          - 1.1.1.1
          - 8.8.8.8
          #- 213.136.95.10
          #- 213.136.95.11
          #- 2a02:c207::1:53
          #- 2a02:c207::2:53

https://contabo.com/blog/configuring-additional-ip-addresses/


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接