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
相關文章
相關標籤/搜索