DreamCat 发表于 2007-5-11 11:12:19

为什么 BFW 没有 IPSET?

官方主页: http://ipset.netfilter.org/
发现中文站点对 ipset 的应用描述的也不多。
简单的应用:
可以用 ipset 配合 iptables 完成很多功能,比如:
1、ipset -N ban_list iptree --timeout 3600
   或者 ipset -N ban_list iphash ....
2、iptables ...-m set --set ip_list src -j DROP
3、ipset -A ip_list 222.222.222.222
步骤不要弄错了。

set 是什么?集合!!!ipset就是个ip集合,有了ipset可以在不分网段的情况下直接对不同IP做不同的处理(这话似乎不必我说)。应用方面很多~~~~~~


ipset 的 man page

iptables 中 ipset 相关的部分:
setThis modules macthes IP sets which can be defined by ipset(8).
--set setname flag[,flag...] where flags are src and/or dst and there can be no more than six of them. Hence the commandiptables -A FORWARD -m set --set test src,dstwill match packets, for which (depending on the type of the set) the source address or port number of the packet can be found in the specified set. If there is a binding belonging to the mached set element or there is a default binding for the given set, then the rule will match the packet only if additionally (depending on the type of the set) the destination address or port number of the packet can be found in the set according to the binding.

[ 本帖最后由 DreamCat 于 2007-5-12 11:44 编辑 ]

DreamCat 发表于 2007-5-12 11:36:58

引用CU上archangle 的话:


       经常用iptables的人可能会很喜欢这个东西的。因为他可以作到动态改变iptables的过滤条件,却不必去修改iptables规则。可以做动态的防火墙。
甚至可以通过数据库来控制过滤规则,然后用web页面来管理。


与我的想法一致~~:victory: ,不过用数据库来控制过滤规则实在是有难度,除非用内存数据库。

[ 本帖最后由 DreamCat 于 2007-5-12 11:39 编辑 ]
页: [1]
查看完整版本: 为什么 BFW 没有 IPSET?