Changeset 36e3a1c in freewrt for package/iptables


Ignore:
Timestamp:
Aug 30, 2025, 5:37:23 AM (3 months ago)
Author:
Waldemar Brodkorb <wbx@…>
Branches:
freewrt_2_0
Children:
df9a3e9
Parents:
2400aa1
git-author:
Waldemar Brodkorb <wbx@…> (08/29/25 23:42:41)
git-committer:
Waldemar Brodkorb <wbx@…> (08/30/25 05:37:23)
Message:

iptables: rework and simplify

Location:
package/iptables
Files:
2 added
6 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • package/iptables/Config.in

    r2400aa1 r36e3a1c  
    4141        depends FWRT_PACKAGE_IPTABLES
    4242        help
    43           Iptables (IPv4) extensions for connection tracking
     43          Iptables extensions for connection tracking
     44
     45config FWRT_PACKAGE_IPTABLES_MOD_NAT
     46        prompt   "iptables-mod-nat................ Iptables extensions for network address translation"
     47        tristate
     48        default n
     49        depends FWRT_PACKAGE_IPTABLES
     50        help
     51          Iptables extensions for network address translation
     52
     53config FWRT_PACKAGE_IPTABLES_MOD_MASQUERADE
     54        prompt   "iptables-mod-masquerade......... Iptables extensions for masquerading"
     55        tristate
     56        default n
     57        depends FWRT_PACKAGE_IPTABLES
     58        select FWRT_PACKAGE_IPTABLES_MOD_NAT
     59        help
     60          Iptables extensions for masquerading
    4461
    4562config FWRT_PACKAGE_IPTABLES_MOD_REJECT
     
    4966        depends FWRT_PACKAGE_IPTABLES
    5067        help
    51           Iptables (IPv4) extensions for REJECT target
     68          Iptables extensions for REJECT target
    5269
    53 config FWRT_PACKAGE_IPTABLES_MOD_FILTER
    54         prompt   "iptables-mod-filter............. Iptables extension for packet content inspection"
     70config FWRT_PACKAGE_IPTABLES_MOD_TCPMSS
     71        prompt   "iptables-mod-tcpmss............. Iptables extensions for TCP MSS"
    5572        tristate
    5673        default n
    5774        depends FWRT_PACKAGE_IPTABLES
    58         select FWRT_PACKAGE_KMOD_IPT_FILTER
    5975        help
    60           Iptables (IPv4) extension for packet content inspection
     76          Iptables extensions for TCP MSS target
    6177
    62           Includes:
    63             * libipt_ipp2p
    64             * libipt_layer7
    65 
    66 config FWRT_PACKAGE_IPTABLES_MOD_IMQ
    67         prompt "iptables-mod-imq................ Iptables extensions for Intermediate Queuing Device QoS-support"
    68         tristate
    69         default n
    70         depends FWRT_PACKAGE_IPTABLES
    71         select FWRT_PACKAGE_KMOD_IMQ
    72         help
    73           Iptables (IPv4) extensions for Intermediate Queuing Device QoS-support
    74 
    75           Includes:
    76             * libipt_IMQ
    77 
    78 config FWRT_PACKAGE_IPTABLES_MOD_IPOPT
    79         prompt   "iptables-mod-ipopt.............. Iptables extensions for matching/changing IP packet options"
    80         tristate
    81         default n
    82         depends FWRT_PACKAGE_IPTABLES
    83         select FWRT_PACKAGE_KMOD_IPT_IPOPT
    84         help
    85           Extra Iptables (IPv4) extensions for matching/changing IP packet options
    86 
    87           Includes:
    88             * libipt_CLASSIFY
    89             * libipt_dscp/DSCP
    90             * libipt_ecn/ECN
    91             * libipt_length
    92             * libipt_mac
    93             * libipt_NETMAP
    94             * libipt_tcpmms
    95             * libipt_time
    96             * libipt_tos/TOS
    97             * libipt_ttl/TTL
    98             * libipt_unclean
    99 
    100 config FWRT_PACKAGE_IPTABLES_MOD_IPSEC
    101         prompt   "iptables-mod-ipsec.............. Iptables extensions for matching special IPsec packets"
    102         tristate
    103         default n
    104         depends FWRT_PACKAGE_IPTABLES
    105         select FWRT_PACKAGE_KMOD_IPT_IPSEC
    106         help
    107           Iptables (IPv4) extensions for matching special IPsec packets
    108 
    109           Includes:
    110             * libipt_ah
    111             * libipt_esp
    112 
    113 config FWRT_PACKAGE_IPTABLES_MOD_NAT
    114         prompt   "iptables-mod-nat................ Iptables extensions for different NAT targets"
    115         tristate
    116         default n
    117         depends FWRT_PACKAGE_IPTABLES
    118         select FWRT_PACKAGE_KMOD_IPT_NAT
    119         help
    120           Iptables (IPv4) extensions for different NAT targets
    121 
    122           Includes:
    123             * libipt_REDIRECT
    124 
    125 config FWRT_PACKAGE_IPTABLES_MOD_ULOG
    126         prompt   "iptables-mod-ulog............... Iptables extensions for user-space packet logging"
    127         tristate
    128         default n
    129         depends FWRT_PACKAGE_IPTABLES
    130         select FWRT_PACKAGE_KMOD_IPT_ULOG
    131         help
    132           Iptables (IPv4) extensions for user-space packet logging
    133 
    134           Includes:
    135             * libipt_ULOG
    136 
    137 config FWRT_PACKAGE_IPTABLES_MOD_EXTRA
    138         prompt   "iptables-mod-extra.............. Other extra Iptables extensions"
    139         tristate
    140         default n
    141         depends FWRT_PACKAGE_IPTABLES
    142         select FWRT_PACKAGE_KMOD_IPT_EXTRA
    143         help
    144           Other extra Iptables (IPv4) extensions
    145 
    146           Includes:
    147             * libipt_limit
    148             * libipt_owner
    149             * libipt_physdev
    150             * libipt_pkttype
    151             * libipt_recent
    152             * libipt_LOG
    15378
    15479config FWRT_PACKAGE_IPTABLES_UTILS
  • package/iptables/Makefile

    r2400aa1 r36e3a1c  
    1313PKG_SOURCE:=            $(PKG_NAME)-$(PKG_VERSION).tar.xz
    1414
    15 define IPKG_plugin_template
    16 
    17 $$(IPKG_$(1)):
    18         install -m0755 -d $$(IDIR_$(1))/usr/lib/xtables
    19         for m in $(2); do \
    20                 $(INSTALL_DATA) $(WRKINST)/usr/lib/xtables/lib$$$${m}.so $$(IDIR_$(1))/usr/lib/xtables/ ; \
    21         done
    22         @[ -z "$(3)" ] || $(MAKE) $(3)
    23         $(RSTRIP) $$(IDIR_$(1))
    24         $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
    25 
    26 endef
    27 
    2815include $(TOPDIR)/mk/package.mk
    2916include $(LINUX_DIR)/.config
    30 include $(TOPDIR)/mk/netfilter.mk
    3117
    3218$(eval $(call PKG_template,IPTABLES,iptables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
     
    3723$(eval $(call PKG_template,IPTABLES_MOD_CONNTRACK,iptables-mod-conntrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    3824$(eval $(call PKG_template,IPTABLES_MOD_REJECT,iptables-mod-reject,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
     25$(eval $(call PKG_template,IPTABLES_MOD_NAT,iptables-mod-nat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
     26$(eval $(call PKG_template,IPTABLES_MOD_MASQUERADE,iptables-mod-masquerade,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    3927$(eval $(call PKG_template,IPTABLES_MOD_TCPMSS,iptables-mod-tcpmss,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    40 $(eval $(call PKG_template,IPTABLES_MOD_EXTRA,iptables-mod-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    41 $(eval $(call PKG_template,IPTABLES_MOD_FILTER,iptables-mod-filter,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    42 $(eval $(call PKG_template,IPTABLES_MOD_IMQ,iptables-mod-imq,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    43 $(eval $(call PKG_template,IPTABLES_MOD_IPOPT,iptables-mod-ipopt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    44 $(eval $(call PKG_template,IPTABLES_MOD_IPSEC,iptables-mod-ipsec,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    45 $(eval $(call PKG_template,IPTABLES_MOD_NAT,iptables-mod-nat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    46 $(eval $(call PKG_template,IPTABLES_MOD_ULOG,iptables-mod-ulog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    47 
    48 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_CONNTRACK,$(IPT_CONNTRACK-m)))
    49 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_REJECT,$(IPT_REJECT-m)))
    50 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_TCPMSS,$(IPT_TCPMSS-m)))
    51 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_EXTRA,$(IPT_EXTRA-m)))
    52 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_FILTER,$(IPT_FILTER-m),layer7-install))
    53 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_IMQ,$(IPT_IMQ-m)))
    54 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_IPOPT,$(IPT_IPOPT-m)))
    55 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_IPSEC,$(IPT_IPSEC-m)))
    56 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_NAT,$(IPT_NAT-m)))
    57 $(eval $(call IPKG_plugin_template,IPTABLES_MOD_ULOG,$(IPT_ULOG-m)))
    5828
    5929$(WRKBUILD)/.configured:
     
    8959        $(IPKG_BUILD) $(IDIR_IPTABLES) $(PACKAGE_DIR)
    9060
     61$(IPKG_IPTABLES_MOD_CONNTRACK):
     62        $(INSTALL_DIR) $(IDIR_IPTABLES_MOD_CONNTRACK)/usr/lib/xtables
     63        (cd $(WRKINST)/usr/lib/xtables ; \
     64                $(INSTALL_DATA) libxt_conntrack.so $(IDIR_IPTABLES_MOD_CONNTRACK)/usr/lib/xtables/ \
     65        )
     66        $(RSTRIP) $(IDIR_IPTABLES_MOD_CONNTRACK)
     67        $(IPKG_BUILD) $(IDIR_IPTABLES_MOD_CONNTRACK) $(PACKAGE_DIR)
     68
     69$(IPKG_IPTABLES_MOD_NAT):
     70        $(INSTALL_DIR) $(IDIR_IPTABLES_MOD_NAT)/usr/lib/xtables
     71        (cd $(WRKINST)/usr/lib/xtables ; \
     72                $(INSTALL_DATA) libxt_NAT.so $(IDIR_IPTABLES_MOD_NAT)/usr/lib/xtables/ \
     73        )
     74        $(RSTRIP) $(IDIR_IPTABLES_MOD_NAT)
     75        $(IPKG_BUILD) $(IDIR_IPTABLES_MOD_NAT) $(PACKAGE_DIR)
     76
     77$(IPKG_IPTABLES_MOD_MASQUERADE):
     78        $(INSTALL_DIR) $(IDIR_IPTABLES_MOD_MASQUERADE)/usr/lib/xtables
     79        (cd $(WRKINST)/usr/lib/xtables ; \
     80                $(CP) libxt_MASQUERADE.so $(IDIR_IPTABLES_MOD_MASQUERADE)/usr/lib/xtables/ \
     81        )
     82        $(RSTRIP) $(IDIR_IPTABLES_MOD_MASQUERADE)
     83        $(IPKG_BUILD) $(IDIR_IPTABLES_MOD_MASQUERADE) $(PACKAGE_DIR)
     84
     85$(IPKG_IPTABLES_MOD_REJECT):
     86        $(INSTALL_DIR) $(IDIR_IPTABLES_MOD_REJECT)/usr/lib/xtables
     87        (cd $(WRKINST)/usr/lib/xtables ; \
     88                $(CP) libipt_REJECT.so $(IDIR_IPTABLES_MOD_REJECT)/usr/lib/xtables/ \
     89        )
     90        $(RSTRIP) $(IDIR_IPTABLES_MOD_REJECT)
     91        $(IPKG_BUILD) $(IDIR_IPTABLES_MOD_REJECT) $(PACKAGE_DIR)
     92
     93$(IPKG_IPTABLES_MOD_TCPMSS):
     94        $(INSTALL_DIR) $(IDIR_IPTABLES_MOD_TCPMSS)/usr/lib/xtables
     95        (cd $(WRKINST)/usr/lib/xtables ; \
     96                $(CP) libxt_tcpmss.so libxt_TCPMSS.so $(IDIR_IPTABLES_MOD_TCPMSS)/usr/lib/xtables/ \
     97        )
     98        $(RSTRIP) $(IDIR_IPTABLES_MOD_TCPMSS)
     99        $(IPKG_BUILD) $(IDIR_IPTABLES_MOD_TCPMSS) $(PACKAGE_DIR)
     100
     101
    91102$(IPKG_IPTABLES_FIREWALL_SCRIPT):
    92103        $(INSTALL_DIR) $(IDIR_IPTABLES_FIREWALL_SCRIPT)/etc/init.d
     
    111122        $(RSTRIP) $(IDIR_IP6TABLES)
    112123        $(IPKG_BUILD) $(IDIR_IP6TABLES) $(PACKAGE_DIR)
    113 
    114 layer7-install:
    115         $(INSTALL_DIR) $(IDIR_IPTABLES_MOD_FILTER)/etc/l7-protocols
    116         $(INSTALL_DATA) files/l7/*.pat $(IDIR_IPTABLES_MOD_FILTER)/etc/l7-protocols/
  • package/iptables/ipkg/iptables-mod-conntrack.control

    r2400aa1 r36e3a1c  
    22Priority: optional
    33Section: net
    4 Depends: iptables, kmod-ipt-conntrack
     4Depends: iptables, kmod-iptables-conntrack
    55Description: Iptables (IPv4) extensions for connection tracking
  • package/iptables/ipkg/iptables-mod-nat.control

    r2400aa1 r36e3a1c  
    22Priority: optional
    33Section: net
    4 Depends: iptables, kmod-ipt-nat
     4Depends: iptables, kmod-iptables-nat
    55Description: Iptables (IPv4) extensions for different NAT targets
  • package/iptables/ipkg/iptables-mod-reject.control

    r2400aa1 r36e3a1c  
    22Priority: optional
    33Section: net
    4 Depends: iptables
    5 Description: Iptables (IPv4) extensions for REJECT target
     4Depends: iptables, kmod-iptables-reject
     5Description: Iptables (IPv4) extensions for REJECT targets
Note: See TracChangeset for help on using the changeset viewer.