iptables: Unknown error 4294967295
时间:2014-12-12 01:50 来源:linux.it.net.cn 作者:IT
今天买了个腾讯云,想添加几个限制连接数的规则,没想到iptables老是报iptables: Unknown error 4294967295,我还以为没有加载模块,停止iptables,执行modprobe -r ipt_recent,然后启动iptables,再添加规则还是报错,最后终于找到解决办法了.如下:
cat >> /etc/modprobe.conf <<EOF
options ipt_recent ip_pkt_list_tot=200
EOF
停止iptables后,重新加载recent模块:
modprobe -r ipt_recent
再来添加规则
iptables -A INPUT -p tcp --dport 80 -m recent --name BAD_HTTP_ACCESS --update --seconds 60 --hitcount 100 -j REJECT
iptables -A INPUT -p tcp --dport 80 -m recent --name BAD_HTTP_ACCESS --set -j ACCEPT
service iptables save
保存后没有再报错了,好了,问题解决. (责任编辑:IT)
今天买了个腾讯云,想添加几个限制连接数的规则,没想到iptables老是报iptables: Unknown error 4294967295,我还以为没有加载模块,停止iptables,执行modprobe -r ipt_recent,然后启动iptables,再添加规则还是报错,最后终于找到解决办法了.如下: cat >> /etc/modprobe.conf <<EOF options ipt_recent ip_pkt_list_tot=200 EOF 停止iptables后,重新加载recent模块: modprobe -r ipt_recent 再来添加规则 iptables -A INPUT -p tcp --dport 80 -m recent --name BAD_HTTP_ACCESS --update --seconds 60 --hitcount 100 -j REJECT iptables -A INPUT -p tcp --dport 80 -m recent --name BAD_HTTP_ACCESS --set -j ACCEPT service iptables save 保存后没有再报错了,好了,问题解决. (责任编辑:IT) |