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-lib-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
128 $(eval $(call KernelPackage,ipt-ipopt))
131 define KernelPackage/ipt-ipsec
132 TITLE:=Modules for matching IPSec packets
133 KCONFIG:=$(KCONFIG_IPT_IPSEC)
134 FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).ko)
135 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPSEC-m)))
136 $(call AddDepends/ipt)
139 define KernelPackage/ipt-ipsec/description
140 Netfilter (IPv4) modules for matching IPSec packets
147 $(eval $(call KernelPackage,ipt-ipsec))
150 define KernelPackage/ipt-nat
151 TITLE:=Basic NAT targets
152 KCONFIG:=$(KCONFIG_IPT_NAT)
153 FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
154 AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_NAT-m)))
155 $(call AddDepends/ipt,+kmod-ipt-conntrack)
158 define KernelPackage/ipt-nat/description
159 Netfilter (IPv4) kernel modules for basic NAT targets
164 $(eval $(call KernelPackage,ipt-nat))
167 define KernelPackage/ipt-nat-extra
168 TITLE:=Extra NAT targets
169 KCONFIG:=$(KCONFIG_IPT_NAT_EXTRA)
170 FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
171 AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_NAT_EXTRA-m)))
172 $(call AddDepends/ipt,+kmod-ipt-nat)
175 define KernelPackage/ipt-nat-extra/description
176 Netfilter (IPv4) kernel modules for extra NAT targets
182 $(eval $(call KernelPackage,ipt-nat-extra))
185 define KernelPackage/ipt-nathelper
186 TITLE:=Basic Conntrack and NAT helpers
187 KCONFIG:=$(KCONFIG_IPT_NATHELPER)
188 FILES:=$(foreach mod,$(IPT_NATHELPER-m),$(LINUX_DIR)/net/$(mod).ko)
189 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_NATHELPER-m)))
190 $(call AddDepends/ipt,+kmod-ipt-nat)
193 define KernelPackage/ipt-nathelper/description
194 Default Netfilter (IPv4) Conntrack and NAT helpers
201 $(eval $(call KernelPackage,ipt-nathelper))
204 define KernelPackage/ipt-nathelper-extra
205 TITLE:=Extra Conntrack and NAT helpers
206 KCONFIG:=$(KCONFIG_IPT_NATHELPER_EXTRA)
207 FILES:=$(foreach mod,$(IPT_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
208 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_NATHELPER_EXTRA-m)))
209 $(call AddDepends/ipt,+kmod-ipt-nat +kmod-lib-textsearch)
212 define KernelPackage/ipt-nathelper-extra/description
213 Extra Netfilter (IPv4) Conntrack and NAT helpers
225 $(eval $(call KernelPackage,ipt-nathelper-extra))
228 define KernelPackage/ipt-queue
229 TITLE:=Module for user-space packet queueing
230 KCONFIG:=$(KCONFIG_IPT_QUEUE)
231 FILES:=$(foreach mod,$(IPT_QUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
232 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_QUEUE-m)))
233 $(call AddDepends/ipt)
236 define KernelPackage/ipt-queue/description
237 Netfilter (IPv4) module for user-space packet queueing
242 $(eval $(call KernelPackage,ipt-queue))
245 define KernelPackage/ipt-ulog
246 TITLE:=Module for user-space packet logging
247 KCONFIG:=$(KCONFIG_IPT_ULOG)
248 FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
249 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_ULOG-m)))
250 $(call AddDepends/ipt)
253 define KernelPackage/ipt-ulog/description
254 Netfilter (IPv4) module for user-space packet logging
259 $(eval $(call KernelPackage,ipt-ulog))
262 define KernelPackage/ipt-debug
263 TITLE:=Module for debugging/development
264 KCONFIG:=$(KCONFIG_IPT_DEBUG)
266 FILES:=$(foreach mod,$(IPT_DEBUG-m),$(LINUX_DIR)/net/$(mod).ko)
267 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_DEBUG-m)))
268 $(call AddDepends/ipt)
271 define KernelPackage/ipt-debug/description
272 Netfilter modules for debugging/development of the firewall
277 $(eval $(call KernelPackage,ipt-debug))
280 define KernelPackage/ipt-led
281 TITLE:=Module to trigger a LED with a Netfilter rule
282 KCONFIG:=$(KCONFIG_IPT_LED)
283 FILES:=$(foreach mod,$(IPT_LED-m),$(LINUX_DIR)/net/$(mod).ko)
284 AUTOLOAD:=$(call AutoLoad,61,$(notdir $(IPT_LED-m)))
285 $(call AddDepends/ipt)
288 define KernelPackage/ipt-led/description
289 Netfilter target to trigger a LED when a network packet is matched.
292 $(eval $(call KernelPackage,ipt-led))
294 define KernelPackage/ipt-tproxy
295 TITLE:=Transparent proxying support
296 DEPENDS+=+IPV6:kmod-ipv6
298 CONFIG_NETFILTER_TPROXY \
299 CONFIG_NETFILTER_XT_MATCH_SOCKET \
300 CONFIG_NETFILTER_XT_TARGET_TPROXY
302 $(LINUX_DIR)/net/netfilter/nf_tproxy_core.ko \
303 $(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
304 AUTOLOAD:=$(call AutoLoad,50,$(notdir nf_tproxy_core $(IPT_TPROXY-m)))
305 $(call AddDepends/ipt)
308 define KernelPackage/ipt-tproxy/description
309 Kernel modules for Transparent Proxying
312 $(eval $(call KernelPackage,ipt-tproxy))
314 define KernelPackage/ipt-tee
317 CONFIG_NETFILTER_XT_TARGET_TEE
319 $(LINUX_DIR)/net/netfilter/xt_TEE.ko \
320 $(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko)
321 AUTOLOAD:=$(call AutoLoad,45,$(notdir nf_tee $(IPT_TEE-m)))
322 $(call AddDepends/ipt)
325 define KernelPackage/ipt-tee/description
326 Kernel modules for TEE
329 $(eval $(call KernelPackage,ipt-tee))
332 define KernelPackage/ipt-u32
335 CONFIG_NETFILTER_XT_MATCH_U32
337 $(LINUX_DIR)/net/netfilter/xt_u32.ko \
338 $(foreach mod,$(IPT_U32-m),$(LINUX_DIR)/net/$(mod).ko)
339 AUTOLOAD:=$(call AutoLoad,45,$(notdir nf_tee $(IPT_U32-m)))
340 $(call AddDepends/ipt)
343 define KernelPackage/ipt-u32/description
344 Kernel modules for U32
347 $(eval $(call KernelPackage,ipt-u32))
350 define KernelPackage/ipt-iprange
351 TITLE:=Module for matching ip ranges
352 KCONFIG:=$(KCONFIG_IPT_IPRANGE)
353 FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).ko)
354 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPRANGE-m)))
355 $(call AddDepends/ipt)
358 define KernelPackage/ipt-iprange/description
359 Netfilter (IPv4) module for matching ip ranges
364 $(eval $(call KernelPackage,ipt-iprange))
367 define KernelPackage/ipt-extra
369 KCONFIG:=$(KCONFIG_IPT_EXTRA)
370 FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
371 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_EXTRA-m)))
372 $(call AddDepends/ipt)
375 define KernelPackage/ipt-extra/description
376 Other Netfilter (IPv4) kernel modules
379 - physdev (if bridge support was enabled in kernel)
384 $(eval $(call KernelPackage,ipt-extra))
387 define KernelPackage/ip6tables
391 KCONFIG:=$(KCONFIG_IPT_IPV6)
392 FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).ko)
393 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPT_IPV6-m)))
396 define KernelPackage/ip6tables/description
397 Netfilter IPv6 firewalling support
400 $(eval $(call KernelPackage,ip6tables))
403 define KernelPackage/arptables
405 TITLE:=ARP firewalling modules
406 FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.ko
407 KCONFIG:=CONFIG_IP_NF_ARPTABLES \
408 CONFIG_IP_NF_ARPFILTER \
409 CONFIG_IP_NF_ARP_MANGLE
410 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(patsubst %.ko,%,$(wildcard $(LINUX_DIR)/net/ipv4/netfilter/arp*.ko))))
413 define KernelPackage/arptables/description
414 Kernel modules for ARP firewalling
417 $(eval $(call KernelPackage,arptables))
420 define KernelPackage/ebtables
422 TITLE:=Bridge firewalling modules
423 FILES:=$(foreach mod,$(EBTABLES-m),$(LINUX_DIR)/net/$(mod).ko)
424 KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
426 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES-m)))
429 define KernelPackage/ebtables/description
430 ebtables is a general, extensible frame/packet identification
431 framework. It provides you to do Ethernet
432 filtering/NAT/brouting on the Ethernet bridge.
435 $(eval $(call KernelPackage,ebtables))
438 define AddDepends/ebtables
440 DEPENDS+=kmod-ebtables $(1)
444 define KernelPackage/ebtables-ipv4
445 TITLE:=ebtables: IPv4 support
446 FILES:=$(foreach mod,$(EBTABLES_IP4-m),$(LINUX_DIR)/net/$(mod).ko)
447 KCONFIG:=$(KCONFIG_EBTABLES_IP4)
448 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_IP4-m)))
449 $(call AddDepends/ebtables)
452 define KernelPackage/ebtables-ipv4/description
453 This option adds the IPv4 support to ebtables, which allows basic
454 IPv4 header field filtering, ARP filtering as well as SNAT, DNAT targets.
457 $(eval $(call KernelPackage,ebtables-ipv4))
460 define KernelPackage/ebtables-ipv6
461 TITLE:=ebtables: IPv6 support
462 FILES:=$(foreach mod,$(EBTABLES_IP6-m),$(LINUX_DIR)/net/$(mod).ko)
463 KCONFIG:=$(KCONFIG_EBTABLES_IP6)
464 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_IP6-m)))
465 $(call AddDepends/ebtables)
468 define KernelPackage/ebtables-ipv6/description
469 This option adds the IPv6 support to ebtables, which allows basic
470 IPv6 header field filtering and target support.
473 $(eval $(call KernelPackage,ebtables-ipv6))
476 define KernelPackage/ebtables-watchers
477 TITLE:=ebtables: watchers support
478 FILES:=$(foreach mod,$(EBTABLES_WATCHERS-m),$(LINUX_DIR)/net/$(mod).ko)
479 KCONFIG:=$(KCONFIG_EBTABLES_WATCHERS)
480 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_WATCHERS-m)))
481 $(call AddDepends/ebtables)
484 define KernelPackage/ebtables-watchers/description
485 This option adds the log watchers, that you can use in any rule
486 in any ebtables table.
489 $(eval $(call KernelPackage,ebtables-watchers))
492 define KernelPackage/nfnetlink
494 TITLE:=Netlink-based userspace interface
495 DEPENDS:=+kmod-ipt-core
496 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink.ko
497 KCONFIG:=CONFIG_NETFILTER_NETLINK
498 AUTOLOAD:=$(call AutoLoad,48,nfnetlink)
501 define KernelPackage/nfnetlink/description
502 Kernel modules support for a netlink-based userspace interface
505 $(eval $(call KernelPackage,nfnetlink))
508 define AddDepends/nfnetlink
510 DEPENDS+=+kmod-nfnetlink $(1)
514 define KernelPackage/nfnetlink-log
515 TITLE:=Netfilter LOG over NFNETLINK interface
516 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_log.ko
517 KCONFIG:=CONFIG_NETFILTER_NETLINK_LOG
518 AUTOLOAD:=$(call AutoLoad,48,nfnetlink_log)
519 $(call AddDepends/nfnetlink)
522 define KernelPackage/nfnetlink-log/description
523 Kernel modules support for logging packets via NFNETLINK
526 $(eval $(call KernelPackage,nfnetlink-log))
529 define KernelPackage/nfnetlink-queue
530 TITLE:=Netfilter QUEUE over NFNETLINK interface
531 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_queue.ko
532 KCONFIG:=CONFIG_NETFILTER_NETLINK_QUEUE
533 AUTOLOAD:=$(call AutoLoad,48,nfnetlink_queue)
534 $(call AddDepends/nfnetlink)
537 define KernelPackage/nfnetlink-queue/description
538 Kernel modules support for queueing packets via NFNETLINK
541 $(eval $(call KernelPackage,nfnetlink-queue))
544 define KernelPackage/nf-conntrack-netlink
545 TITLE:=Connection tracking netlink interface
546 FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
547 KCONFIG:=CONFIG_NF_CT_NETLINK
548 AUTOLOAD:=$(call AutoLoad,49,nf_conntrack_netlink)
549 $(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
552 define KernelPackage/nf-conntrack-netlink/description
553 Kernel modules support for a netlink-based connection tracking
557 $(eval $(call KernelPackage,nf-conntrack-netlink))
559 define KernelPackage/ipt-hashlimit
561 TITLE:=Netfilter hashlimit match
562 KCONFIG:=$(KCONFIG_IPT_HASHLIMIT)
563 FILES:=$(LINUX_DIR)/net/netfilter/xt_hashlimit.ko
564 AUTOLOAD:=$(call AutoLoad,50,xt_hashlimit)
565 $(call KernelPackage/ipt)
568 define KernelPackage/ipt-hashlimit/description
569 Kernel modules support for the hashlimit bucket match module
572 $(eval $(call KernelPackage,ipt-hashlimit))