开启宿主机的ipv4转发功能

修改配置

echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf

重启network

systemctl restart network

看开启宿主机的ipv4转发功能状态

sysctl net.ipv4.ip_forward

//(0:标识未开启:标识开启)
#net.ipv4.ip_forward = 1

重启docker

systemctl restart docker

杨帆
28 声望3 粉丝