Ubuntu 22.04 docker 搬家后名称解析失败

Ubuntu 22.04 docker 搬家后名称解析失败

搬家后,我无法连接到互联网(本地和外部),我的安装了 docker 和家庭助理的 ubuntu 服务器。我没有更改服务器内部的任何内容,只是离线了大约 2 个月。现在我在新家里安装了网络,当我连接时,服务器名称解析失败。

您可能会要求以下事项:

  • ping google.com
ping: google.com: Temporary failure in name resolution
  • ping 8.8.8.8
ping: connect: Network is unreachable
  • netplan 正在运行
network:
  renderer: networkd
  ethernets:
    all:
      dhcp4: true
      dhcp6: true
      match:
        name: 'en*'
      addresses:
        - 192.168.1.145/24
      nameservers:
        addresses:
          - 8.8.8.8
          - 8.8.4.4
  version: 2
  • /etc/resolv.conf
nameserver 127.0.0.53
options edns0 trust-ad
search .
  • Docker 没有重复
dpkg -l | grep docker
ii docker-buildx-plugin 0.10.4-1~ubuntu.22.04~jammy amd64
ii docker-ce 5:23.0.5-1~ubuntu.22.04~jammy amd64
ii docker-ce-cli 5:23.0.5-1~ubuntu.22.04~jammy amd64
ii docker-ce-rootless.extras 5:23.0.5-1~ubuntu.11.04~jammy amd64
ii docker-compose-plugin 2.17.3-1~ubuntu.22.04~jammy amd64

snap list | grep docker
No results.
  • IP 接口
ip address
1: lo: <LOOPBACK,UP,LOWER,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_code1 state UP group default qlen 1000
link/ether 78:2b:cb:xx:xx:xx brd ff:ff:ff:ff:ff:ff
altname enp0s25
inet 192.168.1.145/24 brd 192.168.1.255 scope global eno1
valid_lft forever preferred_lft forever
inet6 fe80::7a2b:cbff:fead:16c9/64 scope link
valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mut 1500 qdisc noqueue state DOWN group default
link/ether xx:xx:xx:xx:xx:xx brd xx:xx:xx:xx:xx:xx
inet 172.17.0.1/16 brd 172.17.255.255 scope global eno1
valid_lft forever preferred_lft forever
inet6 fe80::42:3fff:fe06:7d5b/64 scope link
valid_lft forever preferred_lft forever
4: br-8b3ff1e2bfb1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 172.18.0.1/16 brd 172.18.255.255 scope globar  br-8b3ff1e2bfb1
valid_lft forever preferred_lft forever
inet6 xxxx::xx:xxxx:xxxx:xxxx/64 scope link
valid_lft forever preferred_lft forever
6: veth01ve2d5@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-8b3ff1e2bfb1 state UP group default
link/ether xx:xx:xx:xx:xx:xx brd xx:xx:xx:xx:xx:xx link netnsid 0
inet6 xxxx::xxxx:xxxx:xxxx:xxxx/64 scope link
valid_lft forever preferred_lft forever
8:vethbe49496@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-8b3ff1e2bfb1 state UP group default
link/ether xx:xx:xx:xx:xx:xx brd xx:xx:xx:xx:xx:xx link netnsid 2
inet6 xxxx::xxxx:xxxx:xxxx:xxxx/64 scope link
valid_lft forever preferred_lft forever
10: veth1bc4892@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-8b3ff1e2bfb1 state UP group default
link/ether xx:xx:xx:xx:xx:xx brd xx:xx:xx:xx:xx:xx link netnsid 1
inet6 xxxx::xxxx:xxxx:xxxx:xxxx/64 scope link
valid_lft forever preferred_lft forever
  • 路由
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br8b3ff1e2bfb1 proto kernel scope link src 172.18.0.1
192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.145
  • ufw 状态
Status: inactive
  • iptables -S
-P INPUT ACCEPT
-P FORWARD DROP
-P OUTPUT ACCEPT
  • iptables-旧版-S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

如果需要更多信息,请提出。非常感谢

相关内容