IPv4 forwarding is disabled.

返回
Author Avatar
钢翼
2021-12-28
编程
64

启动docker容器报错如下

IPv4 forwarding is disabled. Networking will not work.

解决办法 https://blog.csdn.net/yelllowcong/article/details/78295600


vi /etc/sysctl.conf

添加以下配置

#配置转发
net.ipv4.ip_forward=1
#重启服务,让配置生效
systemctl restart network

#查看是否成功,如果返回为“net.ipv4.ip_forward = 1”则表示成功

sysctl net.ipv4.ip_forward