Home  >  Q&A  >  body text

docker 容器连不了网,怎么处理

docker 容器连不了网,怎么处理

PHPzPHPz2756 days ago979

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-26 09:03:17

    Run in host sysctl net.ipv4.conf.all.forwarding 确保这个转发功能为开启。
    如果没开的话运行 sysctl net.ipv4.conf.all.forwarding=1 Enable it.

    reply
    0
  • 阿神

    阿神2017-04-26 09:03:17

    I have encountered this problem before. It was caused by modifying the firewall settings. Restarting the docker service can solve it.

    The poster can try to restart the docker service, centos is service docker restart

    reply
    0
  • Cancelreply