iptables封多个IP

来源:互联网 发布:怎么查凯立德端口 编辑:程序博客网 时间:2024/05/16 06:27

方法1:
# for ((i=30;i<=60;i++));do iptables -A INPUT -s 192.168.0.$i -j DROP;done

方法2:
先给 netfilter 打个补丁,名字叫 iprange 的模块,具体参考我的一篇文章,然后
# iptables -A INPUT -m iprange --src-range 192.168.0.30-192.168.0.60 -j DROP

#http://linux.chinaunix.net/bbs/viewthread.php?tid=591721

原创粉丝点击