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
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-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))
315 define KernelPackage/ipt-iprange
316 TITLE:=Module for matching ip ranges
317 KCONFIG:=$(KCONFIG_IPT_IPRANGE)
318 FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).ko)
319 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPRANGE-m)))
320 $(call AddDepends/ipt)
323 define KernelPackage/ipt-iprange/description
324 Netfilter (IPv4) module for matching ip ranges
329 $(eval $(call KernelPackage,ipt-iprange))
332 define KernelPackage/ipt-extra
334 KCONFIG:=$(KCONFIG_IPT_EXTRA)
335 FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
336 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_EXTRA-m)))
337 $(call AddDepends/ipt)
340 define KernelPackage/ipt-extra/description
341 Other Netfilter (IPv4) kernel modules
344 - physdev (if bridge support was enabled in kernel)
349 $(eval $(call KernelPackage,ipt-extra))
352 define KernelPackage/ip6tables
356 KCONFIG:=$(KCONFIG_IPT_IPV6)
357 FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).ko)
358 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPT_IPV6-m)))
361 define KernelPackage/ip6tables/description
362 Netfilter IPv6 firewalling support
365 $(eval $(call KernelPackage,ip6tables))
368 define KernelPackage/arptables
370 TITLE:=ARP firewalling modules
371 FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.ko
372 KCONFIG:=CONFIG_IP_NF_ARPTABLES \
373 CONFIG_IP_NF_ARPFILTER \
374 CONFIG_IP_NF_ARP_MANGLE
375 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(patsubst %.ko,%,$(wildcard $(LINUX_DIR)/net/ipv4/netfilter/arp*.ko))))
378 define KernelPackage/arptables/description
379 Kernel modules for ARP firewalling
382 $(eval $(call KernelPackage,arptables))
385 define KernelPackage/ebtables
387 TITLE:=Bridge firewalling modules
388 FILES:=$(foreach mod,$(EBTABLES-m),$(LINUX_DIR)/net/$(mod).ko)
389 KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
391 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES-m)))
394 define KernelPackage/ebtables/description
395 ebtables is a general, extensible frame/packet identification
396 framework. It provides you to do Ethernet
397 filtering/NAT/brouting on the Ethernet bridge.
400 $(eval $(call KernelPackage,ebtables))
403 define AddDepends/ebtables
405 DEPENDS+=kmod-ebtables $(1)
409 define KernelPackage/ebtables-ipv4
410 TITLE:=ebtables: IPv4 support
411 FILES:=$(foreach mod,$(EBTABLES_IP4-m),$(LINUX_DIR)/net/$(mod).ko)
412 KCONFIG:=$(KCONFIG_EBTABLES_IP4)
413 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_IP4-m)))
414 $(call AddDepends/ebtables)
417 define KernelPackage/ebtables-ipv4/description
418 This option adds the IPv4 support to ebtables, which allows basic
419 IPv4 header field filtering, ARP filtering as well as SNAT, DNAT targets.
422 $(eval $(call KernelPackage,ebtables-ipv4))
425 define KernelPackage/ebtables-ipv6
426 TITLE:=ebtables: IPv6 support
427 FILES:=$(foreach mod,$(EBTABLES_IP6-m),$(LINUX_DIR)/net/$(mod).ko)
428 KCONFIG:=$(KCONFIG_EBTABLES_IP6)
429 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_IP6-m)))
430 $(call AddDepends/ebtables)
433 define KernelPackage/ebtables-ipv6/description
434 This option adds the IPv6 support to ebtables, which allows basic
435 IPv6 header field filtering and target support.
438 $(eval $(call KernelPackage,ebtables-ipv6))
441 define KernelPackage/ebtables-watchers
442 TITLE:=ebtables: watchers support
443 FILES:=$(foreach mod,$(EBTABLES_WATCHERS-m),$(LINUX_DIR)/net/$(mod).ko)
444 KCONFIG:=$(KCONFIG_EBTABLES_WATCHERS)
445 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_WATCHERS-m)))
446 $(call AddDepends/ebtables)
449 define KernelPackage/ebtables-watchers/description
450 This option adds the log watchers, that you can use in any rule
451 in any ebtables table.
454 $(eval $(call KernelPackage,ebtables-watchers))
457 define KernelPackage/nfnetlink
459 TITLE:=Netlink-based userspace interface
460 DEPENDS:=+kmod-ipt-core
461 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink.ko
462 KCONFIG:=CONFIG_NETFILTER_NETLINK
463 AUTOLOAD:=$(call AutoLoad,48,nfnetlink)
466 define KernelPackage/nfnetlink/description
467 Kernel modules support for a netlink-based userspace interface
470 $(eval $(call KernelPackage,nfnetlink))
473 define AddDepends/nfnetlink
475 DEPENDS+=+kmod-nfnetlink $(1)
479 define KernelPackage/nfnetlink-log
480 TITLE:=Netfilter LOG over NFNETLINK interface
481 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_log.ko
482 KCONFIG:=CONFIG_NETFILTER_NETLINK_LOG
483 AUTOLOAD:=$(call AutoLoad,48,nfnetlink_log)
484 $(call AddDepends/nfnetlink)
487 define KernelPackage/nfnetlink-log/description
488 Kernel modules support for logging packets via NFNETLINK
491 $(eval $(call KernelPackage,nfnetlink-log))
494 define KernelPackage/nfnetlink-queue
495 TITLE:=Netfilter QUEUE over NFNETLINK interface
496 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_queue.ko
497 KCONFIG:=CONFIG_NETFILTER_NETLINK_QUEUE
498 AUTOLOAD:=$(call AutoLoad,48,nfnetlink_queue)
499 $(call AddDepends/nfnetlink)
502 define KernelPackage/nfnetlink-queue/description
503 Kernel modules support for queueing packets via NFNETLINK
506 $(eval $(call KernelPackage,nfnetlink-queue))
509 define KernelPackage/nf-conntrack-netlink
510 TITLE:=Connection tracking netlink interface
511 FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
512 KCONFIG:=CONFIG_NF_CT_NETLINK
513 AUTOLOAD:=$(call AutoLoad,49,nf_conntrack_netlink)
514 $(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
517 define KernelPackage/nf-conntrack-netlink/description
518 Kernel modules support for a netlink-based connection tracking
522 $(eval $(call KernelPackage,nf-conntrack-netlink))
524 define KernelPackage/ipt-hashlimit
526 TITLE:=Netfilter hashlimit match
527 KCONFIG:=$(KCONFIG_IPT_HASHLIMIT)
528 FILES:=$(LINUX_DIR)/net/netfilter/xt_hashlimit.ko
529 AUTOLOAD:=$(call AutoLoad,50,xt_hashlimit)
530 $(call KernelPackage/ipt)
533 define KernelPackage/ipt-hashlimit/description
534 Kernel modules support for the hashlimit bucket match module
537 $(eval $(call KernelPackage,ipt-hashlimit))