3 # Copyright (C) 2006-2010 OpenWrt.org
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 NF_MENU:=Netfilter Extensions
11 include $(INCLUDE_DIR)/netfilter.mk
13 define KernelPackage/ipt-core
18 CONFIG_NETFILTER_ADVANCED=y \
20 FILES:=$(foreach mod,$(IPT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
21 AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_CORE-m)))
24 define KernelPackage/ipt-core/description
25 Netfilter core kernel modules
36 $(eval $(call KernelPackage,ipt-core))
41 DEPENDS+= kmod-ipt-core $(1)
45 define KernelPackage/ipt-conntrack
46 TITLE:=Basic connection tracking modules
47 KCONFIG:=$(KCONFIG_IPT_CONNTRACK)
48 FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).ko)
49 AUTOLOAD:=$(call AutoLoad,41,$(notdir $(IPT_CONNTRACK-m)))
50 $(call AddDepends/ipt)
53 define KernelPackage/ipt-conntrack/description
54 Netfilter (IPv4) kernel modules for connection tracking
63 $(eval $(call KernelPackage,ipt-conntrack))
66 define KernelPackage/ipt-conntrack-extra
67 TITLE:=Extra connection tracking modules
68 KCONFIG:=$(KCONFIG_IPT_CONNTRACK_EXTRA)
69 FILES:=$(foreach mod,$(IPT_CONNTRACK_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
70 AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_CONNTRACK_EXTRA-m)))
71 $(call AddDepends/ipt,+kmod-ipt-conntrack)
74 define KernelPackage/ipt-conntrack-extra/description
75 Netfilter (IPv4) extra kernel modules for connection tracking
84 $(eval $(call KernelPackage,ipt-conntrack-extra))
87 define KernelPackage/ipt-filter
88 TITLE:=Modules for packet content inspection
89 KCONFIG:=$(KCONFIG_IPT_FILTER)
90 FILES:=$(foreach mod,$(IPT_FILTER-m),$(LINUX_DIR)/net/$(mod).ko)
91 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_FILTER-m)))
92 $(call AddDepends/ipt,+kmod-textsearch)
95 define KernelPackage/ipt-filter/description
96 Netfilter (IPv4) kernel modules for packet content inspection
102 $(eval $(call KernelPackage,ipt-filter))
105 define KernelPackage/ipt-ipopt
106 TITLE:=Modules for matching/changing IP packet options
107 KCONFIG:=$(KCONFIG_IPT_IPOPT)
108 FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).ko)
109 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPOPT-m)))
110 $(call AddDepends/ipt)
113 define KernelPackage/ipt-ipopt/description
114 Netfilter (IPv4) modules for matching/changing IP packet options
119 - hl/HL (2.6.30 and later)
125 - tos/TOS (prior to 2.6.25)
126 - ttl/TTL (prior to 2.6.30)
130 $(eval $(call KernelPackage,ipt-ipopt))
133 define KernelPackage/ipt-ipsec
134 TITLE:=Modules for matching IPSec packets
135 KCONFIG:=$(KCONFIG_IPT_IPSEC)
136 FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).ko)
137 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPSEC-m)))
138 $(call AddDepends/ipt)
141 define KernelPackage/ipt-ipsec/description
142 Netfilter (IPv4) modules for matching IPSec packets
149 $(eval $(call KernelPackage,ipt-ipsec))
152 define KernelPackage/ipt-nat
153 TITLE:=Basic NAT targets
154 KCONFIG:=$(KCONFIG_IPT_NAT)
155 FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
156 AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_NAT-m)))
157 $(call AddDepends/ipt,+kmod-ipt-conntrack)
160 define KernelPackage/ipt-nat/description
161 Netfilter (IPv4) kernel modules for basic NAT targets
166 $(eval $(call KernelPackage,ipt-nat))
169 define KernelPackage/ipt-nat-extra
170 TITLE:=Extra NAT targets
171 KCONFIG:=$(KCONFIG_IPT_NAT_EXTRA)
172 FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
173 AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_NAT_EXTRA-m)))
174 $(call AddDepends/ipt,+kmod-ipt-nat)
177 define KernelPackage/ipt-nat-extra/description
178 Netfilter (IPv4) kernel modules for extra NAT targets
185 $(eval $(call KernelPackage,ipt-nat-extra))
188 define KernelPackage/ipt-nathelper
189 TITLE:=Basic Conntrack and NAT helpers
190 KCONFIG:=$(KCONFIG_IPT_NATHELPER)
191 FILES:=$(foreach mod,$(IPT_NATHELPER-m),$(LINUX_DIR)/net/$(mod).ko)
192 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_NATHELPER-m)))
193 $(call AddDepends/ipt,+kmod-ipt-nat)
196 define KernelPackage/ipt-nathelper/description
197 Default Netfilter (IPv4) Conntrack and NAT helpers
204 $(eval $(call KernelPackage,ipt-nathelper))
207 define KernelPackage/ipt-nathelper-extra
208 TITLE:=Extra Conntrack and NAT helpers
209 KCONFIG:=$(KCONFIG_IPT_NATHELPER_EXTRA)
210 FILES:=$(foreach mod,$(IPT_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
211 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_NATHELPER_EXTRA-m)))
212 $(call AddDepends/ipt,+kmod-ipt-nat +kmod-textsearch)
215 define KernelPackage/ipt-nathelper-extra/description
216 Extra Netfilter (IPv4) Conntrack and NAT helpers
228 $(eval $(call KernelPackage,ipt-nathelper-extra))
231 define KernelPackage/ipt-imq
232 TITLE:=Intermediate Queueing support
235 CONFIG_IMQ_BEHAVIOR_BA=y \
236 CONFIG_IMQ_NUM_DEVS=2 \
237 CONFIG_NETFILTER_XT_TARGET_IMQ
239 $(LINUX_DIR)/drivers/net/imq.ko \
240 $(foreach mod,$(IPT_IMQ-m),$(LINUX_DIR)/net/$(mod).ko)
241 AUTOLOAD:=$(call AutoLoad,46,$(notdir \
245 $(call AddDepends/ipt)
248 define KernelPackage/ipt-imq/description
249 Kernel support for Intermediate Queueing devices
252 $(eval $(call KernelPackage,ipt-imq))
255 define KernelPackage/ipt-queue
256 TITLE:=Module for user-space packet queueing
257 KCONFIG:=$(KCONFIG_IPT_QUEUE)
258 FILES:=$(foreach mod,$(IPT_QUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
259 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_QUEUE-m)))
260 $(call AddDepends/ipt)
263 define KernelPackage/ipt-queue/description
264 Netfilter (IPv4) module for user-space packet queueing
269 $(eval $(call KernelPackage,ipt-queue))
272 define KernelPackage/ipt-ulog
273 TITLE:=Module for user-space packet logging
274 KCONFIG:=$(KCONFIG_IPT_ULOG)
275 FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
276 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_ULOG-m)))
277 $(call AddDepends/ipt)
280 define KernelPackage/ipt-ulog/description
281 Netfilter (IPv4) module for user-space packet logging
286 $(eval $(call KernelPackage,ipt-ulog))
289 define KernelPackage/ipt-tproxy
290 TITLE:=Transparent proxying support
292 CONFIG_NETFILTER_TPROXY \
293 CONFIG_NETFILTER_XT_MATCH_SOCKET \
294 CONFIG_NETFILTER_XT_TARGET_TPROXY
296 $(LINUX_DIR)/net/netfilter/nf_tproxy_core.ko \
297 $(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
298 AUTOLOAD:=$(call AutoLoad,45,$(notdir nf_tproxy_core $(IPT_TPROXY-m)))
299 $(call AddDepends/ipt)
302 define KernelPackage/ipt-tproxy/description
303 Kernel modules for Transparent Proxying
306 $(eval $(call KernelPackage,ipt-tproxy))
309 define KernelPackage/ipt-iprange
310 TITLE:=Module for matching ip ranges
311 KCONFIG:=$(KCONFIG_IPT_IPRANGE)
312 FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).ko)
313 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPRANGE-m)))
314 $(call AddDepends/ipt)
317 define KernelPackage/ipt-iprange/description
318 Netfilter (IPv4) module for matching ip ranges
323 $(eval $(call KernelPackage,ipt-iprange))
326 define KernelPackage/ipt-extra
328 KCONFIG:=$(KCONFIG_IPT_EXTRA)
329 FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
330 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_EXTRA-m)))
331 $(call AddDepends/ipt)
334 define KernelPackage/ipt-extra/description
335 Other Netfilter (IPv4) kernel modules
337 - condition (2.4 only)
339 - physdev (if bridge support was enabled in kernel)
344 $(eval $(call KernelPackage,ipt-extra))
347 define KernelPackage/ip6tables
351 KCONFIG:=$(KCONFIG_IPT_IPV6)
352 FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).ko)
353 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPT_IPV6-m)))
356 define KernelPackage/ip6tables/description
357 Netfilter IPv6 firewalling support
360 $(eval $(call KernelPackage,ip6tables))
363 define KernelPackage/arptables
365 TITLE:=ARP firewalling modules
366 FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.ko
367 KCONFIG:=CONFIG_IP_NF_ARPTABLES \
368 CONFIG_IP_NF_ARPFILTER \
369 CONFIG_IP_NF_ARP_MANGLE
370 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(patsubst %.ko,%,$(wildcard $(LINUX_DIR)/net/ipv4/netfilter/arp*.ko))))
373 define KernelPackage/arptables/description
374 Kernel modules for ARP firewalling
377 $(eval $(call KernelPackage,arptables))
380 define KernelPackage/ebtables
382 TITLE:=Bridge firewalling modules
383 FILES:=$(foreach mod,$(EBTABLES-m),$(LINUX_DIR)/net/$(mod).ko)
384 KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
386 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES-m)))
389 define KernelPackage/ebtables/description
390 ebtables is a general, extensible frame/packet identification
391 framework. It provides you to do Ethernet
392 filtering/NAT/brouting on the Ethernet bridge.
395 $(eval $(call KernelPackage,ebtables))
398 define AddDepends/ebtables
400 DEPENDS+=kmod-ebtables $(1)
404 define KernelPackage/ebtables-ipv4
405 TITLE:=ebtables: IPv4 support
406 FILES:=$(foreach mod,$(EBTABLES_IP4-m),$(LINUX_DIR)/net/$(mod).ko)
407 KCONFIG:=$(KCONFIG_EBTABLES_IP4)
408 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_IP4-m)))
409 $(call AddDepends/ebtables)
412 define KernelPackage/ebtables-ipv4/description
413 This option adds the IPv4 support to ebtables, which allows basic
414 IPv4 header field filtering, ARP filtering as well as SNAT, DNAT targets.
417 $(eval $(call KernelPackage,ebtables-ipv4))
420 define KernelPackage/ebtables-ipv6
421 TITLE:=ebtables: IPv6 support
422 FILES:=$(foreach mod,$(EBTABLES_IP6-m),$(LINUX_DIR)/net/$(mod).ko)
423 KCONFIG:=$(KCONFIG_EBTABLES_IP6)
424 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_IP6-m)))
425 $(call AddDepends/ebtables)
428 define KernelPackage/ebtables-ipv6/description
429 This option adds the IPv6 support to ebtables, which allows basic
430 IPv6 header field filtering and target support.
433 $(eval $(call KernelPackage,ebtables-ipv6))
436 define KernelPackage/ebtables-watchers
437 TITLE:=ebtables: watchers support
438 FILES:=$(foreach mod,$(EBTABLES_WATCHERS-m),$(LINUX_DIR)/net/$(mod).ko)
439 KCONFIG:=$(KCONFIG_EBTABLES_WATCHERS)
440 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_WATCHERS-m)))
441 $(call AddDepends/ebtables)
444 define KernelPackage/ebtables-watchers/description
445 This option adds the log watchers, that you can use in any rule
446 in any ebtables table.
449 $(eval $(call KernelPackage,ebtables-watchers))
452 define KernelPackage/nfnetlink
454 TITLE:=Netlink-based userspace interface
455 DEPENDS:=+kmod-ipt-core
456 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink.ko
457 KCONFIG:=CONFIG_NETFILTER_NETLINK
458 AUTOLOAD:=$(call AutoLoad,48,nfnetlink)
461 define KernelPackage/nfnetlink/description
462 Kernel modules support for a netlink-based userspace interface
465 $(eval $(call KernelPackage,nfnetlink))
468 define AddDepends/nfnetlink
470 DEPENDS+=+kmod-nfnetlink $(1)
474 define KernelPackage/nfnetlink-log
475 TITLE:=Netfilter LOG over NFNETLINK interface
476 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_log.ko
477 KCONFIG:=CONFIG_NETFILTER_NETLINK_LOG
478 AUTOLOAD:=$(call AutoLoad,48,nfnetlink_log)
479 $(call AddDepends/nfnetlink)
482 define KernelPackage/nfnetlink-log/description
483 Kernel modules support for logging packets via NFNETLINK
486 $(eval $(call KernelPackage,nfnetlink-log))
489 define KernelPackage/nfnetlink-queue
490 TITLE:=Netfilter QUEUE over NFNETLINK interface
491 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_queue.ko
492 KCONFIG:=CONFIG_NETFILTER_NETLINK_QUEUE
493 AUTOLOAD:=$(call AutoLoad,48,nfnetlink_queue)
494 $(call AddDepends/nfnetlink)
497 define KernelPackage/nfnetlink-queue/description
498 Kernel modules support for queueing packets via NFNETLINK
501 $(eval $(call KernelPackage,nfnetlink-queue))
504 define KernelPackage/nf-conntrack-netlink
505 TITLE:=Connection tracking netlink interface
506 FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
507 KCONFIG:=CONFIG_NF_CT_NETLINK
508 AUTOLOAD:=$(call AutoLoad,49,nf_conntrack_netlink)
509 $(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
512 define KernelPackage/nf-conntrack-netlink/description
513 Kernel modules support for a netlink-based connection tracking
517 $(eval $(call KernelPackage,nf-conntrack-netlink))
519 define KernelPackage/ipt-hashlimit
521 TITLE:=Netfilter hashlimit match
522 KCONFIG:=$(KCONFIG_IPT_HASHLIMIT)
523 FILES:=$(LINUX_DIR)/net/netfilter/xt_hashlimit.ko
524 AUTOLOAD:=$(call AutoLoad,50,xt_hashlimit)
525 $(call KernelPackage/ipt)
528 define KernelPackage/ipt-hashlimit/description
529 Kernel modules support for the hashlimit bucket match module
532 $(eval $(call KernelPackage,ipt-hashlimit))