docker出现IPv4 forwarding is disabled. Networking will not work解决方法
之前用docker部署阿里云ddns,最近一周我突然发现无法解析了,用docker logs ddns一看,发现全是ipv4转发错误,因我解决的时候没有记录日志里的错误,但重启容器的时候,给我报了个WARNING: IPv4 forwarding is disabled. Networking will not work.的错误,下面来看看解决办法:
系统:centos 7.x(64位)
1.修改内核参数
vi /etc/sysctl.conf
net.ipv4.ip_forward=0
改成
net.ipv4.ip_forward=1
2.重启network服务
systemctl restart netw...