Docker报错bridge-nf-call-iptables内核修整
2023年8月13日...小于 1 分钟
Docker报错bridge-nf-call-iptables内核修整
bridge-nf-call-iptables
1)警告信息如下:
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
2)解决方法:
修改系统文件是的机器bridge模式开启
设置机器开机启动的时候执行下面两条命令
编辑vim /etc/rc.d/rc.local添加下面两条命令
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables
CentOS 7需要增加执行权限:
chmod +x /etc/rc,d/rc.local
3)I solve this problem by execting two commands:
sysctl net.bridge.bridge-nf-call-iptables=1
sysctl net.bridge.bridge-nf-call-ip6tables=1
4)必须写进去报错才会消失,如果没消失,检查selinux和firewalld是否有其他阻碍的规则 /etc/sysctl.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward
解决方法:
sudo vim /usr/lib/sysctl.d/00-system.conf
#添加如下代码:
net.ipv4.ip_forward=1
你认为这篇文章怎么样?
- 0
- 0
- 0
- 0
- 0
- 0
Powered by Waline v3.3.2