启用NET.BRIDGE.BRIDGE-NF-CALL-IPTABLES内核选项。
sysctl -w net.bridge.bridge-nf-call-iptables=1
输入modprobe br_netfilter即可
[root@localhost sysctl.d]# modprobe br_netfilter
[root@localhost sysctl.d]# sysctl -w net.bridge.bridge-nf-call-iptables=1
net.bridge.bridge-nf-call-iptables = 1
[root@localhost sysctl.d]# sysctl -a |grep net.bridge.bridge-nf-call-iptables
net.bridge.bridge-nf-call-iptables = 1
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.ens32.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
sysctl: reading key "net.ipv6.conf.virbr0.stable_secret"
sysctl: reading key "net.ipv6.conf.virbr0-nic.stable_secret"
[root@localhost sysctl.d]#