CentOS7添加系统网络相关参数报错 出现No such file or directory

1、CentOS7添加net.bridge.bridge-nf-call-iptables 出现No such file or directory

  1、添加CentOS7的系统参数报错

  一、添加/etc/sysctl.conf参数

echo "# bridge" >> /etc/sysctl.conf echo "net.bridge.bridge-nf-call-iptables = 1" >> /etc/sysctl.conf echo "net.bridge.bridge-nf-call-ip6tables = 1" >> /etc/sysctl.conf sysctl -p

  二、报错以下

# sysctl -p net.ipv4.ip_nonlocal_bind = 1 net.ipv4.ip_forward = 1 sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: No such file or directory sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-ip6tables: No such file or directory

  三、解决以下

[root@controller01 ml2]#  modprobe br_netfilter [root@controller01 ml2]# ls /proc/sys/net/bridge bridge-nf-call-arptables  bridge-nf-call-iptables        bridge-nf-filter-vlan-tagged bridge-nf-call-ip6tables  bridge-nf-filter-pppoe-tagged  bridge-nf-pass-vlan-input-dev [root@controller01 ml2]# sysctl -p net.ipv4.ip_nonlocal_bind = 1 net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-ip6tables = 1
相关文章
相关标签/搜索