2.5.x iptables enhancement: add new 'recent' match
Subsystems (2)
PATCH 1/1 2.5.x iptables enhancement: add new 'recent' match
Hi Dave!
Here it comes, the very popular iptables 'recent' match, this time the version for the 2.5.x kernel.
Yes, this is the last patch I'm I'm going to send you today. Thanks for your time.
===
Author: Stephen Frost <[email protected]>
This module is used for creating one or many list(s) of recently seen IP addresses and then matching against that/those list(s).
include/linux/netfilter_ipv4/ipt_recent.h +27 -0
@@ -0,0 +1,27 @@ +#ifndef _IPT_RECENT_H +#define _IPT_RECENT_H + +#define RECENT_NAME "ipt_recent" +#define RECENT_VER "v0.3.1" + +#define IPT_RECENT_CHECK 1 +#define IPT_RECENT_SET 2 +#define IPT_RECENT_UPDATE 4 +#define IPT_RECENT_REMOVE 8 +#define IPT_RECENT_TTL 16 + +#define IPT_RECENT_SOURCE 0 +#define IPT_RECENT_DEST 1 + +#define IPT_RECENT_NAME_LEN 200 + +struct ipt_recent_info { +u_int32_t seconds; +u_int32_t hit_count; +u_int8_t check_set; +u_int8_t invert; +char name[IPT_RECENT_NAME_LEN ]; +u_int8_t side; +}; + +#endif /*_IPT_RECENT_H*/
net/ipv4/netfilter/Kconfig +14 -1
@@ -63,7 +63,7 @@ tristate "Amanda backup protocol support" depends on IP_NF_CONNTRACK help - If you are running the Amanda backup package (http://www.amanda.org/) + If you are running the Amanda backup package <http://www.amanda.org/> on this machine or machines that will be MASQUERADED through this machine, then you may want to enable this feature. This allows the connection tracking and natting code to allow the sub-channels that
@@ -161,6 +161,19 @@ If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. If unsure, say `N'. +config IP_NF_MATCH_RECENT + tristate "recent match support" + depends on IP_NF_IPTABLES + help + This match is used for creating one or many lists of recently + used addresses and then matching against that/those list(s). + + Short options are available by using 'iptables -m recent -h' + Official Website: <http://snowman.net/projects/ipt_recent/> + + If you want to compile it as a module, say M here and read + <file:Documentation/modules.txt>. If unsure, say `N'. + config IP_NF_MATCH_ECN tristate "ECN match support" depends on IP_NF_IPTABLES
net/ipv4/netfilter/Makefile +3 -0
@@ -49,6 +49,9 @@ obj-$(CONFIG_IP_NF_MATCH_MULTIPORT) += ipt_multiport.o obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o + +obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o + obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o obj-$(CONFIG_IP_NF_MATCH_DSCP) += ipt_dscp.o obj-$(CONFIG_IP_NF_MATCH_AH_ESP) += ipt_ah.o ipt_esp.o
net/ipv4/netfilter/ipt_recent.c +986 -0
986 lines not on this page · raw message
Please apply, thanks.
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie
From: Harald Welte <[email protected]>
Date: Tue, 24 Jun 2003 21:10:59 +0200
Yes, this is the last patch I'm I'm going to send you today. Thanks for your time.
All applied, thanks Harald.