V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
通过以下 Referral 链接购买 DigitalOcean 主机,你将可以帮助 V2EX 持续发展
DigitalOcean - SSD Cloud Servers
timchou
V2EX  ›  VPS

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

  •  
  •   timchou · 2020-08-29 09:55:20 +08:00 · 307 次点击
    这是一个创建于 1548 天前的主题,其中的信息可能已经有所发展或是发生改变。
    拨号 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 都不通。求教是不是由于拨号,哪里没配置好呢导致的呢?
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2637 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 05:47 · PVG 13:47 · LAX 21:47 · JFK 00:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.