platinum 回复于:2004-01-01 01:14:13 |
iptables -I INPUT -s 211.1.0.0/16 -j DROP iptables -I INPUT -s 211.2.0.0/16 -j DROP iptables -I INPUT -s 211.3.0.0/16 -j DROP ..... iptables -I INPUT -s 211.10.0.0/16 -j DROP |
Tures 回复于:2004-01-01 01:38:52 |
若是整段的呢 比如 211.0.0.0 - 211.255.255.255 能不能给我全部的参考资料 :) 谢谢 新年快乐 |
platinum 回复于:2004-01-01 01:39:54 |
iptables -I INPUT -s 211.0.0.0/8 -j DROP 同快乐:) |
Tures 回复于:2004-01-01 01:40:33 |
061.037.080.000->061.037.081.255 呢??? |
platinum 回复于:2004-01-01 01:42:24 |
iptables -I INPUT -s 61.37.80.0/24 -j DROP iptables -I INPUT -s 61.37.81.0/24 -j DROP |
Tures 回复于:2004-01-01 01:53:18 |
我想让服务器每次启动就自动运行 iptables -I INPUT -s 211.1.0.0 -j DROP 这命令把此IP给封掉 改加入到哪里呢? |
Tures 回复于:2004-01-01 01:53:36 |
我想让服务器每次启动就自动运行 iptables -I INPUT -s 211.1.0.0 -j DROP 这命令把此IP给封掉 改加入到哪里呢? |
don 回复于:2004-01-01 06:31:11 |
I use iptables iprange module to do that. You need to patch your kernel with latest iptables and recompile. syntax is: iptables -I INPUT -i eth0 -m iprange --src-range 38.118.0.0-38.118.143.142 -j DROP see http://www.iptables.org for detail |
Tures 回复于:2004-01-01 14:15:41 |
iptables -I INPUT -s 211.1.0.0/16 -j DROP 似乎没什么作用,不如单个IP的管用 :( 我安装了 iptable 1.2.9后 用iptables -I INPUT -i eth0 -m iprange --src-range 38.118.0.0-38.118.143.142 -j DROP 这命令,提示[root@plain zeus]# iptables -I INPUT -i eth0 -m iprange --src 218.151.70.141 -j DROP iptables v1.2.7a: Couldn't load match `iprange':/lib/iptables/libipt_iprange.so: cannot open shared object file: No such file or directory Try `iptables -h' or 'iptables --help' for more information. |
Tures 回复于:2004-01-02 02:06:41 |
t |
eagerlinuxer 回复于:2004-01-02 02:43:07 |
[quote:66008c4a95="Tures"]我想让服务器每次启动就自动运行 iptables -I INPUT -s 211.1.0.0 -j DROP 这命令把此IP给封掉 改加入到哪里呢?[/quote:66008c4a95] 有三个方法: 1、把它加到/etc/rc.local中 2、iptables-save >/etc/sysconfig/iptables可以把你当前的iptables规则放到/etc/sysconfig/iptables中,系统启动iptables时自动执行。 3、service iptables save 也可以把你当前的iptables规则放/etc/sysconfig/iptables中,系统启动iptables时自动执行。 后两种更好此,一般iptables服务会.network服务之前启来,更安全。 |
don 回复于:2004-01-03 01:35:38 |
Have you patched and recompiled your kernel? It also looks like you are still using old iptables v1.2.7a. To do so: 1. download and uncompress iptables-1.2.9 2. download and uncompress patch-o-matic 3. assume you have kernel source linux-2.4.23 4. patch the kernel cd patch-o-matic KERNEL_DIR=../linux-2.4.23 ./runme base # choose iprange module to add 5. recompile kernel with iprange module enabled 6. compile and install iptables, remove your old version iptables package before this step. cd iptables-1.2.9 make install KERNEL_DIR=../linux-2.4.23 Good luck. :) [quote:7566153611="Tures"]in zeus]# iptables -I INPUT -i eth0 -m iprange --src 218.151.70.141 -j DROP iptables v1.2.7a: Couldn't load match `iprange':/lib/iptables/libipt_iprange.so: cannot open shared object file: No such fi..........[/quote:7566153611] |