现象:
查看 sysctl -a |grep nf_conntrack_max
net.netfilter.nf_conntrack_max = 554288
net.nf_conntrack_max = 554288
执行 service iptables restart
再次查看 sysctl -a |grep nf_conntrack_max
net.netfilter.nf_conntrack_max = 65535
解决方法:
这个大神写的很多 https://blog.51cto.com/linuxadmin/1742720
我总结一下
修改/etc/init.d/iptables:
NF_MODULES_COMMON=(x_tables nf_nat nf_conntrack) # Used by netfilter v4 and v6
为
NF_MODULES_COMMON=(x_tables nf_nat) # Used by netfilter v4 and v6
和
sed -ri ‘s/IPTABLES_SYSCTL_LOAD_LIST=.*/IPTABLES_SYSCTL_LOAD_LIST=”net.nf_conntrack”/g’ /etc/init.d/iptables
https://www.cnblogs.com/guoyabin/p/10838925.html