报错详情如下所示:

[root@node3 ~]# cat /etc/sysctl.conf 
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

net.bridge.bridge-nf-call-ip6tables = 1 
net.bridge.bridge-nf-call-iptables = 1
[root@node3 ~]# 
[root@node3 ~]# sysctl -p /etc/sysctl.conf 
sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-ip6tables: No such file or directory
sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: No such file or directory
[root@node3 ~]# 

解决方法:

加载模块:br_netfilter

[root@node3 ~]# lsmod | grep br_netfilter
[root@node3 ~]# 
[root@node3 ~]# modprobe br_netfilter
[root@node3 ~]# 
[root@node3 ~]# lsmod | grep br_netfilter
br_netfilter           22256  0 
bridge                151336  1 br_netfilter
[root@node3 ~]# 
[root@node3 ~]# ls -ltr /proc/sys/net/bridge/ | grep bridge-nf
-rw-r--r-- 1 root root 0 Oct 29 00:12 bridge-nf-pass-vlan-input-dev
-rw-r--r-- 1 root root 0 Oct 29 00:12 bridge-nf-filter-vlan-tagged
-rw-r--r-- 1 root root 0 Oct 29 00:12 bridge-nf-filter-pppoe-tagged
-rw-r--r-- 1 root root 0 Oct 29 00:12 bridge-nf-call-iptables
-rw-r--r-- 1 root root 0 Oct 29 00:12 bridge-nf-call-ip6tables
-rw-r--r-- 1 root root 0 Oct 29 00:12 bridge-nf-call-arptables
[root@node3 ~]# 

然后,再次尝试:

[root@node3 ~]# sysctl -p /etc/sysctl.conf 
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
[root@node3 ~]# 

可以看到,这次【sysctl -p】,就没有之前的报错了。


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

隐藏
变装