开启宿主机的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
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
systemctl restart network
sysctl net.ipv4.ip_forward
//(0:标识未开启:标识开启)
#net.ipv4.ip_forward = 1
systemctl restart docker
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。