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 9a9525c7fSFlorian Westphal# old sockopt interface and eval loop 10a9525c7fSFlorian Westphalconfig IP6_NF_IPTABLES_LEGACY 11*6c959fd5SBreno Leitao tristate "Legacy IP6 tables support" 12*6c959fd5SBreno Leitao depends on INET && IPV6 13*6c959fd5SBreno Leitao select NETFILTER_XTABLES 14*6c959fd5SBreno Leitao default n 15*6c959fd5SBreno Leitao help 16*6c959fd5SBreno Leitao ip6tables is a legacy packet classifier. 17*6c959fd5SBreno Leitao This is not needed if you are using iptables over nftables 18*6c959fd5SBreno Leitao (iptables-nft). 19a9525c7fSFlorian Westphal 208db4c5beSPablo Neira Ayusoconfig NF_SOCKET_IPV6 218db4c5beSPablo Neira Ayuso tristate "IPv6 socket lookup support" 228db4c5beSPablo Neira Ayuso help 238db4c5beSPablo Neira Ayuso This option enables the IPv6 socket lookup infrastructure. This 2445ca4e0cSMáté Eckl is used by the {ip6,nf}tables socket match. 2545ca4e0cSMáté Eckl 2645ca4e0cSMáté Ecklconfig NF_TPROXY_IPV6 2745ca4e0cSMáté Eckl tristate "IPv6 tproxy support" 288db4c5beSPablo Neira Ayuso 29f04e599eSPablo Neira Ayusoif NF_TABLES 30f04e599eSPablo Neira Ayuso 3196518518SPatrick McHardyconfig NF_TABLES_IPV6 3202c7b25eSPablo Neira Ayuso bool "IPv6 nf_tables support" 33d497c635SPablo Neira Ayuso help 34d497c635SPablo Neira Ayuso This option enables the IPv6 support for nf_tables. 3596518518SPatrick McHardy 36f04e599eSPablo Neira Ayusoif NF_TABLES_IPV6 37f04e599eSPablo Neira Ayuso 38cc4723caSPatrick McHardyconfig NFT_REJECT_IPV6 39c8d7b98bSPablo Neira Ayuso select NF_REJECT_IPV6 40cc4723caSPatrick McHardy default NFT_REJECT 41cc4723caSPatrick McHardy tristate 42cc4723caSPatrick McHardy 43d877f071SPablo Neira Ayusoconfig NFT_DUP_IPV6 44d877f071SPablo Neira Ayuso tristate "IPv6 nf_tables packet duplication support" 45d3340b79SPablo Neira Ayuso depends on !NF_CONNTRACK || NF_CONNTRACK 46d877f071SPablo Neira Ayuso select NF_DUP_IPV6 47d877f071SPablo Neira Ayuso help 48d877f071SPablo Neira Ayuso This module enables IPv6 packet duplication support for nf_tables. 49d877f071SPablo Neira Ayuso 50f6d0cbcfSFlorian Westphalconfig NFT_FIB_IPV6 51f6d0cbcfSFlorian Westphal tristate "nf_tables fib / ipv6 route lookup support" 52f6d0cbcfSFlorian Westphal select NFT_FIB 53f6d0cbcfSFlorian Westphal help 54f6d0cbcfSFlorian Westphal This module enables IPv6 FIB lookups, e.g. for reverse path filtering. 55f6d0cbcfSFlorian Westphal It also allows query of the FIB for the route type, e.g. local, unicast, 56f6d0cbcfSFlorian Westphal multicast or blackhole. 57f6d0cbcfSFlorian Westphal 58f04e599eSPablo Neira Ayusoendif # NF_TABLES_IPV6 59f04e599eSPablo Neira Ayusoendif # NF_TABLES 60f04e599eSPablo Neira Ayuso 61bbde9fc1SPablo Neira Ayusoconfig NF_DUP_IPV6 62bbde9fc1SPablo Neira Ayuso tristate "Netfilter IPv6 packet duplication to alternate destination" 636ece90f9SPablo Neira Ayuso depends on !NF_CONNTRACK || NF_CONNTRACK 64bbde9fc1SPablo Neira Ayuso help 65bbde9fc1SPablo Neira Ayuso This option enables the nf_dup_ipv6 core, which duplicates an IPv6 66bbde9fc1SPablo Neira Ayuso packet to be rerouted to another destination. 67bbde9fc1SPablo Neira Ayuso 68f04e599eSPablo Neira Ayusoconfig NF_REJECT_IPV6 69f04e599eSPablo Neira Ayuso tristate "IPv6 packet rejection" 70f04e599eSPablo Neira Ayuso default m if NETFILTER_ADVANCED=n 71f04e599eSPablo Neira Ayuso 72c1878869SPablo Neira Ayusoconfig NF_LOG_IPV6 73c1878869SPablo Neira Ayuso tristate "IPv6 packet logging" 7441ad82f7SPablo Neira default m if NETFILTER_ADVANCED=n 75f5466caaSFlorian Westphal select NF_LOG_SYSLOG 76f5466caaSFlorian Westphal help 77f5466caaSFlorian Westphal This is a backwards-compat option for the user's convenience 78f5466caaSFlorian Westphal (e.g. when running oldconfig). It selects CONFIG_NF_LOG_SYSLOG. 79c1878869SPablo Neira Ayuso 801da177e4SLinus Torvaldsconfig IP6_NF_IPTABLES 81844dc7c8SPatrick McHardy tristate "IP6 tables support (required for filtering)" 828ce22fcaSPatrick McHardy depends on INET && IPV6 83a3c941b0SPatrick McHardy select NETFILTER_XTABLES 8433b8e776SPatrick McHardy default m if NETFILTER_ADVANCED=n 851da177e4SLinus Torvalds help 861da177e4SLinus Torvalds ip6tables is a general, extensible packet identification framework. 871da177e4SLinus Torvalds Currently only the packet filtering and packet mangling subsystem 881da177e4SLinus Torvalds for IPv6 use this, but connection tracking is going to follow. 891da177e4SLinus Torvalds Say 'Y' or 'M' here if you want to use either of those. 901da177e4SLinus Torvalds 911da177e4SLinus Torvalds To compile it as a module, choose M here. If unsure, say N. 921da177e4SLinus Torvalds 93c2df73deSJan Engelhardtif IP6_NF_IPTABLES 94c2df73deSJan Engelhardt 951da177e4SLinus Torvalds# The simple matches. 96aba0d348SJan Engelhardtconfig IP6_NF_MATCH_AH 97aba0d348SJan Engelhardt tristate '"ah" match support' 9833b8e776SPatrick McHardy depends on NETFILTER_ADVANCED 991da177e4SLinus Torvalds 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 112aba0d348SJan Engelhardt To compile it as a module, choose M here. If unsure, say N. 113aba0d348SJan Engelhardt 114aba0d348SJan Engelhardtconfig IP6_NF_MATCH_FRAG 115aba0d348SJan Engelhardt tristate '"frag" Fragmentation header match support' 116aba0d348SJan Engelhardt depends on NETFILTER_ADVANCED 117aba0d348SJan Engelhardt help 118aba0d348SJan Engelhardt 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 12477d73589SJan Engelhardt tristate '"hbh" hop-by-hop and "dst" opts header match support' 12533b8e776SPatrick McHardy depends on NETFILTER_ADVANCED 1261da177e4SLinus Torvalds help 1271da177e4SLinus Torvalds This allows one to match packets based on the hop-by-hop 1281da177e4SLinus Torvalds and destination options headers of a packet. 1291da177e4SLinus Torvalds 1301da177e4SLinus Torvalds To compile it as a module, choose M here. If unsure, say N. 1311da177e4SLinus Torvalds 1324323362eSJan Engelhardtconfig IP6_NF_MATCH_HL 1334323362eSJan Engelhardt tristate '"hl" hoplimit match support' 1344323362eSJan Engelhardt depends on NETFILTER_ADVANCED 1354323362eSJan Engelhardt select NETFILTER_XT_MATCH_HL 136a7f7f624SMasahiro Yamada help 1374323362eSJan Engelhardt This is a backwards-compat option for the user's convenience 1384323362eSJan Engelhardt (e.g. when running oldconfig). It selects 1398dd1d047SJan Engelhardt CONFIG_NETFILTER_XT_MATCH_HL. 1404323362eSJan Engelhardt 1411da177e4SLinus Torvaldsconfig IP6_NF_MATCH_IPV6HEADER 1424c37799cSJan Engelhardt tristate '"ipv6header" IPv6 Extension Headers Match' 14344c45eb9SLinus Torvalds default m if NETFILTER_ADVANCED=n 1441da177e4SLinus Torvalds help 1451da177e4SLinus Torvalds This module allows one to match packets based upon 1461da177e4SLinus Torvalds the ipv6 extension headers. 1471da177e4SLinus Torvalds 1481da177e4SLinus Torvalds To compile it as a module, choose M here. If unsure, say N. 1491da177e4SLinus Torvalds 150a0ca215aSMasahide NAKAMURAconfig IP6_NF_MATCH_MH 1514c37799cSJan Engelhardt tristate '"mh" match support' 15233b8e776SPatrick McHardy depends on NETFILTER_ADVANCED 153a0ca215aSMasahide NAKAMURA help 154a0ca215aSMasahide NAKAMURA This module allows one to match MH packets. 155a0ca215aSMasahide NAKAMURA 156a0ca215aSMasahide NAKAMURA To compile it as a module, choose M here. If unsure, say N. 157a0ca215aSMasahide NAKAMURA 158e26f9a48SFlorian Westphalconfig IP6_NF_MATCH_RPFILTER 159e26f9a48SFlorian Westphal tristate '"rpfilter" reverse path filter match support' 160f09becc7SPablo Neira Ayuso depends on NETFILTER_ADVANCED 161a9525c7fSFlorian Westphal depends on IP6_NF_MANGLE || IP6_NF_RAW || NFT_COMPAT 162a7f7f624SMasahiro Yamada help 163e26f9a48SFlorian Westphal This option allows you to match packets whose replies would 164e26f9a48SFlorian Westphal go out via the interface the packet came in. 165e26f9a48SFlorian Westphal 166e26f9a48SFlorian Westphal To compile it as a module, choose M here. If unsure, say N. 167e26f9a48SFlorian Westphal The module will be called ip6t_rpfilter. 168e26f9a48SFlorian Westphal 169aba0d348SJan Engelhardtconfig IP6_NF_MATCH_RT 170aba0d348SJan Engelhardt tristate '"rt" Routing header match support' 17133b8e776SPatrick McHardy depends on NETFILTER_ADVANCED 1721da177e4SLinus Torvalds help 173aba0d348SJan Engelhardt rt matching allows you to match packets based on the routing 174aba0d348SJan Engelhardt header of the packet. 1751da177e4SLinus Torvalds 1761da177e4SLinus Torvalds To compile it as a module, choose M here. If unsure, say N. 1771da177e4SLinus Torvalds 178202a8ff5SAhmed Abdelsalamconfig IP6_NF_MATCH_SRH 179202a8ff5SAhmed Abdelsalam tristate '"srh" Segment Routing header match support' 180202a8ff5SAhmed Abdelsalam depends on NETFILTER_ADVANCED 181202a8ff5SAhmed Abdelsalam help 182202a8ff5SAhmed Abdelsalam srh matching allows you to match packets based on the segment 183202a8ff5SAhmed Abdelsalam routing header of the packet. 184202a8ff5SAhmed Abdelsalam 185202a8ff5SAhmed Abdelsalam To compile it as a module, choose M here. If unsure, say N. 186202a8ff5SAhmed Abdelsalam 1871da177e4SLinus Torvalds# The targets 1884323362eSJan Engelhardtconfig IP6_NF_TARGET_HL 1894323362eSJan Engelhardt tristate '"HL" hoplimit target support' 19076b6717bSRandy Dunlap depends on NETFILTER_ADVANCED && IP6_NF_MANGLE 1914323362eSJan Engelhardt select NETFILTER_XT_TARGET_HL 192a7f7f624SMasahiro Yamada help 19376b6717bSRandy Dunlap This is a backwards-compatible option for the user's convenience 1944323362eSJan Engelhardt (e.g. when running oldconfig). It selects 1958dd1d047SJan Engelhardt CONFIG_NETFILTER_XT_TARGET_HL. 1964323362eSJan Engelhardt 1971da177e4SLinus Torvaldsconfig IP6_NF_FILTER 1981da177e4SLinus Torvalds tristate "Packet filtering" 19933b8e776SPatrick McHardy default m if NETFILTER_ADVANCED=n 200a9525c7fSFlorian Westphal select IP6_NF_IPTABLES_LEGACY 201a9525c7fSFlorian Westphal tristate 2021da177e4SLinus Torvalds help 2031da177e4SLinus Torvalds Packet filtering defines a table `filter', which has a series of 2041da177e4SLinus Torvalds rules for simple packet filtering at local input, forwarding and 2051da177e4SLinus Torvalds local output. See the man page for iptables(8). 2061da177e4SLinus Torvalds 2071da177e4SLinus Torvalds To compile it as a module, choose M here. If unsure, say N. 2081da177e4SLinus Torvalds 209764d8a9fSPatrick McHardyconfig IP6_NF_TARGET_REJECT 210764d8a9fSPatrick McHardy tristate "REJECT target support" 211a9525c7fSFlorian Westphal depends on IP6_NF_FILTER || NFT_COMPAT 212c8d7b98bSPablo Neira Ayuso select NF_REJECT_IPV6 21333b8e776SPatrick McHardy default m if NETFILTER_ADVANCED=n 214764d8a9fSPatrick McHardy help 215764d8a9fSPatrick McHardy The REJECT target allows a filtering rule to specify that an ICMPv6 216764d8a9fSPatrick McHardy error should be issued in response to an incoming packet, rather 217764d8a9fSPatrick McHardy than silently being dropped. 218764d8a9fSPatrick McHardy 219764d8a9fSPatrick McHardy To compile it as a module, choose M here. If unsure, say N. 220764d8a9fSPatrick 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 2274ad36228SPatrick McHardy The SYNPROXY target allows you to intercept TCP connections and 2284ad36228SPatrick McHardy establish them using syncookies before they are passed on to the 2294ad36228SPatrick McHardy server. This allows to avoid conntrack and server resource usage 2304ad36228SPatrick McHardy during SYN-flood attacks. 2314ad36228SPatrick McHardy 2324ad36228SPatrick McHardy To compile it as a module, choose M here. If unsure, say N. 2334ad36228SPatrick McHardy 2341da177e4SLinus Torvaldsconfig IP6_NF_MANGLE 2351da177e4SLinus Torvalds tristate "Packet mangling" 23633b8e776SPatrick McHardy default m if NETFILTER_ADVANCED=n 237a9525c7fSFlorian Westphal select IP6_NF_IPTABLES_LEGACY 2381da177e4SLinus Torvalds help 2391da177e4SLinus Torvalds This option adds a `mangle' table to iptables: see the man page for 2401da177e4SLinus Torvalds 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)' 247a9525c7fSFlorian Westphal select IP6_NF_IPTABLES_LEGACY 2481da177e4SLinus Torvalds help 2491da177e4SLinus Torvalds This option adds a `raw' table to ip6tables. This table is the very 2501da177e4SLinus Torvalds first in the netfilter framework and hooks in at the PREROUTING 2511da177e4SLinus Torvalds and OUTPUT chains. 2521da177e4SLinus Torvalds 2531da177e4SLinus Torvalds If you want to compile it as a module, say M here and read 254cd238effSMauro Carvalho Chehab <file:Documentation/kbuild/modules.rst>. If unsure, say `N'. 2551da177e4SLinus Torvalds 25617e6e59fSJames Morris# security table for MAC policy 25717e6e59fSJames Morrisconfig IP6_NF_SECURITY 25817e6e59fSJames Morris tristate "Security table" 25917e6e59fSJames Morris depends on SECURITY 26070eed75dSPatrick McHardy depends on NETFILTER_ADVANCED 261a9525c7fSFlorian Westphal select IP6_NF_IPTABLES_LEGACY 26217e6e59fSJames Morris help 26317e6e59fSJames Morris This option adds a `security' table to iptables, for use 26417e6e59fSJames Morris with Mandatory Access Control (MAC) policy. 26517e6e59fSJames Morris 26617e6e59fSJames Morris If unsure, say N. 26717e6e59fSJames Morris 2688993cf8eSPablo Neira Ayusoconfig IP6_NF_NAT 2698993cf8eSPablo Neira Ayuso tristate "ip6tables NAT support" 270a0ae2562SFlorian Westphal depends on NF_CONNTRACK 271b0041d1bSPablo Neira Ayuso depends on NETFILTER_ADVANCED 272b0041d1bSPablo Neira Ayuso select NF_NAT 273a9525c7fSFlorian Westphal select IP6_NF_IPTABLES_LEGACY 2748993cf8eSPablo Neira Ayuso select NETFILTER_XT_NAT 275b0041d1bSPablo Neira Ayuso help 2768993cf8eSPablo Neira Ayuso This enables the `nat' table in ip6tables. This allows masquerading, 2778993cf8eSPablo Neira Ayuso port forwarding and other forms of full Network Address Port 2788993cf8eSPablo Neira Ayuso Translation. 279b0041d1bSPablo Neira Ayuso 280b0041d1bSPablo Neira Ayuso To compile it as a module, choose M here. If unsure, say N. 281b0041d1bSPablo Neira Ayuso 282b0041d1bSPablo Neira Ayusoconfig IP6_NF_TARGET_MASQUERADE 283b0041d1bSPablo Neira Ayuso tristate "MASQUERADE target support" 284adf82accSFlorian Westphal select NETFILTER_XT_TARGET_MASQUERADE 285a9525c7fSFlorian Westphal depends on IP6_NF_NAT 286b0041d1bSPablo Neira Ayuso help 287adf82accSFlorian Westphal This is a backwards-compat option for the user's convenience 288adf82accSFlorian Westphal (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" 292a9525c7fSFlorian Westphal depends on IP6_NF_NAT || NFT_COMPAT 293b0041d1bSPablo Neira Ayuso help 294b0041d1bSPablo Neira Ayuso This option adds the `SNPT' and `DNPT' target, which perform 295b0041d1bSPablo Neira Ayuso stateless IPv6-to-IPv6 Network Prefix Translation per RFC 6296. 296b0041d1bSPablo Neira Ayuso 297b0041d1bSPablo Neira Ayuso To compile it as a module, choose M here. If unsure, say N. 298b0041d1bSPablo Neira Ayuso 299c2df73deSJan Engelhardtendif # IP6_NF_IPTABLES 3001da177e4SLinus Torvaldsendmenu 3011da177e4SLinus Torvalds 302a0ae2562SFlorian Westphalconfig NF_DEFRAG_IPV6 303a0ae2562SFlorian Westphal tristate 304