1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 21da177e4SLinus Torvalds# 31da177e4SLinus Torvalds# IP netfilter configuration 41da177e4SLinus Torvalds# 51da177e4SLinus Torvalds 68ce22fcaSPatrick McHardymenu "IPv6: Netfilter Configuration" 78ce22fcaSPatrick McHardy depends on INET && IPV6 && NETFILTER 81da177e4SLinus Torvalds 9*a9525c7fSFlorian Westphal# old sockopt interface and eval loop 10*a9525c7fSFlorian Westphalconfig IP6_NF_IPTABLES_LEGACY 11*a9525c7fSFlorian Westphal tristate "Legacy IP6 tables support" 12*a9525c7fSFlorian Westphal depends on INET && IPV6 && NETFILTER_XTABLES_LEGACY 138db4c5beSPablo Neira Ayuso depends on NETFILTER_XTABLES 148db4c5beSPablo Neira Ayuso default m if NETFILTER_XTABLES_LEGACY 158db4c5beSPablo Neira Ayuso help 168db4c5beSPablo Neira Ayuso ip6tables is a legacy packet classifier. 1745ca4e0cSMáté Eckl This is not needed if you are using iptables over nftables 1845ca4e0cSMáté Eckl (iptables-nft). 1945ca4e0cSMáté Eckl 2045ca4e0cSMáté Ecklconfig NF_SOCKET_IPV6 218db4c5beSPablo Neira Ayuso tristate "IPv6 socket lookup support" 22f04e599eSPablo Neira Ayuso help 23f04e599eSPablo Neira Ayuso This option enables the IPv6 socket lookup infrastructure. This 2496518518SPatrick McHardy is used by the {ip6,nf}tables socket match. 2502c7b25eSPablo Neira Ayuso 26d497c635SPablo Neira Ayusoconfig NF_TPROXY_IPV6 27d497c635SPablo Neira Ayuso tristate "IPv6 tproxy support" 2896518518SPatrick McHardy 29f04e599eSPablo Neira Ayusoif NF_TABLES 30f04e599eSPablo Neira Ayuso 31cc4723caSPatrick McHardyconfig NF_TABLES_IPV6 32c8d7b98bSPablo Neira Ayuso bool "IPv6 nf_tables support" 33cc4723caSPatrick McHardy help 34cc4723caSPatrick McHardy This option enables the IPv6 support for nf_tables. 35cc4723caSPatrick McHardy 36d877f071SPablo Neira Ayusoif NF_TABLES_IPV6 37d877f071SPablo Neira Ayuso 38d3340b79SPablo Neira Ayusoconfig NFT_REJECT_IPV6 39d877f071SPablo Neira Ayuso select NF_REJECT_IPV6 40d877f071SPablo Neira Ayuso default NFT_REJECT 41d877f071SPablo Neira Ayuso tristate 42d877f071SPablo Neira Ayuso 43f6d0cbcfSFlorian Westphalconfig NFT_DUP_IPV6 44f6d0cbcfSFlorian Westphal tristate "IPv6 nf_tables packet duplication support" 45f6d0cbcfSFlorian Westphal depends on !NF_CONNTRACK || NF_CONNTRACK 46f6d0cbcfSFlorian Westphal select NF_DUP_IPV6 47f6d0cbcfSFlorian Westphal help 48f6d0cbcfSFlorian Westphal This module enables IPv6 packet duplication support for nf_tables. 49f6d0cbcfSFlorian Westphal 50f6d0cbcfSFlorian Westphalconfig NFT_FIB_IPV6 51f04e599eSPablo Neira Ayuso tristate "nf_tables fib / ipv6 route lookup support" 52f04e599eSPablo Neira Ayuso select NFT_FIB 53f04e599eSPablo Neira Ayuso help 54bbde9fc1SPablo Neira Ayuso This module enables IPv6 FIB lookups, e.g. for reverse path filtering. 55bbde9fc1SPablo Neira Ayuso It also allows query of the FIB for the route type, e.g. local, unicast, 566ece90f9SPablo Neira Ayuso multicast or blackhole. 57bbde9fc1SPablo Neira Ayuso 58bbde9fc1SPablo Neira Ayusoendif # NF_TABLES_IPV6 59bbde9fc1SPablo Neira Ayusoendif # NF_TABLES 60bbde9fc1SPablo Neira Ayuso 61f04e599eSPablo Neira Ayusoconfig NF_DUP_IPV6 62f04e599eSPablo Neira Ayuso tristate "Netfilter IPv6 packet duplication to alternate destination" 63f04e599eSPablo Neira Ayuso depends on !NF_CONNTRACK || NF_CONNTRACK 64f04e599eSPablo Neira Ayuso help 65c1878869SPablo Neira Ayuso This option enables the nf_dup_ipv6 core, which duplicates an IPv6 66c1878869SPablo Neira Ayuso packet to be rerouted to another destination. 6741ad82f7SPablo Neira 68f5466caaSFlorian Westphalconfig NF_REJECT_IPV6 69f5466caaSFlorian Westphal tristate "IPv6 packet rejection" 70f5466caaSFlorian Westphal default m if NETFILTER_ADVANCED=n 71f5466caaSFlorian Westphal 72c1878869SPablo Neira Ayusoconfig NF_LOG_IPV6 731da177e4SLinus Torvalds tristate "IPv6 packet logging" 74844dc7c8SPatrick McHardy default m if NETFILTER_ADVANCED=n 758ce22fcaSPatrick McHardy select NF_LOG_SYSLOG 76a3c941b0SPatrick McHardy help 7733b8e776SPatrick McHardy This is a backwards-compat option for the user's convenience 781da177e4SLinus Torvalds (e.g. when running oldconfig). It selects CONFIG_NF_LOG_SYSLOG. 791da177e4SLinus Torvalds 801da177e4SLinus Torvaldsconfig IP6_NF_IPTABLES 811da177e4SLinus Torvalds tristate "IP6 tables support (required for filtering)" 821da177e4SLinus Torvalds depends on INET && IPV6 831da177e4SLinus Torvalds select NETFILTER_XTABLES 841da177e4SLinus Torvalds default m if NETFILTER_ADVANCED=n 851da177e4SLinus Torvalds help 86c2df73deSJan Engelhardt ip6tables is a general, extensible packet identification framework. 87c2df73deSJan Engelhardt Currently only the packet filtering and packet mangling subsystem 881da177e4SLinus Torvalds for IPv6 use this, but connection tracking is going to follow. 89aba0d348SJan Engelhardt Say 'Y' or 'M' here if you want to use either of those. 90aba0d348SJan Engelhardt 9133b8e776SPatrick McHardy To compile it as a module, choose M here. If unsure, say N. 921da177e4SLinus Torvalds 93aba0d348SJan Engelhardtif IP6_NF_IPTABLES 94aba0d348SJan Engelhardt 95aba0d348SJan Engelhardt# The simple matches. 96aba0d348SJan Engelhardtconfig IP6_NF_MATCH_AH 97aba0d348SJan Engelhardt tristate '"ah" match support' 98aba0d348SJan Engelhardt depends on NETFILTER_ADVANCED 99aba0d348SJan Engelhardt help 100aba0d348SJan Engelhardt This module allows one to match AH packets. 101aba0d348SJan Engelhardt 102aba0d348SJan Engelhardt To compile it as a module, choose M here. If unsure, say N. 103aba0d348SJan Engelhardt 104aba0d348SJan Engelhardtconfig IP6_NF_MATCH_EUI64 105aba0d348SJan Engelhardt tristate '"eui64" address check' 106aba0d348SJan Engelhardt depends on NETFILTER_ADVANCED 107aba0d348SJan Engelhardt help 108aba0d348SJan Engelhardt This module performs checking on the IPv6 source address 109aba0d348SJan Engelhardt Compares the last 64 bits with the EUI64 (delivered 110aba0d348SJan Engelhardt from the MAC address) address 111aba0d348SJan Engelhardt 1121da177e4SLinus Torvalds To compile it as a module, choose M here. If unsure, say N. 1131da177e4SLinus Torvalds 1141da177e4SLinus Torvaldsconfig IP6_NF_MATCH_FRAG 1151da177e4SLinus Torvalds tristate '"frag" Fragmentation header match support' 1161da177e4SLinus Torvalds depends on NETFILTER_ADVANCED 11777d73589SJan Engelhardt help 11833b8e776SPatrick McHardy frag matching allows you to match packets based on the fragmentation 1191da177e4SLinus Torvalds header of the packet. 1201da177e4SLinus Torvalds 1211da177e4SLinus Torvalds To compile it as a module, choose M here. If unsure, say N. 1221da177e4SLinus Torvalds 1231da177e4SLinus Torvaldsconfig IP6_NF_MATCH_OPTS 1241da177e4SLinus Torvalds tristate '"hbh" hop-by-hop and "dst" opts header match support' 1254323362eSJan Engelhardt depends on NETFILTER_ADVANCED 1264323362eSJan Engelhardt help 1274323362eSJan Engelhardt This allows one to match packets based on the hop-by-hop 1284323362eSJan Engelhardt and destination options headers of a packet. 129a7f7f624SMasahiro Yamada 1304323362eSJan Engelhardt To compile it as a module, choose M here. If unsure, say N. 1314323362eSJan Engelhardt 1328dd1d047SJan Engelhardtconfig IP6_NF_MATCH_HL 1334323362eSJan Engelhardt tristate '"hl" hoplimit match support' 1341da177e4SLinus Torvalds depends on NETFILTER_ADVANCED 1354c37799cSJan Engelhardt select NETFILTER_XT_MATCH_HL 13644c45eb9SLinus Torvalds help 1371da177e4SLinus Torvalds This is a backwards-compat option for the user's convenience 1381da177e4SLinus Torvalds (e.g. when running oldconfig). It selects 1391da177e4SLinus Torvalds CONFIG_NETFILTER_XT_MATCH_HL. 1401da177e4SLinus Torvalds 1411da177e4SLinus Torvaldsconfig IP6_NF_MATCH_IPV6HEADER 1421da177e4SLinus Torvalds tristate '"ipv6header" IPv6 Extension Headers Match' 143a0ca215aSMasahide NAKAMURA default m if NETFILTER_ADVANCED=n 1444c37799cSJan Engelhardt help 14533b8e776SPatrick McHardy This module allows one to match packets based upon 146a0ca215aSMasahide NAKAMURA the ipv6 extension headers. 147a0ca215aSMasahide NAKAMURA 148a0ca215aSMasahide NAKAMURA To compile it as a module, choose M here. If unsure, say N. 149a0ca215aSMasahide NAKAMURA 150a0ca215aSMasahide NAKAMURAconfig IP6_NF_MATCH_MH 151e26f9a48SFlorian Westphal tristate '"mh" match support' 152e26f9a48SFlorian Westphal depends on NETFILTER_ADVANCED 153f09becc7SPablo Neira Ayuso help 154*a9525c7fSFlorian Westphal This module allows one to match MH packets. 155a7f7f624SMasahiro Yamada 156e26f9a48SFlorian Westphal To compile it as a module, choose M here. If unsure, say N. 157e26f9a48SFlorian Westphal 158e26f9a48SFlorian Westphalconfig IP6_NF_MATCH_RPFILTER 159e26f9a48SFlorian Westphal tristate '"rpfilter" reverse path filter match support' 160e26f9a48SFlorian Westphal depends on NETFILTER_ADVANCED 161e26f9a48SFlorian Westphal depends on IP6_NF_MANGLE || IP6_NF_RAW || NFT_COMPAT 162aba0d348SJan Engelhardt help 163aba0d348SJan Engelhardt This option allows you to match packets whose replies would 16433b8e776SPatrick McHardy go out via the interface the packet came in. 1651da177e4SLinus Torvalds 166aba0d348SJan Engelhardt To compile it as a module, choose M here. If unsure, say N. 167aba0d348SJan Engelhardt The module will be called ip6t_rpfilter. 1681da177e4SLinus Torvalds 1691da177e4SLinus Torvaldsconfig IP6_NF_MATCH_RT 1701da177e4SLinus Torvalds tristate '"rt" Routing header match support' 171202a8ff5SAhmed Abdelsalam depends on NETFILTER_ADVANCED 172202a8ff5SAhmed Abdelsalam help 173202a8ff5SAhmed Abdelsalam rt matching allows you to match packets based on the routing 174202a8ff5SAhmed Abdelsalam header of the packet. 175202a8ff5SAhmed Abdelsalam 176202a8ff5SAhmed Abdelsalam To compile it as a module, choose M here. If unsure, say N. 177202a8ff5SAhmed Abdelsalam 178202a8ff5SAhmed Abdelsalamconfig IP6_NF_MATCH_SRH 179202a8ff5SAhmed Abdelsalam tristate '"srh" Segment Routing header match support' 1801da177e4SLinus Torvalds depends on NETFILTER_ADVANCED 1814323362eSJan Engelhardt help 1824323362eSJan Engelhardt srh matching allows you to match packets based on the segment 18376b6717bSRandy Dunlap routing header of the packet. 1844323362eSJan Engelhardt 185a7f7f624SMasahiro Yamada To compile it as a module, choose M here. If unsure, say N. 18676b6717bSRandy Dunlap 1874323362eSJan Engelhardt# The targets 1888dd1d047SJan Engelhardtconfig IP6_NF_TARGET_HL 1894323362eSJan Engelhardt tristate '"HL" hoplimit target support' 1901da177e4SLinus Torvalds depends on NETFILTER_ADVANCED && IP6_NF_MANGLE 1911da177e4SLinus Torvalds select NETFILTER_XT_TARGET_HL 19233b8e776SPatrick McHardy help 193*a9525c7fSFlorian Westphal This is a backwards-compatible option for the user's convenience 194*a9525c7fSFlorian Westphal (e.g. when running oldconfig). It selects 1951da177e4SLinus Torvalds CONFIG_NETFILTER_XT_TARGET_HL. 1961da177e4SLinus Torvalds 1971da177e4SLinus Torvaldsconfig IP6_NF_FILTER 1981da177e4SLinus Torvalds tristate "Packet filtering" 1991da177e4SLinus Torvalds default m if NETFILTER_ADVANCED=n || IP6_NF_IPTABLES_LEGACY 2001da177e4SLinus Torvalds depends on IP6_NF_IPTABLES_LEGACY 2011da177e4SLinus Torvalds tristate 202764d8a9fSPatrick McHardy help 203764d8a9fSPatrick McHardy Packet filtering defines a table `filter', which has a series of 204*a9525c7fSFlorian Westphal rules for simple packet filtering at local input, forwarding and 205c8d7b98bSPablo Neira Ayuso local output. See the man page for iptables(8). 20633b8e776SPatrick McHardy 207764d8a9fSPatrick McHardy To compile it as a module, choose M here. If unsure, say N. 208764d8a9fSPatrick McHardy 209764d8a9fSPatrick McHardyconfig IP6_NF_TARGET_REJECT 210764d8a9fSPatrick McHardy tristate "REJECT target support" 211764d8a9fSPatrick McHardy depends on IP6_NF_FILTER || NFT_COMPAT 212764d8a9fSPatrick McHardy select NF_REJECT_IPV6 213764d8a9fSPatrick McHardy default m if NETFILTER_ADVANCED=n 2144ad36228SPatrick McHardy help 2154ad36228SPatrick McHardy The REJECT target allows a filtering rule to specify that an ICMPv6 2164ad36228SPatrick McHardy error should be issued in response to an incoming packet, rather 2174ad36228SPatrick McHardy than silently being dropped. 2184ad36228SPatrick McHardy 2194ad36228SPatrick McHardy To compile it as a module, choose M here. If unsure, say N. 2204ad36228SPatrick McHardy 2214ad36228SPatrick McHardyconfig IP6_NF_TARGET_SYNPROXY 2224ad36228SPatrick McHardy tristate "SYNPROXY target support" 2234ad36228SPatrick McHardy depends on NF_CONNTRACK && NETFILTER_ADVANCED 2244ad36228SPatrick McHardy select NETFILTER_SYNPROXY 2254ad36228SPatrick McHardy select SYN_COOKIES 2264ad36228SPatrick McHardy help 2271da177e4SLinus Torvalds The SYNPROXY target allows you to intercept TCP connections and 2281da177e4SLinus Torvalds establish them using syncookies before they are passed on to the 22933b8e776SPatrick McHardy server. This allows to avoid conntrack and server resource usage 230*a9525c7fSFlorian Westphal during SYN-flood attacks. 2311da177e4SLinus Torvalds 2321da177e4SLinus Torvalds To compile it as a module, choose M here. If unsure, say N. 2331da177e4SLinus Torvalds 2341da177e4SLinus Torvaldsconfig IP6_NF_MANGLE 2351da177e4SLinus Torvalds tristate "Packet mangling" 2361da177e4SLinus Torvalds default m if NETFILTER_ADVANCED=n || IP6_NF_IPTABLES_LEGACY 2371da177e4SLinus Torvalds depends on IP6_NF_IPTABLES_LEGACY 2381da177e4SLinus Torvalds help 2391da177e4SLinus Torvalds This option adds a `mangle' table to iptables: see the man page for 240*a9525c7fSFlorian Westphal iptables(8). This table is used for various packet alterations 2411da177e4SLinus Torvalds which can effect how the packet is routed. 2421da177e4SLinus Torvalds 2431da177e4SLinus Torvalds To compile it as a module, choose M here. If unsure, say N. 2441da177e4SLinus Torvalds 2451da177e4SLinus Torvaldsconfig IP6_NF_RAW 2461da177e4SLinus Torvalds tristate 'raw table support (required for TRACE)' 247cd238effSMauro Carvalho Chehab depends on IP6_NF_IPTABLES_LEGACY 2481da177e4SLinus Torvalds help 24917e6e59fSJames Morris This option adds a `raw' table to ip6tables. This table is the very 25017e6e59fSJames Morris first in the netfilter framework and hooks in at the PREROUTING 25117e6e59fSJames Morris and OUTPUT chains. 25217e6e59fSJames Morris 25370eed75dSPatrick McHardy If you want to compile it as a module, say M here and read 254*a9525c7fSFlorian Westphal <file:Documentation/kbuild/modules.rst>. If unsure, say `N'. 25517e6e59fSJames Morris 25617e6e59fSJames Morris# security table for MAC policy 25717e6e59fSJames Morrisconfig IP6_NF_SECURITY 25817e6e59fSJames Morris tristate "Security table" 25917e6e59fSJames Morris depends on SECURITY 26017e6e59fSJames Morris depends on NETFILTER_ADVANCED 2618993cf8eSPablo Neira Ayuso depends on IP6_NF_IPTABLES_LEGACY 2628993cf8eSPablo Neira Ayuso help 263a0ae2562SFlorian Westphal This option adds a `security' table to iptables, for use 264b0041d1bSPablo Neira Ayuso with Mandatory Access Control (MAC) policy. 265b0041d1bSPablo Neira Ayuso 266*a9525c7fSFlorian Westphal If unsure, say N. 2678993cf8eSPablo Neira Ayuso 268b0041d1bSPablo Neira Ayusoconfig IP6_NF_NAT 2698993cf8eSPablo Neira Ayuso tristate "ip6tables NAT support" 2708993cf8eSPablo Neira Ayuso depends on NF_CONNTRACK 2718993cf8eSPablo Neira Ayuso depends on NETFILTER_ADVANCED 272b0041d1bSPablo Neira Ayuso depends on IP6_NF_IPTABLES_LEGACY 273b0041d1bSPablo Neira Ayuso select NF_NAT 274b0041d1bSPablo Neira Ayuso select NETFILTER_XT_NAT 275b0041d1bSPablo Neira Ayuso help 276b0041d1bSPablo Neira Ayuso This enables the `nat' table in ip6tables. This allows masquerading, 277adf82accSFlorian Westphal port forwarding and other forms of full Network Address Port 278*a9525c7fSFlorian Westphal Translation. 279b0041d1bSPablo Neira Ayuso 280adf82accSFlorian Westphal To compile it as a module, choose M here. If unsure, say N. 281adf82accSFlorian Westphal 282b0041d1bSPablo Neira Ayusoconfig IP6_NF_TARGET_MASQUERADE 283b0041d1bSPablo Neira Ayuso tristate "MASQUERADE target support" 284b0041d1bSPablo Neira Ayuso select NETFILTER_XT_TARGET_MASQUERADE 285*a9525c7fSFlorian Westphal depends on IP6_NF_NAT 286b0041d1bSPablo Neira Ayuso help 287b0041d1bSPablo Neira Ayuso This is a backwards-compat option for the user's convenience 288b0041d1bSPablo Neira Ayuso (e.g. when running oldconfig). It selects NETFILTER_XT_TARGET_MASQUERADE. 289b0041d1bSPablo Neira Ayuso 290b0041d1bSPablo Neira Ayusoconfig IP6_NF_TARGET_NPT 291b0041d1bSPablo Neira Ayuso tristate "NPT (Network Prefix translation) target support" 292c2df73deSJan Engelhardt depends on IP6_NF_NAT || NFT_COMPAT 2931da177e4SLinus Torvalds help 2941da177e4SLinus Torvalds This option adds the `SNPT' and `DNPT' target, which perform 295a0ae2562SFlorian Westphal stateless IPv6-to-IPv6 Network Prefix Translation per RFC 6296. 296a0ae2562SFlorian Westphal 297 To compile it as a module, choose M here. If unsure, say N. 298 299endif # IP6_NF_IPTABLES 300endmenu 301 302config NF_DEFRAG_IPV6 303 tristate 304