docker提示没有开启转发解决方法

Posted qiangyuzhou

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker提示没有开启转发解决方法相关的知识,希望对你有一定的参考价值。

 vim  /usr/lib/sysctl.d/00-system.conf

[root@t1 ~]# vim /usr/lib/sysctl.d/00-system.conf
# Kernel sysctl configuration file
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.

# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
net.ipv4.ip_forward=1
~
~
~


 

或者:

 

临时生效:

echo "1" > /proc/sys/net/ipv4/ip_forward

永久生效的话,需要修改sysctl.conf:

net.ipv4.ip_forward = 1

执行sysctl -p马上生效

 

以上是关于docker提示没有开启转发解决方法的主要内容,如果未能解决你的问题,请参考以下文章

Docker使用错误小结

repmgr集群docker环境开启SQL转发功能报错

加入域提示“不能访问网路位置” 的解决方法

Docker启动时提示Get Permission Denied while trying to connect解决方法

pycharm没有代码提示怎么办

chrome浏览器开启了提示保存密码,但仍没有保存密码的处理方法