- 论坛徽章:
- 0
|
用过 iptables 的人可能都知道,里面有个 multiport 模块,可以用来匹配多个离散端口
既然有 multiport 可以匹配多个离散端口,那么为什么不能有匹配多个离散 IP 的模块呢?
于是,参考 multiport 和 iprange 两个模块,我自己改写了一个 multiip 模块,用来匹配多个离散 IP
欢迎大家使用,由于我是在 kernel-2.4 下编写的,不知道 2.6 会不会有问题,有什么 BUG 或不足请告诉我 ^_^
multiip v0.0.1
2006.02.22, platinum
=======================
How to install ?
# make KERNEL_SRC=<your kernel source> IPTABLES_SRC=<your iptables source> install
# depmod -a
How to use ?
# iptables -m multiip -h
multiip v0.0.1 options:
--sip IP[,IP2,IP3] Match source IP
--dip IP[,IP2,IP3] Match destination IP
--both IP[,IP2,IP3] Match both source and destination IP
example: iptables -A FORWARD -m multiip --sip 192.168.1.3,192.168.1.8,192.168.1.33 -j DROP
iptables -A FORWARD -m multiip --dip 222.36.44.8,222.36.44.5 -j DROP
iptables -A FORWARD -m multiip --both 1.2.3.4,5.6.7.8 -j DROP
[ 本帖最后由 platinum 于 2006-7-14 00:53 编辑 ] |
|