2008-04-15 06:11:23 +00:00
|
|
|
#
|
2016-01-24 18:01:40 +00:00
|
|
|
# Copyright (C) 2006-2016 OpenWrt.org
|
2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2005-03-21 08:12:49 +00:00
|
|
|
|
2005-03-06 03:34:52 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2005-05-18 10:40:10 +00:00
|
|
|
PKG_NAME:=iptables
|
2018-02-17 15:58:57 +00:00
|
|
|
PKG_VERSION:=1.6.2
|
|
|
|
PKG_RELEASE:=1
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2017-03-22 15:02:09 +00:00
|
|
|
PKG_SOURCE_PROTO:=git
|
|
|
|
PKG_SOURCE_URL:=https://git.netfilter.org/iptables
|
2018-02-17 15:58:57 +00:00
|
|
|
PKG_SOURCE_VERSION:=c16bdec15137b241586310d0e61bc88cc3726004
|
|
|
|
PKG_MIRROR_HASH:=72e4bec94a56dd600097846c773e1074ff705e38f800ef221db646c064371a53
|
2008-04-15 06:11:23 +00:00
|
|
|
|
2010-12-20 18:45:09 +00:00
|
|
|
PKG_FIXUP:=autoreconf
|
2017-03-22 15:02:09 +00:00
|
|
|
|
2010-08-10 17:12:49 +00:00
|
|
|
PKG_INSTALL:=1
|
2010-09-07 10:00:34 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2014-11-02 12:20:54 +00:00
|
|
|
PKG_LICENSE:=GPL-2.0
|
2017-09-28 02:55:46 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:netfilter_core_team:iptables
|
2009-05-03 06:54:49 +00:00
|
|
|
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2006-06-21 23:45:47 +00:00
|
|
|
ifeq ($(DUMP),)
|
2006-09-24 20:49:31 +00:00
|
|
|
-include $(LINUX_DIR)/.config
|
|
|
|
include $(INCLUDE_DIR)/netfilter.mk
|
2016-12-25 15:40:05 +00:00
|
|
|
STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep 'NETFILTER' $(LINUX_DIR)/.config | mkhash md5)
|
2006-06-21 23:45:47 +00:00
|
|
|
endif
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2009-04-29 23:31:23 +00:00
|
|
|
|
2006-09-24 20:49:31 +00:00
|
|
|
define Package/iptables/Default
|
|
|
|
SECTION:=net
|
2009-12-09 13:36:35 +00:00
|
|
|
CATEGORY:=Network
|
2011-03-12 01:24:18 +00:00
|
|
|
SUBMENU:=Firewall
|
2006-09-24 20:49:31 +00:00
|
|
|
URL:=http://netfilter.org/
|
|
|
|
endef
|
|
|
|
|
2008-04-15 06:11:23 +00:00
|
|
|
define Package/iptables/Module
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
DEPENDS:=iptables $(1)
|
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define Package/iptables
|
2007-09-07 08:34:51 +00:00
|
|
|
$(call Package/iptables/Default)
|
2013-03-06 17:05:34 +00:00
|
|
|
TITLE:=IP firewall administration tool
|
2006-09-24 20:49:31 +00:00
|
|
|
MENU:=1
|
2013-03-06 17:05:34 +00:00
|
|
|
DEPENDS+= +kmod-ipt-core +libip4tc +IPV6:libip6tc +libxtables
|
2008-09-22 15:19:59 +00:00
|
|
|
endef
|
|
|
|
|
2017-03-22 15:02:09 +00:00
|
|
|
define Package/iptables/config
|
|
|
|
config IPTABLES_CONNLABEL
|
|
|
|
bool "Enable Connlabel support"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
This enable connlabel support in iptables.
|
|
|
|
|
|
|
|
config IPTABLES_NFTABLES
|
|
|
|
bool "Enable Nftables support"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
This enable nftables support in iptables.
|
|
|
|
endef
|
|
|
|
|
2008-09-22 15:19:59 +00:00
|
|
|
define Package/iptables/description
|
2013-03-06 17:05:34 +00:00
|
|
|
IP firewall administration tool.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- icmp
|
|
|
|
- tcp
|
|
|
|
- udp
|
|
|
|
- comment
|
2013-05-21 12:58:15 +00:00
|
|
|
- conntrack
|
2011-07-17 15:31:30 +00:00
|
|
|
- limit
|
|
|
|
- mac
|
2013-05-21 12:58:15 +00:00
|
|
|
- mark
|
2011-07-17 15:31:30 +00:00
|
|
|
- multiport
|
2013-05-21 12:58:15 +00:00
|
|
|
- set
|
|
|
|
- state
|
|
|
|
- time
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Targets:
|
|
|
|
- ACCEPT
|
2013-05-21 12:58:15 +00:00
|
|
|
- CT
|
|
|
|
- DNAT
|
2011-07-17 15:31:30 +00:00
|
|
|
- DROP
|
|
|
|
- REJECT
|
|
|
|
- LOG
|
2013-05-21 12:58:15 +00:00
|
|
|
- MARK
|
|
|
|
- MASQUERADE
|
|
|
|
- REDIRECT
|
|
|
|
- SET
|
|
|
|
- SNAT
|
2011-07-17 15:31:30 +00:00
|
|
|
- TCPMSS
|
|
|
|
|
|
|
|
Tables:
|
|
|
|
- filter
|
|
|
|
- mangle
|
2013-05-21 12:58:15 +00:00
|
|
|
- nat
|
|
|
|
- raw
|
2011-07-17 15:31:30 +00:00
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2008-09-22 15:19:59 +00:00
|
|
|
define Package/iptables-mod-conntrack-extra
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-conntrack-extra)
|
|
|
|
TITLE:=Extra connection tracking extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-conntrack-extra/description
|
2010-03-14 01:53:41 +00:00
|
|
|
Extra iptables extensions for connection tracking.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- connbytes
|
2014-03-11 14:58:00 +00:00
|
|
|
- connlimit
|
2011-07-17 15:31:30 +00:00
|
|
|
- connmark
|
|
|
|
- recent
|
|
|
|
- helper
|
|
|
|
|
|
|
|
Targets:
|
|
|
|
- CONNMARK
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2018-01-22 17:52:28 +00:00
|
|
|
define Package/iptables-mod-conntrack-label
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-conntrack-label @IPTABLES_CONNLABEL)
|
|
|
|
TITLE:=Connection tracking labeling extension
|
|
|
|
DEFAULT:=y if IPTABLES_CONNLABEL
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-conntrack-label/description
|
|
|
|
Match and set label(s) on connection tracking entries
|
|
|
|
|
|
|
|
Matches:
|
|
|
|
- connlabel
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define Package/iptables-mod-filter
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-filter)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=Content inspection extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-filter/description
|
2010-03-14 01:53:41 +00:00
|
|
|
iptables extensions for packet content inspection.
|
2011-07-17 15:31:30 +00:00
|
|
|
Includes support for:
|
|
|
|
|
|
|
|
Matches:
|
|
|
|
- string
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipopt
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-ipopt)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=IP/Packet option extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipopt/description
|
2010-03-14 01:53:41 +00:00
|
|
|
iptables extensions for matching/changing IP packet options.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- dscp
|
|
|
|
- ecn
|
|
|
|
- length
|
|
|
|
- statistic
|
|
|
|
- tcpmss
|
|
|
|
- unclean
|
|
|
|
- hl
|
|
|
|
|
|
|
|
Targets:
|
|
|
|
- DSCP
|
|
|
|
- CLASSIFY
|
|
|
|
- ECN
|
|
|
|
- HL
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipsec
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-ipsec)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=IPsec extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ipsec/description
|
2010-03-14 01:53:41 +00:00
|
|
|
iptables extensions for matching ipsec traffic.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- ah
|
|
|
|
- esp
|
|
|
|
- policy
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2008-09-22 15:19:59 +00:00
|
|
|
define Package/iptables-mod-nat-extra
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-nat-extra)
|
|
|
|
TITLE:=Extra NAT extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-nat-extra/description
|
2010-03-14 01:53:41 +00:00
|
|
|
iptables extensions for extra NAT targets.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Targets:
|
|
|
|
- MIRROR
|
|
|
|
- NETMAP
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ulog
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-ulog)
|
2006-09-24 20:49:31 +00:00
|
|
|
TITLE:=user-space packet logging
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-ulog/description
|
2010-03-14 01:53:41 +00:00
|
|
|
iptables extensions for user-space packet logging.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Targets:
|
|
|
|
- ULOG
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2014-08-07 04:42:22 +00:00
|
|
|
define Package/iptables-mod-nflog
|
2014-08-07 12:32:33 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-nfnetlink-log +kmod-ipt-nflog)
|
2014-08-07 04:42:22 +00:00
|
|
|
TITLE:=Netfilter NFLOG target
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-nflog/description
|
|
|
|
iptables extension for user-space logging via NFNETLINK.
|
|
|
|
|
|
|
|
Includes:
|
|
|
|
- libxt_NFLOG
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2017-01-12 14:06:00 +00:00
|
|
|
define Package/iptables-mod-trace
|
2018-01-26 06:40:25 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-debug)
|
2017-01-12 14:06:00 +00:00
|
|
|
TITLE:=Netfilter TRACE target
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-trace/description
|
|
|
|
iptables extension for TRACE target
|
|
|
|
|
|
|
|
Includes:
|
|
|
|
- libxt_TRACE
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
2014-08-07 04:42:22 +00:00
|
|
|
define Package/iptables-mod-nfqueue
|
2014-08-07 12:32:33 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-nfnetlink-queue +kmod-ipt-nfqueue)
|
2014-08-07 04:42:22 +00:00
|
|
|
TITLE:=Netfilter NFQUEUE target
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-nfqueue/description
|
|
|
|
iptables extension for user-space queuing via NFNETLINK.
|
|
|
|
|
|
|
|
Includes:
|
|
|
|
- libxt_NFQUEUE
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2010-07-16 06:15:07 +00:00
|
|
|
define Package/iptables-mod-hashlimit
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-hashlimit)
|
|
|
|
TITLE:=hashlimit matching
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-hashlimit/description
|
|
|
|
iptables extensions for hashlimit matching
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- hashlimit
|
|
|
|
|
2010-07-16 06:15:07 +00:00
|
|
|
endef
|
|
|
|
|
2017-06-16 12:16:07 +00:00
|
|
|
define Package/iptables-mod-rpfilter
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-rpfilter)
|
|
|
|
TITLE:=rpfilter iptables extension
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-rpfilter/description
|
|
|
|
iptables extensions for reverse path filter test on a packet
|
|
|
|
|
|
|
|
Matches:
|
|
|
|
- rpfilter
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2007-06-02 22:57:33 +00:00
|
|
|
define Package/iptables-mod-iprange
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-iprange)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=IP range extension
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-iprange/description
|
2010-03-14 01:53:41 +00:00
|
|
|
iptables extensions for matching ip ranges.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- iprange
|
|
|
|
|
2007-06-02 22:57:33 +00:00
|
|
|
endef
|
|
|
|
|
2014-11-03 22:01:45 +00:00
|
|
|
define Package/iptables-mod-cluster
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-cluster)
|
|
|
|
TITLE:=Match cluster extension
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-cluster/description
|
|
|
|
iptables extensions for matching cluster.
|
|
|
|
|
|
|
|
Netfilter (IPv4/IPv6) module for matching cluster
|
|
|
|
This option allows you to build work-load-sharing clusters of
|
|
|
|
network servers/stateful firewalls without having a dedicated
|
|
|
|
load-balancing router/server/switch. Basically, this match returns
|
|
|
|
true when the packet must be handled by this cluster node. Thus,
|
|
|
|
all nodes see all packets and this match decides which node handles
|
|
|
|
what packets. The work-load sharing algorithm is based on source
|
|
|
|
address hashing.
|
|
|
|
|
|
|
|
This module is usable for ipv4 and ipv6.
|
|
|
|
|
|
|
|
If you select it, it enables kmod-ipt-cluster.
|
|
|
|
|
|
|
|
see `iptables -m cluster --help` for more information.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-clusterip
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-clusterip)
|
|
|
|
TITLE:=Clusterip extension
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-clusterip/description
|
|
|
|
iptables extensions for CLUSTERIP.
|
|
|
|
The CLUSTERIP target allows you to build load-balancing clusters of
|
|
|
|
network servers without having a dedicated load-balancing
|
|
|
|
router/server/switch.
|
|
|
|
|
|
|
|
If you select it, it enables kmod-ipt-clusterip.
|
|
|
|
|
|
|
|
see `iptables -j CLUSTERIP --help` for more information.
|
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define Package/iptables-mod-extra
|
2008-04-15 06:11:23 +00:00
|
|
|
$(call Package/iptables/Module, +kmod-ipt-extra)
|
2008-09-22 15:19:59 +00:00
|
|
|
TITLE:=Other extra iptables extensions
|
2007-09-07 08:34:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-extra/description
|
2010-03-14 01:53:41 +00:00
|
|
|
Other extra iptables extensions.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Matches:
|
2013-01-14 16:12:56 +00:00
|
|
|
- addrtype
|
2011-07-17 15:31:30 +00:00
|
|
|
- condition
|
|
|
|
- owner
|
|
|
|
- physdev (if ebtables is enabled)
|
|
|
|
- pkttype
|
|
|
|
- quota
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2011-07-05 12:40:59 +00:00
|
|
|
define Package/iptables-mod-led
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-led)
|
|
|
|
TITLE:=LED trigger iptables extension
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-led/description
|
|
|
|
iptables extension for triggering a LED.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Targets:
|
|
|
|
- LED
|
|
|
|
|
2011-07-05 12:40:59 +00:00
|
|
|
endef
|
|
|
|
|
2010-06-22 22:39:22 +00:00
|
|
|
define Package/iptables-mod-tproxy
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-tproxy)
|
|
|
|
TITLE:=Transparent proxy iptables extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-tproxy/description
|
|
|
|
Transparent proxy iptables extensions.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- socket
|
|
|
|
|
|
|
|
Targets:
|
|
|
|
- TPROXY
|
|
|
|
|
2010-06-22 22:39:22 +00:00
|
|
|
endef
|
|
|
|
|
2011-05-24 08:14:29 +00:00
|
|
|
define Package/iptables-mod-tee
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-tee)
|
|
|
|
TITLE:=TEE iptables extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-tee/description
|
|
|
|
TEE iptables extensions.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Targets:
|
|
|
|
- TEE
|
|
|
|
|
2011-05-24 08:14:29 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-u32
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-u32)
|
|
|
|
TITLE:=U32 iptables extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-u32/description
|
|
|
|
U32 iptables extensions.
|
2011-07-17 15:31:30 +00:00
|
|
|
|
|
|
|
Matches:
|
|
|
|
- u32
|
|
|
|
|
2011-05-24 08:14:29 +00:00
|
|
|
endef
|
2010-06-22 22:39:22 +00:00
|
|
|
|
2017-10-22 20:21:23 +00:00
|
|
|
define Package/iptables-mod-checksum
|
|
|
|
$(call Package/iptables/Module, +kmod-ipt-checksum)
|
|
|
|
TITLE:=IP CHECKSUM target extension
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-checksum/description
|
|
|
|
iptables extension for the CHECKSUM calculation target
|
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define Package/ip6tables
|
2007-09-07 08:34:51 +00:00
|
|
|
$(call Package/iptables/Default)
|
2013-03-06 17:05:34 +00:00
|
|
|
DEPENDS:=@IPV6 +kmod-ip6tables +iptables
|
2013-05-14 15:02:31 +00:00
|
|
|
CATEGORY:=Network
|
2006-09-24 20:49:31 +00:00
|
|
|
TITLE:=IPv6 firewall administration tool
|
2008-04-15 06:11:23 +00:00
|
|
|
MENU:=1
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2013-09-01 17:59:48 +00:00
|
|
|
|
2014-06-02 18:13:38 +00:00
|
|
|
define Package/ip6tables-extra
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
DEPENDS:=ip6tables +kmod-ip6tables-extra
|
|
|
|
TITLE:=IPv6 header matching modules
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ip6tables-mod-extra/description
|
|
|
|
iptables header matching modules for IPv6
|
|
|
|
endef
|
|
|
|
|
2013-09-01 17:59:48 +00:00
|
|
|
define Package/ip6tables-mod-nat
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
DEPENDS:=ip6tables +kmod-ipt-nat6
|
|
|
|
TITLE:=IPv6 NAT extensions
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ip6tables-mod-nat/description
|
|
|
|
iptables extensions for IPv6-NAT targets.
|
|
|
|
endef
|
|
|
|
|
2009-05-03 06:54:49 +00:00
|
|
|
define Package/libiptc
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
2015-05-26 09:16:50 +00:00
|
|
|
DEPENDS:=+libip4tc +libip6tc +libxtables
|
2017-04-07 11:20:11 +00:00
|
|
|
ABI_VERSION:=$(PKG_VERSION)
|
2011-03-25 18:02:51 +00:00
|
|
|
TITLE:=IPv4/IPv6 firewall - shared libiptc library (compatibility stub)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libip4tc
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=IPv4 firewall - shared libiptc library
|
2017-04-07 11:20:11 +00:00
|
|
|
ABI_VERSION:=$(PKG_VERSION)
|
2015-05-26 09:16:50 +00:00
|
|
|
DEPENDS:=+libxtables
|
2011-03-25 18:02:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libip6tc
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=IPv6 firewall - shared libiptc library
|
2017-04-07 11:20:11 +00:00
|
|
|
ABI_VERSION:=$(PKG_VERSION)
|
2015-05-26 09:16:50 +00:00
|
|
|
DEPENDS:=+libxtables
|
2007-09-05 21:40:11 +00:00
|
|
|
endef
|
|
|
|
|
2009-05-03 06:54:49 +00:00
|
|
|
define Package/libxtables
|
|
|
|
$(call Package/iptables/Default)
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=IPv4/IPv6 firewall - shared xtables library
|
2017-04-07 11:20:11 +00:00
|
|
|
ABI_VERSION:=$(PKG_VERSION)
|
2017-03-22 15:02:09 +00:00
|
|
|
DEPENDS:= \
|
|
|
|
+IPTABLES_CONNLABEL:libnetfilter-conntrack \
|
2017-04-22 17:57:09 +00:00
|
|
|
+IPTABLES_NFTABLES:libnftnl
|
2007-09-16 16:25:53 +00:00
|
|
|
endef
|
|
|
|
|
2009-09-25 14:10:42 +00:00
|
|
|
TARGET_CPPFLAGS := \
|
|
|
|
-I$(PKG_BUILD_DIR)/include \
|
2012-05-03 09:43:10 +00:00
|
|
|
-I$(LINUX_DIR)/user_headers/include \
|
2009-09-25 14:10:42 +00:00
|
|
|
$(TARGET_CPPFLAGS)
|
|
|
|
|
2010-04-20 16:18:03 +00:00
|
|
|
TARGET_CFLAGS += \
|
|
|
|
-I$(PKG_BUILD_DIR)/include \
|
2013-05-21 10:15:10 +00:00
|
|
|
-I$(LINUX_DIR)/user_headers/include \
|
2015-05-26 09:16:50 +00:00
|
|
|
-ffunction-sections -fdata-sections \
|
|
|
|
-DNO_LEGACY
|
2013-05-21 10:15:10 +00:00
|
|
|
|
|
|
|
TARGET_LDFLAGS += \
|
|
|
|
-Wl,--gc-sections
|
2010-04-20 16:18:03 +00:00
|
|
|
|
2009-01-08 02:18:45 +00:00
|
|
|
CONFIGURE_ARGS += \
|
2009-05-03 06:54:49 +00:00
|
|
|
--enable-shared \
|
2017-03-22 15:02:09 +00:00
|
|
|
--enable-static \
|
2009-01-08 02:18:45 +00:00
|
|
|
--enable-devel \
|
2012-05-03 09:43:10 +00:00
|
|
|
--with-kernel="$(LINUX_DIR)/user_headers" \
|
2012-02-22 01:47:48 +00:00
|
|
|
--with-xtlibdir=/usr/lib/iptables \
|
2018-02-17 15:58:57 +00:00
|
|
|
--with-xt-lock-name=/var/run/xtables.lock \
|
2017-03-22 15:02:09 +00:00
|
|
|
$(if $(CONFIG_IPTABLES_CONNLABEL),,--disable-connlabel) \
|
|
|
|
$(if $(CONFIG_IPTABLES_NFTABLES),,--disable-nftables) \
|
2014-07-02 11:39:24 +00:00
|
|
|
$(if $(CONFIG_IPV6),,--disable-ipv6)
|
2008-08-06 22:10:29 +00:00
|
|
|
|
2010-08-10 17:12:49 +00:00
|
|
|
MAKE_FLAGS := \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
COPT_FLAGS="$(TARGET_CFLAGS)" \
|
2012-05-03 09:43:10 +00:00
|
|
|
KERNEL_DIR="$(LINUX_DIR)/user_headers/" PREFIX=/usr \
|
2010-08-10 17:12:49 +00:00
|
|
|
KBUILD_OUTPUT="$(LINUX_DIR)" \
|
2013-03-07 08:48:41 +00:00
|
|
|
BUILTIN_MODULES="$(patsubst ip6t_%,%,$(patsubst ipt_%,%,$(patsubst xt_%,%,$(IPT_BUILTIN) $(IPT_CONNTRACK-m) $(IPT_NAT-m))))"
|
2010-08-10 17:12:49 +00:00
|
|
|
|
2016-01-18 13:21:32 +00:00
|
|
|
ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),$(subst .configured_,.config_,$(STAMP_CONFIGURED)))
|
|
|
|
define Build/Configure/rebuild
|
|
|
|
$(FIND) $(PKG_BUILD_DIR) -name \*.o -or -name \*.\?o -or -name \*.a | $(XARGS) rm -f
|
|
|
|
rm -f $(PKG_BUILD_DIR)/.config_*
|
|
|
|
rm -f $(PKG_BUILD_DIR)/.configured_*
|
|
|
|
touch $(subst .configured_,.config_,$(STAMP_CONFIGURED))
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
$(Build/Configure/rebuild)
|
|
|
|
$(Build/Configure/Default)
|
|
|
|
endef
|
|
|
|
|
2006-05-31 13:00:11 +00:00
|
|
|
define Build/InstallDev
|
2010-03-14 01:53:41 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/iptables
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/net/netfilter
|
2009-05-05 11:51:51 +00:00
|
|
|
|
|
|
|
# XXX: iptables header fixup, some headers are not installed by iptables anymore
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/iptables/*.h $(1)/usr/include/iptables/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/iptables.h $(1)/usr/include/
|
2013-03-06 17:05:34 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/ip6tables.h $(1)/usr/include/
|
2009-08-01 23:16:06 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/libipulog $(1)/usr/include/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/libiptc $(1)/usr/include/
|
2009-05-05 11:51:51 +00:00
|
|
|
|
2009-05-03 06:54:49 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
2010-03-14 01:53:41 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2010-12-04 17:04:39 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so* $(1)/usr/lib/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libip*tc.so* $(1)/usr/lib/
|
2010-03-14 01:53:41 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
2009-05-03 06:54:49 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xtables.pc $(1)/usr/lib/pkgconfig/
|
2013-05-02 08:10:55 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libip*tc.pc $(1)/usr/lib/pkgconfig/
|
2013-06-06 14:02:24 +00:00
|
|
|
|
|
|
|
# XXX: needed by firewall3
|
2015-05-26 09:16:50 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/extensions/libiptext*.so $(1)/usr/lib/
|
2006-05-31 13:00:11 +00:00
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define Package/iptables/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2013-03-06 17:05:34 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/xtables-multi $(1)/usr/sbin/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables{,-restore,-save} $(1)/usr/sbin/
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/iptables
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ip6tables/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2013-03-06 17:05:34 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables{,-restore,-save} $(1)/usr/sbin/
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2009-05-03 06:54:49 +00:00
|
|
|
define Package/libiptc/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2011-03-25 18:02:51 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiptc.so* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libip4tc/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libip4tc.so* $(1)/usr/lib/
|
2015-05-26 09:16:50 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/extensions/libiptext4.so $(1)/usr/lib/
|
2011-03-25 18:02:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libip6tc/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libip6tc.so* $(1)/usr/lib/
|
2015-05-26 09:16:50 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/extensions/libiptext6.so $(1)/usr/lib/
|
2009-05-03 06:54:49 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libxtables/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2009-08-07 09:36:55 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so* $(1)/usr/lib/
|
2015-05-26 09:16:50 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/extensions/libiptext.so $(1)/usr/lib/
|
2009-05-03 06:54:49 +00:00
|
|
|
endef
|
|
|
|
|
2006-04-14 04:27:05 +00:00
|
|
|
define BuildPlugin
|
2006-09-24 20:49:31 +00:00
|
|
|
define Package/$(1)/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $$(1)/usr/lib/iptables
|
2013-03-07 08:48:41 +00:00
|
|
|
for m in $(patsubst xt_%,ipt_%,$(2)) $(patsubst ipt_%,xt_%,$(2)) $(patsubst xt_%,ip6t_%,$(2)) $(patsubst ip6t_%,xt_%,$(2)); do \
|
2008-04-15 06:11:23 +00:00
|
|
|
if [ -f $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so ]; then \
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so $$(1)/usr/lib/iptables/ ; \
|
|
|
|
fi; \
|
2006-04-14 04:27:05 +00:00
|
|
|
done
|
|
|
|
$(3)
|
2006-09-24 20:49:31 +00:00
|
|
|
endef
|
2006-04-14 04:27:05 +00:00
|
|
|
|
2006-09-24 20:49:31 +00:00
|
|
|
$$(eval $$(call BuildPackage,$(1)))
|
2006-04-14 04:27:05 +00:00
|
|
|
endef
|
|
|
|
|
2006-04-21 00:12:18 +00:00
|
|
|
$(eval $(call BuildPackage,iptables))
|
2008-09-22 15:19:59 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-conntrack-extra,$(IPT_CONNTRACK_EXTRA-m)))
|
2018-01-22 17:52:28 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-conntrack-label,$(IPT_CONNTRACK_LABEL-m)))
|
2006-04-14 04:27:05 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-extra,$(IPT_EXTRA-m)))
|
2015-04-17 18:52:24 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-filter,$(IPT_FILTER-m)))
|
2006-04-14 04:27:05 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-ipopt,$(IPT_IPOPT-m)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-ipsec,$(IPT_IPSEC-m)))
|
2008-09-22 15:19:59 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-nat-extra,$(IPT_NAT_EXTRA-m)))
|
2007-06-02 22:57:33 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-iprange,$(IPT_IPRANGE-m)))
|
2014-11-03 22:01:45 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-cluster,$(IPT_CLUSTER-m)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-clusterip,$(IPT_CLUSTERIP-m)))
|
2006-04-14 04:27:05 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m)))
|
2010-07-16 06:15:07 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-hashlimit,$(IPT_HASHLIMIT-m)))
|
2017-06-16 12:16:07 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-rpfilter,$(IPT_RPFILTER-m)))
|
2011-07-05 12:40:59 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-led,$(IPT_LED-m)))
|
2010-06-22 22:39:22 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m)))
|
2011-05-24 08:14:29 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m)))
|
|
|
|
$(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m)))
|
2014-08-07 04:42:22 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-nflog,$(IPT_NFLOG-m)))
|
2017-01-12 14:06:00 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-trace,$(IPT_DEBUG-m)))
|
2014-08-07 04:42:22 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-nfqueue,$(IPT_NFQUEUE-m)))
|
2017-10-22 20:21:23 +00:00
|
|
|
$(eval $(call BuildPlugin,iptables-mod-checksum,$(IPT_CHECKSUM-m)))
|
2006-04-21 00:12:18 +00:00
|
|
|
$(eval $(call BuildPackage,ip6tables))
|
2014-06-02 18:13:38 +00:00
|
|
|
$(eval $(call BuildPlugin,ip6tables-extra,$(IPT_IPV6_EXTRA-m)))
|
2013-09-01 17:59:48 +00:00
|
|
|
$(eval $(call BuildPlugin,ip6tables-mod-nat,$(IPT_NAT6-m)))
|
2009-05-03 06:54:49 +00:00
|
|
|
$(eval $(call BuildPackage,libiptc))
|
2011-03-25 18:02:51 +00:00
|
|
|
$(eval $(call BuildPackage,libip4tc))
|
|
|
|
$(eval $(call BuildPackage,libip6tc))
|
2009-05-03 06:54:49 +00:00
|
|
|
$(eval $(call BuildPackage,libxtables))
|