Docker WARNING IPv4 forwarding is disabled. Networking will not work
Docker About 362 words具体错误
Docker
启动Nginx
时出现警告信息,宿主机可以通过curl
访问,但外部机器无法访问Nginx
。
WARNING: IPv4 forwarding is disabled. Networking will not work.
原因
未开启ipv4
转发。
查看ipv4
转发配置:
sysctl net.ipv4.ip_forward
解决
方法一
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
systemctl restart network
方法二
echo "net.ipv4.ip_forward=1" >> /usr/lib/sysctl.d/00-system.conf
systemctl restart network
Views: 1,412 · Posted: 2022-01-28
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...