目录

WARNING: bridge-nf-call-iptables is disabled

问题

今天在使用 docker 时出现如下问题:

1
WARNING: bridge-nf-call-iptables is disabled

https://cdn.xiaobinqt.cn/xiaobinqt.io/20220512/5851b966f1d243718279d4e31dd229e6.png?imageView2/0/q/75|watermark/2/text/eGlhb2JpbnF0/font/dmlqYXlh/fontsize/1000/fill/IzVDNUI1Qg==/dissolve/52/gravity/SouthEast/dx/15/dy/15
warning

我的系统版本是CentOS 7.9

https://cdn.xiaobinqt.cn/xiaobinqt.io/20220512/1265baf476d6436a87f9d0f04eeb2125.png?imageView2/0/q/75|watermark/2/text/eGlhb2JpbnF0/font/dmlqYXlh/fontsize/1000/fill/IzVDNUI1Qg==/dissolve/52/gravity/SouthEast/dx/15/dy/15
系统版本

解决办法

1
vim /etc/sysctl.conf

/etc/sysctl.conf 中添加如下内容:

1
2
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1

执行 sysctl -p 即可。