求教,拨号 VPS 上使用 docker,容器内没有网络?

2020-08-29 09:55:20 +08:00
 timchou
拨号 vps,装了是 centos,在 docker 容器内发现连不同外网。
本身主机是可以连接的

在主机上 ifconfig 内容如下:

[root@localhost ~]# ifconfig
br-fae39b6a5eab: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.18.0.1 netmask 255.255.0.0 broadcast 172.18.255.255
inet6 fe80::42:62ff:fe31:7c08 prefixlen 64 scopeid 0x20<link>
ether 02:42:62:31:7c:08 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:beff:fec9:399b prefixlen 64 scopeid 0x20<link>
ether 02:42:be:c9:39:9b txqueuelen 0 (Ethernet)
RX packets 1 bytes 28 (28.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 564 (564.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.11.162 netmask 255.255.255.0 broadcast 192.168.11.255
inet6 fe80::212:5dff:fe13:29c prefixlen 64 scopeid 0x20<link>
ether 00:12:5d:13:02:9c txqueuelen 1000 (Ethernet)
RX packets 777899 bytes 79457199 (75.7 MiB)
RX errors 0 dropped 18 overruns 0 frame 0
TX packets 81706 bytes 6706090 (6.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 512
inet 10.251.6.211 netmask 255.255.255.255 destination 10.251.1.226
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 14 bytes 826 (826.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 19 bytes 834 (834.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

我把 firewalld 啥的都关了,而且并不是 dns 无法解析,是直接 ping ip 都不通。求教是不是由于拨号,哪里没配置好呢导致的呢?
287 次点击
所在节点    VPS
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/702351

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX