xref: /openbmc/linux/net/netfilter/Kconfig (revision f21e49be)
1# SPDX-License-Identifier: GPL-2.0-only
2menu "Core Netfilter Configuration"
3	depends on INET && NETFILTER
4
5config NETFILTER_INGRESS
6	bool "Netfilter ingress support"
7	default y
8	select NET_INGRESS
9	help
10	  This allows you to classify packets from ingress using the Netfilter
11	  infrastructure.
12
13config NETFILTER_EGRESS
14	bool "Netfilter egress support"
15	default y
16	select NET_EGRESS
17	help
18	  This allows you to classify packets before transmission using the
19	  Netfilter infrastructure.
20
21config NETFILTER_SKIP_EGRESS
22	def_bool NETFILTER_EGRESS && (NET_CLS_ACT || IFB)
23
24config NETFILTER_NETLINK
25	tristate
26
27config NETFILTER_FAMILY_BRIDGE
28	bool
29
30config NETFILTER_FAMILY_ARP
31	bool
32
33config NETFILTER_NETLINK_HOOK
34	tristate "Netfilter base hook dump support"
35	depends on NETFILTER_ADVANCED
36	depends on NF_TABLES
37	select NETFILTER_NETLINK
38	help
39	  If this option is enabled, the kernel will include support
40	  to list the base netfilter hooks via NFNETLINK.
41	  This is helpful for debugging.
42
43config NETFILTER_NETLINK_ACCT
44	tristate "Netfilter NFACCT over NFNETLINK interface"
45	depends on NETFILTER_ADVANCED
46	select NETFILTER_NETLINK
47	help
48	  If this option is enabled, the kernel will include support
49	  for extended accounting via NFNETLINK.
50
51config NETFILTER_NETLINK_QUEUE
52	tristate "Netfilter NFQUEUE over NFNETLINK interface"
53	depends on NETFILTER_ADVANCED
54	select NETFILTER_NETLINK
55	help
56	  If this option is enabled, the kernel will include support
57	  for queueing packets via NFNETLINK.
58
59config NETFILTER_NETLINK_LOG
60	tristate "Netfilter LOG over NFNETLINK interface"
61	default m if NETFILTER_ADVANCED=n
62	select NETFILTER_NETLINK
63	help
64	  If this option is enabled, the kernel will include support
65	  for logging packets via NFNETLINK.
66
67	  This obsoletes the existing ipt_ULOG and ebg_ulog mechanisms,
68	  and is also scheduled to replace the old syslog-based ipt_LOG
69	  and ip6t_LOG modules.
70
71config NETFILTER_NETLINK_OSF
72	tristate "Netfilter OSF over NFNETLINK interface"
73	depends on NETFILTER_ADVANCED
74	select NETFILTER_NETLINK
75	help
76	  If this option is enabled, the kernel will include support
77	  for passive OS fingerprint via NFNETLINK.
78
79config NF_CONNTRACK
80	tristate "Netfilter connection tracking support"
81	default m if NETFILTER_ADVANCED=n
82	select NF_DEFRAG_IPV4
83	select NF_DEFRAG_IPV6 if IPV6 != n
84	help
85	  Connection tracking keeps a record of what packets have passed
86	  through your machine, in order to figure out how they are related
87	  into connections.
88
89	  This is required to do Masquerading or other kinds of Network
90	  Address Translation.  It can also be used to enhance packet
91	  filtering (see `Connection state match support' below).
92
93	  To compile it as a module, choose M here.  If unsure, say N.
94
95config NF_LOG_SYSLOG
96	tristate "Syslog packet logging"
97	default m if NETFILTER_ADVANCED=n
98	help
99	  This option enable support for packet logging via syslog.
100	  It supports IPv4, IPV6, ARP and common transport protocols such
101	  as TCP and UDP.
102	  This is a simpler but less flexible logging method compared to
103	  CONFIG_NETFILTER_NETLINK_LOG.
104	  If both are enabled the backend to use can be configured at run-time
105	  by means of per-address-family sysctl tunables.
106
107if NF_CONNTRACK
108config NETFILTER_CONNCOUNT
109	tristate
110
111config NF_CONNTRACK_MARK
112	bool  'Connection mark tracking support'
113	depends on NETFILTER_ADVANCED
114	help
115	  This option enables support for connection marks, used by the
116	  `CONNMARK' target and `connmark' match. Similar to the mark value
117	  of packets, but this mark value is kept in the conntrack session
118	  instead of the individual packets.
119
120config NF_CONNTRACK_SECMARK
121	bool  'Connection tracking security mark support'
122	depends on NETWORK_SECMARK
123	default y if NETFILTER_ADVANCED=n
124	help
125	  This option enables security markings to be applied to
126	  connections.  Typically they are copied to connections from
127	  packets using the CONNSECMARK target and copied back from
128	  connections to packets with the same target, with the packets
129	  being originally labeled via SECMARK.
130
131	  If unsure, say 'N'.
132
133config NF_CONNTRACK_ZONES
134	bool  'Connection tracking zones'
135	depends on NETFILTER_ADVANCED
136	help
137	  This option enables support for connection tracking zones.
138	  Normally, each connection needs to have a unique system wide
139	  identity. Connection tracking zones allow to have multiple
140	  connections using the same identity, as long as they are
141	  contained in different zones.
142
143	  If unsure, say `N'.
144
145config NF_CONNTRACK_PROCFS
146	bool "Supply CT list in procfs (OBSOLETE)"
147	default y
148	depends on PROC_FS
149	help
150	This option enables for the list of known conntrack entries
151	to be shown in procfs under net/netfilter/nf_conntrack. This
152	is considered obsolete in favor of using the conntrack(8)
153	tool which uses Netlink.
154
155config NF_CONNTRACK_EVENTS
156	bool "Connection tracking events"
157	depends on NETFILTER_ADVANCED
158	help
159	  If this option is enabled, the connection tracking code will
160	  provide a notifier chain that can be used by other kernel code
161	  to get notified about changes in the connection tracking state.
162
163	  If unsure, say `N'.
164
165config NF_CONNTRACK_TIMEOUT
166	bool  'Connection tracking timeout'
167	depends on NETFILTER_ADVANCED
168	help
169	  This option enables support for connection tracking timeout
170	  extension. This allows you to attach timeout policies to flow
171	  via the CT target.
172
173	  If unsure, say `N'.
174
175config NF_CONNTRACK_TIMESTAMP
176	bool  'Connection tracking timestamping'
177	depends on NETFILTER_ADVANCED
178	help
179	  This option enables support for connection tracking timestamping.
180	  This allows you to store the flow start-time and to obtain
181	  the flow-stop time (once it has been destroyed) via Connection
182	  tracking events.
183
184	  If unsure, say `N'.
185
186config NF_CONNTRACK_LABELS
187	bool "Connection tracking labels"
188	help
189	  This option enables support for assigning user-defined flag bits
190	  to connection tracking entries.  It can be used with xtables connlabel
191	  match and the nftables ct expression.
192
193config NF_CT_PROTO_DCCP
194	bool 'DCCP protocol connection tracking support'
195	depends on NETFILTER_ADVANCED
196	default y
197	help
198	  With this option enabled, the layer 3 independent connection
199	  tracking code will be able to do state tracking on DCCP connections.
200
201	  If unsure, say Y.
202
203config NF_CT_PROTO_GRE
204	bool
205
206config NF_CT_PROTO_SCTP
207	bool 'SCTP protocol connection tracking support'
208	depends on NETFILTER_ADVANCED
209	default y
210	select LIBCRC32C
211	help
212	  With this option enabled, the layer 3 independent connection
213	  tracking code will be able to do state tracking on SCTP connections.
214
215	  If unsure, say Y.
216
217config NF_CT_PROTO_UDPLITE
218	bool 'UDP-Lite protocol connection tracking support'
219	depends on NETFILTER_ADVANCED
220	default y
221	help
222	  With this option enabled, the layer 3 independent connection
223	  tracking code will be able to do state tracking on UDP-Lite
224	  connections.
225
226	  If unsure, say Y.
227
228config NF_CONNTRACK_AMANDA
229	tristate "Amanda backup protocol support"
230	depends on NETFILTER_ADVANCED
231	select TEXTSEARCH
232	select TEXTSEARCH_KMP
233	help
234	  If you are running the Amanda backup package <http://www.amanda.org/>
235	  on this machine or machines that will be MASQUERADED through this
236	  machine, then you may want to enable this feature.  This allows the
237	  connection tracking and natting code to allow the sub-channels that
238	  Amanda requires for communication of the backup data, messages and
239	  index.
240
241	  To compile it as a module, choose M here.  If unsure, say N.
242
243config NF_CONNTRACK_FTP
244	tristate "FTP protocol support"
245	default m if NETFILTER_ADVANCED=n
246	help
247	  Tracking FTP connections is problematic: special helpers are
248	  required for tracking them, and doing masquerading and other forms
249	  of Network Address Translation on them.
250
251	  This is FTP support on Layer 3 independent connection tracking.
252
253	  To compile it as a module, choose M here.  If unsure, say N.
254
255config NF_CONNTRACK_H323
256	tristate "H.323 protocol support"
257	depends on IPV6 || IPV6=n
258	depends on NETFILTER_ADVANCED
259	help
260	  H.323 is a VoIP signalling protocol from ITU-T. As one of the most
261	  important VoIP protocols, it is widely used by voice hardware and
262	  software including voice gateways, IP phones, Netmeeting, OpenPhone,
263	  Gnomemeeting, etc.
264
265	  With this module you can support H.323 on a connection tracking/NAT
266	  firewall.
267
268	  This module supports RAS, Fast Start, H.245 Tunnelling, Call
269	  Forwarding, RTP/RTCP and T.120 based audio, video, fax, chat,
270	  whiteboard, file transfer, etc. For more information, please
271	  visit http://nath323.sourceforge.net/.
272
273	  To compile it as a module, choose M here.  If unsure, say N.
274
275config NF_CONNTRACK_IRC
276	tristate "IRC protocol support"
277	default m if NETFILTER_ADVANCED=n
278	help
279	  There is a commonly-used extension to IRC called
280	  Direct Client-to-Client Protocol (DCC).  This enables users to send
281	  files to each other, and also chat to each other without the need
282	  of a server.  DCC Sending is used anywhere you send files over IRC,
283	  and DCC Chat is most commonly used by Eggdrop bots.  If you are
284	  using NAT, this extension will enable you to send files and initiate
285	  chats.  Note that you do NOT need this extension to get files or
286	  have others initiate chats, or everything else in IRC.
287
288	  To compile it as a module, choose M here.  If unsure, say N.
289
290config NF_CONNTRACK_BROADCAST
291	tristate
292
293config NF_CONNTRACK_NETBIOS_NS
294	tristate "NetBIOS name service protocol support"
295	select NF_CONNTRACK_BROADCAST
296	help
297	  NetBIOS name service requests are sent as broadcast messages from an
298	  unprivileged port and responded to with unicast messages to the
299	  same port. This make them hard to firewall properly because connection
300	  tracking doesn't deal with broadcasts. This helper tracks locally
301	  originating NetBIOS name service requests and the corresponding
302	  responses. It relies on correct IP address configuration, specifically
303	  netmask and broadcast address. When properly configured, the output
304	  of "ip address show" should look similar to this:
305
306	  $ ip -4 address show eth0
307	  4: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
308	      inet 172.16.2.252/24 brd 172.16.2.255 scope global eth0
309
310	  To compile it as a module, choose M here.  If unsure, say N.
311
312config NF_CONNTRACK_SNMP
313	tristate "SNMP service protocol support"
314	depends on NETFILTER_ADVANCED
315	select NF_CONNTRACK_BROADCAST
316	help
317	  SNMP service requests are sent as broadcast messages from an
318	  unprivileged port and responded to with unicast messages to the
319	  same port. This make them hard to firewall properly because connection
320	  tracking doesn't deal with broadcasts. This helper tracks locally
321	  originating SNMP service requests and the corresponding
322	  responses. It relies on correct IP address configuration, specifically
323	  netmask and broadcast address.
324
325	  To compile it as a module, choose M here.  If unsure, say N.
326
327config NF_CONNTRACK_PPTP
328	tristate "PPtP protocol support"
329	depends on NETFILTER_ADVANCED
330	select NF_CT_PROTO_GRE
331	help
332	  This module adds support for PPTP (Point to Point Tunnelling
333	  Protocol, RFC2637) connection tracking and NAT.
334
335	  If you are running PPTP sessions over a stateful firewall or NAT
336	  box, you may want to enable this feature.
337
338	  Please note that not all PPTP modes of operation are supported yet.
339	  Specifically these limitations exist:
340	    - Blindly assumes that control connections are always established
341	      in PNS->PAC direction. This is a violation of RFC2637.
342	    - Only supports a single call within each session
343
344	  To compile it as a module, choose M here.  If unsure, say N.
345
346config NF_CONNTRACK_SANE
347	tristate "SANE protocol support"
348	depends on NETFILTER_ADVANCED
349	help
350	  SANE is a protocol for remote access to scanners as implemented
351	  by the 'saned' daemon. Like FTP, it uses separate control and
352	  data connections.
353
354	  With this module you can support SANE on a connection tracking
355	  firewall.
356
357	  To compile it as a module, choose M here.  If unsure, say N.
358
359config NF_CONNTRACK_SIP
360	tristate "SIP protocol support"
361	default m if NETFILTER_ADVANCED=n
362	help
363	  SIP is an application-layer control protocol that can establish,
364	  modify, and terminate multimedia sessions (conferences) such as
365	  Internet telephony calls. With the nf_conntrack_sip and
366	  the nf_nat_sip modules you can support the protocol on a connection
367	  tracking/NATing firewall.
368
369	  To compile it as a module, choose M here.  If unsure, say N.
370
371config NF_CONNTRACK_TFTP
372	tristate "TFTP protocol support"
373	depends on NETFILTER_ADVANCED
374	help
375	  TFTP connection tracking helper, this is required depending
376	  on how restrictive your ruleset is.
377	  If you are using a tftp client behind -j SNAT or -j MASQUERADING
378	  you will need this.
379
380	  To compile it as a module, choose M here.  If unsure, say N.
381
382config NF_CT_NETLINK
383	tristate 'Connection tracking netlink interface'
384	select NETFILTER_NETLINK
385	default m if NETFILTER_ADVANCED=n
386	help
387	  This option enables support for a netlink-based userspace interface
388
389config NF_CT_NETLINK_TIMEOUT
390	tristate  'Connection tracking timeout tuning via Netlink'
391	select NETFILTER_NETLINK
392	depends on NETFILTER_ADVANCED
393	depends on NF_CONNTRACK_TIMEOUT
394	help
395	  This option enables support for connection tracking timeout
396	  fine-grain tuning. This allows you to attach specific timeout
397	  policies to flows, instead of using the global timeout policy.
398
399	  If unsure, say `N'.
400
401config NF_CT_NETLINK_HELPER
402	tristate 'Connection tracking helpers in user-space via Netlink'
403	select NETFILTER_NETLINK
404	depends on NF_CT_NETLINK
405	depends on NETFILTER_NETLINK_QUEUE
406	depends on NETFILTER_NETLINK_GLUE_CT
407	depends on NETFILTER_ADVANCED
408	help
409	  This option enables the user-space connection tracking helpers
410	  infrastructure.
411
412	  If unsure, say `N'.
413
414config NETFILTER_NETLINK_GLUE_CT
415	bool "NFQUEUE and NFLOG integration with Connection Tracking"
416	default n
417	depends on (NETFILTER_NETLINK_QUEUE || NETFILTER_NETLINK_LOG) && NF_CT_NETLINK
418	help
419	  If this option is enabled, NFQUEUE and NFLOG can include
420	  Connection Tracking information together with the packet is
421	  the enqueued via NFNETLINK.
422
423config NF_NAT
424	tristate "Network Address Translation support"
425	depends on NF_CONNTRACK
426	default m if NETFILTER_ADVANCED=n
427	help
428	  The NAT option allows masquerading, port forwarding and other
429	  forms of full Network Address Port Translation. This can be
430	  controlled by iptables, ip6tables or nft.
431
432config NF_NAT_AMANDA
433	tristate
434	depends on NF_CONNTRACK && NF_NAT
435	default NF_NAT && NF_CONNTRACK_AMANDA
436
437config NF_NAT_FTP
438	tristate
439	depends on NF_CONNTRACK && NF_NAT
440	default NF_NAT && NF_CONNTRACK_FTP
441
442config NF_NAT_IRC
443	tristate
444	depends on NF_CONNTRACK && NF_NAT
445	default NF_NAT && NF_CONNTRACK_IRC
446
447config NF_NAT_SIP
448	tristate
449	depends on NF_CONNTRACK && NF_NAT
450	default NF_NAT && NF_CONNTRACK_SIP
451
452config NF_NAT_TFTP
453	tristate
454	depends on NF_CONNTRACK && NF_NAT
455	default NF_NAT && NF_CONNTRACK_TFTP
456
457config NF_NAT_REDIRECT
458	bool
459
460config NF_NAT_MASQUERADE
461	bool
462
463config NETFILTER_SYNPROXY
464	tristate
465
466endif # NF_CONNTRACK
467
468config NF_TABLES
469	select NETFILTER_NETLINK
470	select LIBCRC32C
471	tristate "Netfilter nf_tables support"
472	help
473	  nftables is the new packet classification framework that intends to
474	  replace the existing {ip,ip6,arp,eb}_tables infrastructure. It
475	  provides a pseudo-state machine with an extensible instruction-set
476	  (also known as expressions) that the userspace 'nft' utility
477	  (https://www.netfilter.org/projects/nftables) uses to build the
478	  rule-set. It also comes with the generic set infrastructure that
479	  allows you to construct mappings between matchings and actions
480	  for performance lookups.
481
482	  To compile it as a module, choose M here.
483
484if NF_TABLES
485config NF_TABLES_INET
486	depends on IPV6
487	select NF_TABLES_IPV4
488	select NF_TABLES_IPV6
489	bool "Netfilter nf_tables mixed IPv4/IPv6 tables support"
490	help
491	  This option enables support for a mixed IPv4/IPv6 "inet" table.
492
493config NF_TABLES_NETDEV
494	bool "Netfilter nf_tables netdev tables support"
495	help
496	  This option enables support for the "netdev" table.
497
498config NFT_NUMGEN
499	tristate "Netfilter nf_tables number generator module"
500	help
501	  This option adds the number generator expression used to perform
502	  incremental counting and random numbers bound to a upper limit.
503
504config NFT_CT
505	depends on NF_CONNTRACK
506	tristate "Netfilter nf_tables conntrack module"
507	help
508	  This option adds the "ct" expression that you can use to match
509	  connection tracking information such as the flow state.
510
511config NFT_FLOW_OFFLOAD
512	depends on NF_CONNTRACK && NF_FLOW_TABLE
513	tristate "Netfilter nf_tables hardware flow offload module"
514	help
515	  This option adds the "flow_offload" expression that you can use to
516	  choose what flows are placed into the hardware.
517
518config NFT_COUNTER
519	tristate "Netfilter nf_tables counter module"
520	help
521	  This option adds the "counter" expression that you can use to
522	  include packet and byte counters in a rule.
523
524config NFT_CONNLIMIT
525	tristate "Netfilter nf_tables connlimit module"
526	depends on NF_CONNTRACK
527	depends on NETFILTER_ADVANCED
528	select NETFILTER_CONNCOUNT
529	help
530	  This option adds the "connlimit" expression that you can use to
531	  ratelimit rule matchings per connections.
532
533config NFT_LOG
534	tristate "Netfilter nf_tables log module"
535	help
536	  This option adds the "log" expression that you can use to log
537	  packets matching some criteria.
538
539config NFT_LIMIT
540	tristate "Netfilter nf_tables limit module"
541	help
542	  This option adds the "limit" expression that you can use to
543	  ratelimit rule matchings.
544
545config NFT_MASQ
546	depends on NF_CONNTRACK
547	depends on NF_NAT
548	select NF_NAT_MASQUERADE
549	tristate "Netfilter nf_tables masquerade support"
550	help
551	  This option adds the "masquerade" expression that you can use
552	  to perform NAT in the masquerade flavour.
553
554config NFT_REDIR
555	depends on NF_CONNTRACK
556	depends on NF_NAT
557	tristate "Netfilter nf_tables redirect support"
558	select NF_NAT_REDIRECT
559	help
560	  This options adds the "redirect" expression that you can use
561	  to perform NAT in the redirect flavour.
562
563config NFT_NAT
564	depends on NF_CONNTRACK
565	select NF_NAT
566	depends on NF_TABLES_IPV4 || NF_TABLES_IPV6
567	tristate "Netfilter nf_tables nat module"
568	help
569	  This option adds the "nat" expression that you can use to perform
570	  typical Network Address Translation (NAT) packet transformations.
571
572config NFT_TUNNEL
573	tristate "Netfilter nf_tables tunnel module"
574	help
575	  This option adds the "tunnel" expression that you can use to set
576	  tunneling policies.
577
578config NFT_OBJREF
579	tristate "Netfilter nf_tables stateful object reference module"
580	help
581	  This option adds the "objref" expression that allows you to refer to
582	  stateful objects, such as counters and quotas.
583
584config NFT_QUEUE
585	depends on NETFILTER_NETLINK_QUEUE
586	tristate "Netfilter nf_tables queue module"
587	help
588	  This is required if you intend to use the userspace queueing
589	  infrastructure (also known as NFQUEUE) from nftables.
590
591config NFT_QUOTA
592	tristate "Netfilter nf_tables quota module"
593	help
594	  This option adds the "quota" expression that you can use to match
595	  enforce bytes quotas.
596
597config NFT_REJECT
598	default m if NETFILTER_ADVANCED=n
599	tristate "Netfilter nf_tables reject support"
600	depends on !NF_TABLES_INET || (IPV6!=m || m)
601	help
602	  This option adds the "reject" expression that you can use to
603	  explicitly deny and notify via TCP reset/ICMP informational errors
604	  unallowed traffic.
605
606config NFT_REJECT_INET
607	depends on NF_TABLES_INET
608	default NFT_REJECT
609	tristate
610
611config NFT_COMPAT
612	depends on NETFILTER_XTABLES
613	tristate "Netfilter x_tables over nf_tables module"
614	help
615	  This is required if you intend to use any of existing
616	  x_tables match/target extensions over the nf_tables
617	  framework.
618
619config NFT_HASH
620	tristate "Netfilter nf_tables hash module"
621	help
622	  This option adds the "hash" expression that you can use to perform
623	  a hash operation on registers.
624
625config NFT_FIB
626	tristate
627
628config NFT_FIB_INET
629	depends on NF_TABLES_INET
630	depends on NFT_FIB_IPV4
631	depends on NFT_FIB_IPV6
632	tristate "Netfilter nf_tables fib inet support"
633	help
634	  This option allows using the FIB expression from the inet table.
635	  The lookup will be delegated to the IPv4 or IPv6 FIB depending
636	  on the protocol of the packet.
637
638config NFT_XFRM
639	tristate "Netfilter nf_tables xfrm/IPSec security association matching"
640	depends on XFRM
641	help
642	  This option adds an expression that you can use to extract properties
643	  of a packets security association.
644
645config NFT_SOCKET
646	tristate "Netfilter nf_tables socket match support"
647	depends on IPV6 || IPV6=n
648	select NF_SOCKET_IPV4
649	select NF_SOCKET_IPV6 if NF_TABLES_IPV6
650	help
651	  This option allows matching for the presence or absence of a
652	  corresponding socket and its attributes.
653
654config NFT_OSF
655	tristate "Netfilter nf_tables passive OS fingerprint support"
656	depends on NETFILTER_ADVANCED
657	select NETFILTER_NETLINK_OSF
658	help
659	  This option allows matching packets from an specific OS.
660
661config NFT_TPROXY
662	tristate "Netfilter nf_tables tproxy support"
663	depends on IPV6 || IPV6=n
664	select NF_DEFRAG_IPV4
665	select NF_DEFRAG_IPV6 if NF_TABLES_IPV6
666	select NF_TPROXY_IPV4
667	select NF_TPROXY_IPV6 if NF_TABLES_IPV6
668	help
669	  This makes transparent proxy support available in nftables.
670
671config NFT_SYNPROXY
672	tristate "Netfilter nf_tables SYNPROXY expression support"
673	depends on NF_CONNTRACK && NETFILTER_ADVANCED
674	select NETFILTER_SYNPROXY
675	select SYN_COOKIES
676	help
677	  The SYNPROXY expression allows you to intercept TCP connections and
678	  establish them using syncookies before they are passed on to the
679	  server. This allows to avoid conntrack and server resource usage
680	  during SYN-flood attacks.
681
682if NF_TABLES_NETDEV
683
684config NF_DUP_NETDEV
685	tristate "Netfilter packet duplication support"
686	help
687	  This option enables the generic packet duplication infrastructure
688	  for Netfilter.
689
690config NFT_DUP_NETDEV
691	tristate "Netfilter nf_tables netdev packet duplication support"
692	select NF_DUP_NETDEV
693	help
694	  This option enables packet duplication for the "netdev" family.
695
696config NFT_FWD_NETDEV
697	tristate "Netfilter nf_tables netdev packet forwarding support"
698	select NF_DUP_NETDEV
699	help
700	  This option enables packet forwarding for the "netdev" family.
701
702config NFT_FIB_NETDEV
703	depends on NFT_FIB_IPV4
704	depends on NFT_FIB_IPV6
705	tristate "Netfilter nf_tables netdev fib lookups support"
706	help
707	  This option allows using the FIB expression from the netdev table.
708	  The lookup will be delegated to the IPv4 or IPv6 FIB depending
709	  on the protocol of the packet.
710
711config NFT_REJECT_NETDEV
712	depends on NFT_REJECT_IPV4
713	depends on NFT_REJECT_IPV6
714	tristate "Netfilter nf_tables netdev REJECT support"
715	help
716	  This option enables the REJECT support from the netdev table.
717	  The return packet generation will be delegated to the IPv4
718	  or IPv6 ICMP or TCP RST implementation depending on the
719	  protocol of the packet.
720
721endif # NF_TABLES_NETDEV
722
723endif # NF_TABLES
724
725config NF_FLOW_TABLE_INET
726	tristate "Netfilter flow table mixed IPv4/IPv6 module"
727	depends on NF_FLOW_TABLE
728	help
729	  This option adds the flow table mixed IPv4/IPv6 support.
730
731	  To compile it as a module, choose M here.
732
733config NF_FLOW_TABLE
734	tristate "Netfilter flow table module"
735	depends on NETFILTER_INGRESS
736	depends on NF_CONNTRACK
737	depends on NF_TABLES
738	help
739	  This option adds the flow table core infrastructure.
740
741	  To compile it as a module, choose M here.
742
743config NETFILTER_XTABLES
744	tristate "Netfilter Xtables support (required for ip_tables)"
745	default m if NETFILTER_ADVANCED=n
746	help
747	  This is required if you intend to use any of ip_tables,
748	  ip6_tables or arp_tables.
749
750if NETFILTER_XTABLES
751
752config NETFILTER_XTABLES_COMPAT
753	bool "Netfilter Xtables 32bit support"
754	depends on COMPAT
755	default y
756	help
757	   This option provides a translation layer to run 32bit arp,ip(6),ebtables
758	   binaries on 64bit kernels.
759
760	   If unsure, say N.
761
762comment "Xtables combined modules"
763
764config NETFILTER_XT_MARK
765	tristate 'nfmark target and match support'
766	default m if NETFILTER_ADVANCED=n
767	help
768	This option adds the "MARK" target and "mark" match.
769
770	Netfilter mark matching allows you to match packets based on the
771	"nfmark" value in the packet.
772	The target allows you to create rules in the "mangle" table which alter
773	the netfilter mark (nfmark) field associated with the packet.
774
775	Prior to routing, the nfmark can influence the routing method and can
776	also be used by other subsystems to change their behavior.
777
778config NETFILTER_XT_CONNMARK
779	tristate 'ctmark target and match support'
780	depends on NF_CONNTRACK
781	depends on NETFILTER_ADVANCED
782	select NF_CONNTRACK_MARK
783	help
784	This option adds the "CONNMARK" target and "connmark" match.
785
786	Netfilter allows you to store a mark value per connection (a.k.a.
787	ctmark), similarly to the packet mark (nfmark). Using this
788	target and match, you can set and match on this mark.
789
790config NETFILTER_XT_SET
791	tristate 'set target and match support'
792	depends on IP_SET
793	depends on NETFILTER_ADVANCED
794	help
795	  This option adds the "SET" target and "set" match.
796
797	  Using this target and match, you can add/delete and match
798	  elements in the sets created by ipset(8).
799
800	  To compile it as a module, choose M here.  If unsure, say N.
801
802# alphabetically ordered list of targets
803
804comment "Xtables targets"
805
806config NETFILTER_XT_TARGET_AUDIT
807	tristate "AUDIT target support"
808	depends on AUDIT
809	depends on NETFILTER_ADVANCED
810	help
811	  This option adds a 'AUDIT' target, which can be used to create
812	  audit records for packets dropped/accepted.
813
814	  To compileit as a module, choose M here. If unsure, say N.
815
816config NETFILTER_XT_TARGET_CHECKSUM
817	tristate "CHECKSUM target support"
818	depends on IP_NF_MANGLE || IP6_NF_MANGLE
819	depends on NETFILTER_ADVANCED
820	help
821	  This option adds a `CHECKSUM' target, which can be used in the iptables mangle
822	  table to work around buggy DHCP clients in virtualized environments.
823
824	  Some old DHCP clients drop packets because they are not aware
825	  that the checksum would normally be offloaded to hardware and
826	  thus should be considered valid.
827	  This target can be used to fill in the checksum using iptables
828	  when such packets are sent via a virtual network device.
829
830	  To compile it as a module, choose M here.  If unsure, say N.
831
832config NETFILTER_XT_TARGET_CLASSIFY
833	tristate '"CLASSIFY" target support'
834	depends on NETFILTER_ADVANCED
835	help
836	  This option adds a `CLASSIFY' target, which enables the user to set
837	  the priority of a packet. Some qdiscs can use this value for
838	  classification, among these are:
839
840	  atm, cbq, dsmark, pfifo_fast, htb, prio
841
842	  To compile it as a module, choose M here.  If unsure, say N.
843
844config NETFILTER_XT_TARGET_CONNMARK
845	tristate  '"CONNMARK" target support'
846	depends on NF_CONNTRACK
847	depends on NETFILTER_ADVANCED
848	select NETFILTER_XT_CONNMARK
849	help
850	This is a backwards-compat option for the user's convenience
851	(e.g. when running oldconfig). It selects
852	CONFIG_NETFILTER_XT_CONNMARK (combined connmark/CONNMARK module).
853
854config NETFILTER_XT_TARGET_CONNSECMARK
855	tristate '"CONNSECMARK" target support'
856	depends on NF_CONNTRACK && NF_CONNTRACK_SECMARK
857	default m if NETFILTER_ADVANCED=n
858	help
859	  The CONNSECMARK target copies security markings from packets
860	  to connections, and restores security markings from connections
861	  to packets (if the packets are not already marked).  This would
862	  normally be used in conjunction with the SECMARK target.
863
864	  To compile it as a module, choose M here.  If unsure, say N.
865
866config NETFILTER_XT_TARGET_CT
867	tristate '"CT" target support'
868	depends on NF_CONNTRACK
869	depends on IP_NF_RAW || IP6_NF_RAW
870	depends on NETFILTER_ADVANCED
871	help
872	  This options adds a `CT' target, which allows to specify initial
873	  connection tracking parameters like events to be delivered and
874	  the helper to be used.
875
876	  To compile it as a module, choose M here.  If unsure, say N.
877
878config NETFILTER_XT_TARGET_DSCP
879	tristate '"DSCP" and "TOS" target support'
880	depends on IP_NF_MANGLE || IP6_NF_MANGLE
881	depends on NETFILTER_ADVANCED
882	help
883	  This option adds a `DSCP' target, which allows you to manipulate
884	  the IPv4/IPv6 header DSCP field (differentiated services codepoint).
885
886	  The DSCP field can have any value between 0x0 and 0x3f inclusive.
887
888	  It also adds the "TOS" target, which allows you to create rules in
889	  the "mangle" table which alter the Type Of Service field of an IPv4
890	  or the Priority field of an IPv6 packet, prior to routing.
891
892	  To compile it as a module, choose M here.  If unsure, say N.
893
894config NETFILTER_XT_TARGET_HL
895	tristate '"HL" hoplimit target support'
896	depends on IP_NF_MANGLE || IP6_NF_MANGLE
897	depends on NETFILTER_ADVANCED
898	help
899	This option adds the "HL" (for IPv6) and "TTL" (for IPv4)
900	targets, which enable the user to change the
901	hoplimit/time-to-live value of the IP header.
902
903	While it is safe to decrement the hoplimit/TTL value, the
904	modules also allow to increment and set the hoplimit value of
905	the header to arbitrary values. This is EXTREMELY DANGEROUS
906	since you can easily create immortal packets that loop
907	forever on the network.
908
909config NETFILTER_XT_TARGET_HMARK
910	tristate '"HMARK" target support'
911	depends on IP6_NF_IPTABLES || IP6_NF_IPTABLES=n
912	depends on NETFILTER_ADVANCED
913	help
914	This option adds the "HMARK" target.
915
916	The target allows you to create rules in the "raw" and "mangle" tables
917	which set the skbuff mark by means of hash calculation within a given
918	range. The nfmark can influence the routing method and can also be used
919	by other subsystems to change their behaviour.
920
921	To compile it as a module, choose M here. If unsure, say N.
922
923config NETFILTER_XT_TARGET_IDLETIMER
924	tristate  "IDLETIMER target support"
925	depends on NETFILTER_ADVANCED
926	help
927
928	  This option adds the `IDLETIMER' target.  Each matching packet
929	  resets the timer associated with label specified when the rule is
930	  added.  When the timer expires, it triggers a sysfs notification.
931	  The remaining time for expiration can be read via sysfs.
932
933	  To compile it as a module, choose M here.  If unsure, say N.
934
935config NETFILTER_XT_TARGET_LED
936	tristate '"LED" target support'
937	depends on LEDS_CLASS && LEDS_TRIGGERS
938	depends on NETFILTER_ADVANCED
939	help
940	  This option adds a `LED' target, which allows you to blink LEDs in
941	  response to particular packets passing through your machine.
942
943	  This can be used to turn a spare LED into a network activity LED,
944	  which only flashes in response to FTP transfers, for example.  Or
945	  you could have an LED which lights up for a minute or two every time
946	  somebody connects to your machine via SSH.
947
948	  You will need support for the "led" class to make this work.
949
950	  To create an LED trigger for incoming SSH traffic:
951	    iptables -A INPUT -p tcp --dport 22 -j LED --led-trigger-id ssh --led-delay 1000
952
953	  Then attach the new trigger to an LED on your system:
954	    echo netfilter-ssh > /sys/class/leds/<ledname>/trigger
955
956	  For more information on the LEDs available on your system, see
957	  Documentation/leds/leds-class.rst
958
959config NETFILTER_XT_TARGET_LOG
960	tristate "LOG target support"
961	select NF_LOG_SYSLOG
962	select NF_LOG_IPV6 if IP6_NF_IPTABLES
963	default m if NETFILTER_ADVANCED=n
964	help
965	  This option adds a `LOG' target, which allows you to create rules in
966	  any iptables table which records the packet header to the syslog.
967
968	  To compile it as a module, choose M here.  If unsure, say N.
969
970config NETFILTER_XT_TARGET_MARK
971	tristate '"MARK" target support'
972	depends on NETFILTER_ADVANCED
973	select NETFILTER_XT_MARK
974	help
975	This is a backwards-compat option for the user's convenience
976	(e.g. when running oldconfig). It selects
977	CONFIG_NETFILTER_XT_MARK (combined mark/MARK module).
978
979config NETFILTER_XT_NAT
980	tristate '"SNAT and DNAT" targets support'
981	depends on NF_NAT
982	help
983	This option enables the SNAT and DNAT targets.
984
985	To compile it as a module, choose M here. If unsure, say N.
986
987config NETFILTER_XT_TARGET_NETMAP
988	tristate '"NETMAP" target support'
989	depends on NF_NAT
990	help
991	NETMAP is an implementation of static 1:1 NAT mapping of network
992	addresses. It maps the network address part, while keeping the host
993	address part intact.
994
995	To compile it as a module, choose M here. If unsure, say N.
996
997config NETFILTER_XT_TARGET_NFLOG
998	tristate '"NFLOG" target support'
999	default m if NETFILTER_ADVANCED=n
1000	select NETFILTER_NETLINK_LOG
1001	help
1002	  This option enables the NFLOG target, which allows to LOG
1003	  messages through nfnetlink_log.
1004
1005	  To compile it as a module, choose M here.  If unsure, say N.
1006
1007config NETFILTER_XT_TARGET_NFQUEUE
1008	tristate '"NFQUEUE" target Support'
1009	depends on NETFILTER_ADVANCED
1010	select NETFILTER_NETLINK_QUEUE
1011	help
1012	  This target replaced the old obsolete QUEUE target.
1013
1014	  As opposed to QUEUE, it supports 65535 different queues,
1015	  not just one.
1016
1017	  To compile it as a module, choose M here.  If unsure, say N.
1018
1019config NETFILTER_XT_TARGET_NOTRACK
1020	tristate  '"NOTRACK" target support (DEPRECATED)'
1021	depends on NF_CONNTRACK
1022	depends on IP_NF_RAW || IP6_NF_RAW
1023	depends on NETFILTER_ADVANCED
1024	select NETFILTER_XT_TARGET_CT
1025
1026config NETFILTER_XT_TARGET_RATEEST
1027	tristate '"RATEEST" target support'
1028	depends on NETFILTER_ADVANCED
1029	help
1030	  This option adds a `RATEEST' target, which allows to measure
1031	  rates similar to TC estimators. The `rateest' match can be
1032	  used to match on the measured rates.
1033
1034	  To compile it as a module, choose M here.  If unsure, say N.
1035
1036config NETFILTER_XT_TARGET_REDIRECT
1037	tristate "REDIRECT target support"
1038	depends on NF_NAT
1039	select NF_NAT_REDIRECT
1040	help
1041	REDIRECT is a special case of NAT: all incoming connections are
1042	mapped onto the incoming interface's address, causing the packets to
1043	come to the local machine instead of passing through. This is
1044	useful for transparent proxies.
1045
1046	To compile it as a module, choose M here. If unsure, say N.
1047
1048config NETFILTER_XT_TARGET_MASQUERADE
1049	tristate "MASQUERADE target support"
1050	depends on NF_NAT
1051	default m if NETFILTER_ADVANCED=n
1052	select NF_NAT_MASQUERADE
1053	help
1054	  Masquerading is a special case of NAT: all outgoing connections are
1055	  changed to seem to come from a particular interface's address, and
1056	  if the interface goes down, those connections are lost.  This is
1057	  only useful for dialup accounts with dynamic IP address (ie. your IP
1058	  address will be different on next dialup).
1059
1060	  To compile it as a module, choose M here.  If unsure, say N.
1061
1062config NETFILTER_XT_TARGET_TEE
1063	tristate '"TEE" - packet cloning to alternate destination'
1064	depends on NETFILTER_ADVANCED
1065	depends on IPV6 || IPV6=n
1066	depends on !NF_CONNTRACK || NF_CONNTRACK
1067	depends on IP6_NF_IPTABLES || !IP6_NF_IPTABLES
1068	select NF_DUP_IPV4
1069	select NF_DUP_IPV6 if IP6_NF_IPTABLES
1070	help
1071	This option adds a "TEE" target with which a packet can be cloned and
1072	this clone be rerouted to another nexthop.
1073
1074config NETFILTER_XT_TARGET_TPROXY
1075	tristate '"TPROXY" target transparent proxying support'
1076	depends on NETFILTER_XTABLES
1077	depends on NETFILTER_ADVANCED
1078	depends on IPV6 || IPV6=n
1079	depends on IP6_NF_IPTABLES || IP6_NF_IPTABLES=n
1080	depends on IP_NF_MANGLE
1081	select NF_DEFRAG_IPV4
1082	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES != n
1083	select NF_TPROXY_IPV4
1084	select NF_TPROXY_IPV6 if IP6_NF_IPTABLES
1085	help
1086	  This option adds a `TPROXY' target, which is somewhat similar to
1087	  REDIRECT.  It can only be used in the mangle table and is useful
1088	  to redirect traffic to a transparent proxy.  It does _not_ depend
1089	  on Netfilter connection tracking and NAT, unlike REDIRECT.
1090	  For it to work you will have to configure certain iptables rules
1091	  and use policy routing. For more information on how to set it up
1092	  see Documentation/networking/tproxy.rst.
1093
1094	  To compile it as a module, choose M here.  If unsure, say N.
1095
1096config NETFILTER_XT_TARGET_TRACE
1097	tristate  '"TRACE" target support'
1098	depends on IP_NF_RAW || IP6_NF_RAW
1099	depends on NETFILTER_ADVANCED
1100	help
1101	  The TRACE target allows you to mark packets so that the kernel
1102	  will log every rule which match the packets as those traverse
1103	  the tables, chains, rules.
1104
1105	  If you want to compile it as a module, say M here and read
1106	  <file:Documentation/kbuild/modules.rst>.  If unsure, say `N'.
1107
1108config NETFILTER_XT_TARGET_SECMARK
1109	tristate '"SECMARK" target support'
1110	depends on NETWORK_SECMARK
1111	default m if NETFILTER_ADVANCED=n
1112	help
1113	  The SECMARK target allows security marking of network
1114	  packets, for use with security subsystems.
1115
1116	  To compile it as a module, choose M here.  If unsure, say N.
1117
1118config NETFILTER_XT_TARGET_TCPMSS
1119	tristate '"TCPMSS" target support'
1120	depends on IPV6 || IPV6=n
1121	default m if NETFILTER_ADVANCED=n
1122	help
1123	  This option adds a `TCPMSS' target, which allows you to alter the
1124	  MSS value of TCP SYN packets, to control the maximum size for that
1125	  connection (usually limiting it to your outgoing interface's MTU
1126	  minus 40).
1127
1128	  This is used to overcome criminally braindead ISPs or servers which
1129	  block ICMP Fragmentation Needed packets.  The symptoms of this
1130	  problem are that everything works fine from your Linux
1131	  firewall/router, but machines behind it can never exchange large
1132	  packets:
1133	        1) Web browsers connect, then hang with no data received.
1134	        2) Small mail works fine, but large emails hang.
1135	        3) ssh works fine, but scp hangs after initial handshaking.
1136
1137	  Workaround: activate this option and add a rule to your firewall
1138	  configuration like:
1139
1140	  iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
1141	                 -j TCPMSS --clamp-mss-to-pmtu
1142
1143	  To compile it as a module, choose M here.  If unsure, say N.
1144
1145config NETFILTER_XT_TARGET_TCPOPTSTRIP
1146	tristate '"TCPOPTSTRIP" target support'
1147	depends on IP_NF_MANGLE || IP6_NF_MANGLE
1148	depends on NETFILTER_ADVANCED
1149	help
1150	  This option adds a "TCPOPTSTRIP" target, which allows you to strip
1151	  TCP options from TCP packets.
1152
1153# alphabetically ordered list of matches
1154
1155comment "Xtables matches"
1156
1157config NETFILTER_XT_MATCH_ADDRTYPE
1158	tristate '"addrtype" address type match support'
1159	default m if NETFILTER_ADVANCED=n
1160	help
1161	  This option allows you to match what routing thinks of an address,
1162	  eg. UNICAST, LOCAL, BROADCAST, ...
1163
1164	  If you want to compile it as a module, say M here and read
1165	  <file:Documentation/kbuild/modules.rst>.  If unsure, say `N'.
1166
1167config NETFILTER_XT_MATCH_BPF
1168	tristate '"bpf" match support'
1169	depends on NETFILTER_ADVANCED
1170	help
1171	  BPF matching applies a linux socket filter to each packet and
1172	  accepts those for which the filter returns non-zero.
1173
1174	  To compile it as a module, choose M here.  If unsure, say N.
1175
1176config NETFILTER_XT_MATCH_CGROUP
1177	tristate '"control group" match support'
1178	depends on NETFILTER_ADVANCED
1179	depends on CGROUPS
1180	select CGROUP_NET_CLASSID
1181	help
1182	Socket/process control group matching allows you to match locally
1183	generated packets based on which net_cls control group processes
1184	belong to.
1185
1186config NETFILTER_XT_MATCH_CLUSTER
1187	tristate '"cluster" match support'
1188	depends on NF_CONNTRACK
1189	depends on NETFILTER_ADVANCED
1190	help
1191	  This option allows you to build work-load-sharing clusters of
1192	  network servers/stateful firewalls without having a dedicated
1193	  load-balancing router/server/switch. Basically, this match returns
1194	  true when the packet must be handled by this cluster node. Thus,
1195	  all nodes see all packets and this match decides which node handles
1196	  what packets. The work-load sharing algorithm is based on source
1197	  address hashing.
1198
1199	  If you say Y or M here, try `iptables -m cluster --help` for
1200	  more information.
1201
1202config NETFILTER_XT_MATCH_COMMENT
1203	tristate  '"comment" match support'
1204	depends on NETFILTER_ADVANCED
1205	help
1206	  This option adds a `comment' dummy-match, which allows you to put
1207	  comments in your iptables ruleset.
1208
1209	  If you want to compile it as a module, say M here and read
1210	  <file:Documentation/kbuild/modules.rst>.  If unsure, say `N'.
1211
1212config NETFILTER_XT_MATCH_CONNBYTES
1213	tristate  '"connbytes" per-connection counter match support'
1214	depends on NF_CONNTRACK
1215	depends on NETFILTER_ADVANCED
1216	help
1217	  This option adds a `connbytes' match, which allows you to match the
1218	  number of bytes and/or packets for each direction within a connection.
1219
1220	  If you want to compile it as a module, say M here and read
1221	  <file:Documentation/kbuild/modules.rst>.  If unsure, say `N'.
1222
1223config NETFILTER_XT_MATCH_CONNLABEL
1224	tristate '"connlabel" match support'
1225	select NF_CONNTRACK_LABELS
1226	depends on NF_CONNTRACK
1227	depends on NETFILTER_ADVANCED
1228	help
1229	  This match allows you to test and assign userspace-defined labels names
1230	  to a connection.  The kernel only stores bit values - mapping
1231	  names to bits is done by userspace.
1232
1233	  Unlike connmark, more than 32 flag bits may be assigned to a
1234	  connection simultaneously.
1235
1236config NETFILTER_XT_MATCH_CONNLIMIT
1237	tristate '"connlimit" match support'
1238	depends on NF_CONNTRACK
1239	depends on NETFILTER_ADVANCED
1240	select NETFILTER_CONNCOUNT
1241	help
1242	  This match allows you to match against the number of parallel
1243	  connections to a server per client IP address (or address block).
1244
1245config NETFILTER_XT_MATCH_CONNMARK
1246	tristate  '"connmark" connection mark match support'
1247	depends on NF_CONNTRACK
1248	depends on NETFILTER_ADVANCED
1249	select NETFILTER_XT_CONNMARK
1250	help
1251	This is a backwards-compat option for the user's convenience
1252	(e.g. when running oldconfig). It selects
1253	CONFIG_NETFILTER_XT_CONNMARK (combined connmark/CONNMARK module).
1254
1255config NETFILTER_XT_MATCH_CONNTRACK
1256	tristate '"conntrack" connection tracking match support'
1257	depends on NF_CONNTRACK
1258	default m if NETFILTER_ADVANCED=n
1259	help
1260	  This is a general conntrack match module, a superset of the state match.
1261
1262	  It allows matching on additional conntrack information, which is
1263	  useful in complex configurations, such as NAT gateways with multiple
1264	  internet links or tunnels.
1265
1266	  To compile it as a module, choose M here.  If unsure, say N.
1267
1268config NETFILTER_XT_MATCH_CPU
1269	tristate '"cpu" match support'
1270	depends on NETFILTER_ADVANCED
1271	help
1272	  CPU matching allows you to match packets based on the CPU
1273	  currently handling the packet.
1274
1275	  To compile it as a module, choose M here.  If unsure, say N.
1276
1277config NETFILTER_XT_MATCH_DCCP
1278	tristate '"dccp" protocol match support'
1279	depends on NETFILTER_ADVANCED
1280	default IP_DCCP
1281	help
1282	  With this option enabled, you will be able to use the iptables
1283	  `dccp' match in order to match on DCCP source/destination ports
1284	  and DCCP flags.
1285
1286	  If you want to compile it as a module, say M here and read
1287	  <file:Documentation/kbuild/modules.rst>.  If unsure, say `N'.
1288
1289config NETFILTER_XT_MATCH_DEVGROUP
1290	tristate '"devgroup" match support'
1291	depends on NETFILTER_ADVANCED
1292	help
1293	  This options adds a `devgroup' match, which allows to match on the
1294	  device group a network device is assigned to.
1295
1296	  To compile it as a module, choose M here.  If unsure, say N.
1297
1298config NETFILTER_XT_MATCH_DSCP
1299	tristate '"dscp" and "tos" match support'
1300	depends on NETFILTER_ADVANCED
1301	help
1302	  This option adds a `DSCP' match, which allows you to match against
1303	  the IPv4/IPv6 header DSCP field (differentiated services codepoint).
1304
1305	  The DSCP field can have any value between 0x0 and 0x3f inclusive.
1306
1307	  It will also add a "tos" match, which allows you to match packets
1308	  based on the Type Of Service fields of the IPv4 packet (which share
1309	  the same bits as DSCP).
1310
1311	  To compile it as a module, choose M here.  If unsure, say N.
1312
1313config NETFILTER_XT_MATCH_ECN
1314	tristate '"ecn" match support'
1315	depends on NETFILTER_ADVANCED
1316	help
1317	This option adds an "ECN" match, which allows you to match against
1318	the IPv4 and TCP header ECN fields.
1319
1320	To compile it as a module, choose M here. If unsure, say N.
1321
1322config NETFILTER_XT_MATCH_ESP
1323	tristate '"esp" match support'
1324	depends on NETFILTER_ADVANCED
1325	help
1326	  This match extension allows you to match a range of SPIs
1327	  inside ESP header of IPSec packets.
1328
1329	  To compile it as a module, choose M here.  If unsure, say N.
1330
1331config NETFILTER_XT_MATCH_HASHLIMIT
1332	tristate '"hashlimit" match support'
1333	depends on IP6_NF_IPTABLES || IP6_NF_IPTABLES=n
1334	depends on NETFILTER_ADVANCED
1335	help
1336	  This option adds a `hashlimit' match.
1337
1338	  As opposed to `limit', this match dynamically creates a hash table
1339	  of limit buckets, based on your selection of source/destination
1340	  addresses and/or ports.
1341
1342	  It enables you to express policies like `10kpps for any given
1343	  destination address' or `500pps from any given source address'
1344	  with a single rule.
1345
1346config NETFILTER_XT_MATCH_HELPER
1347	tristate '"helper" match support'
1348	depends on NF_CONNTRACK
1349	depends on NETFILTER_ADVANCED
1350	help
1351	  Helper matching allows you to match packets in dynamic connections
1352	  tracked by a conntrack-helper, ie. nf_conntrack_ftp
1353
1354	  To compile it as a module, choose M here.  If unsure, say Y.
1355
1356config NETFILTER_XT_MATCH_HL
1357	tristate '"hl" hoplimit/TTL match support'
1358	depends on NETFILTER_ADVANCED
1359	help
1360	HL matching allows you to match packets based on the hoplimit
1361	in the IPv6 header, or the time-to-live field in the IPv4
1362	header of the packet.
1363
1364config NETFILTER_XT_MATCH_IPCOMP
1365	tristate '"ipcomp" match support'
1366	depends on NETFILTER_ADVANCED
1367	help
1368	  This match extension allows you to match a range of CPIs(16 bits)
1369	  inside IPComp header of IPSec packets.
1370
1371	  To compile it as a module, choose M here.  If unsure, say N.
1372
1373config NETFILTER_XT_MATCH_IPRANGE
1374	tristate '"iprange" address range match support'
1375	depends on NETFILTER_ADVANCED
1376	help
1377	This option adds a "iprange" match, which allows you to match based on
1378	an IP address range. (Normal iptables only matches on single addresses
1379	with an optional mask.)
1380
1381	If unsure, say M.
1382
1383config NETFILTER_XT_MATCH_IPVS
1384	tristate '"ipvs" match support'
1385	depends on IP_VS
1386	depends on NETFILTER_ADVANCED
1387	depends on NF_CONNTRACK
1388	help
1389	  This option allows you to match against IPVS properties of a packet.
1390
1391	  If unsure, say N.
1392
1393config NETFILTER_XT_MATCH_L2TP
1394	tristate '"l2tp" match support'
1395	depends on NETFILTER_ADVANCED
1396	default L2TP
1397	help
1398	This option adds an "L2TP" match, which allows you to match against
1399	L2TP protocol header fields.
1400
1401	To compile it as a module, choose M here. If unsure, say N.
1402
1403config NETFILTER_XT_MATCH_LENGTH
1404	tristate '"length" match support'
1405	depends on NETFILTER_ADVANCED
1406	help
1407	  This option allows you to match the length of a packet against a
1408	  specific value or range of values.
1409
1410	  To compile it as a module, choose M here.  If unsure, say N.
1411
1412config NETFILTER_XT_MATCH_LIMIT
1413	tristate '"limit" match support'
1414	depends on NETFILTER_ADVANCED
1415	help
1416	  limit matching allows you to control the rate at which a rule can be
1417	  matched: mainly useful in combination with the LOG target ("LOG
1418	  target support", below) and to avoid some Denial of Service attacks.
1419
1420	  To compile it as a module, choose M here.  If unsure, say N.
1421
1422config NETFILTER_XT_MATCH_MAC
1423	tristate '"mac" address match support'
1424	depends on NETFILTER_ADVANCED
1425	help
1426	  MAC matching allows you to match packets based on the source
1427	  Ethernet address of the packet.
1428
1429	  To compile it as a module, choose M here.  If unsure, say N.
1430
1431config NETFILTER_XT_MATCH_MARK
1432	tristate '"mark" match support'
1433	depends on NETFILTER_ADVANCED
1434	select NETFILTER_XT_MARK
1435	help
1436	This is a backwards-compat option for the user's convenience
1437	(e.g. when running oldconfig). It selects
1438	CONFIG_NETFILTER_XT_MARK (combined mark/MARK module).
1439
1440config NETFILTER_XT_MATCH_MULTIPORT
1441	tristate '"multiport" Multiple port match support'
1442	depends on NETFILTER_ADVANCED
1443	help
1444	  Multiport matching allows you to match TCP or UDP packets based on
1445	  a series of source or destination ports: normally a rule can only
1446	  match a single range of ports.
1447
1448	  To compile it as a module, choose M here.  If unsure, say N.
1449
1450config NETFILTER_XT_MATCH_NFACCT
1451	tristate '"nfacct" match support'
1452	depends on NETFILTER_ADVANCED
1453	select NETFILTER_NETLINK_ACCT
1454	help
1455	  This option allows you to use the extended accounting through
1456	  nfnetlink_acct.
1457
1458	  To compile it as a module, choose M here.  If unsure, say N.
1459
1460config NETFILTER_XT_MATCH_OSF
1461	tristate '"osf" Passive OS fingerprint match'
1462	depends on NETFILTER_ADVANCED
1463	select NETFILTER_NETLINK_OSF
1464	help
1465	  This option selects the Passive OS Fingerprinting match module
1466	  that allows to passively match the remote operating system by
1467	  analyzing incoming TCP SYN packets.
1468
1469	  Rules and loading software can be downloaded from
1470	  http://www.ioremap.net/projects/osf
1471
1472	  To compile it as a module, choose M here.  If unsure, say N.
1473
1474config NETFILTER_XT_MATCH_OWNER
1475	tristate '"owner" match support'
1476	depends on NETFILTER_ADVANCED
1477	help
1478	Socket owner matching allows you to match locally-generated packets
1479	based on who created the socket: the user or group. It is also
1480	possible to check whether a socket actually exists.
1481
1482config NETFILTER_XT_MATCH_POLICY
1483	tristate 'IPsec "policy" match support'
1484	depends on XFRM
1485	default m if NETFILTER_ADVANCED=n
1486	help
1487	  Policy matching allows you to match packets based on the
1488	  IPsec policy that was used during decapsulation/will
1489	  be used during encapsulation.
1490
1491	  To compile it as a module, choose M here.  If unsure, say N.
1492
1493config NETFILTER_XT_MATCH_PHYSDEV
1494	tristate '"physdev" match support'
1495	depends on BRIDGE && BRIDGE_NETFILTER
1496	depends on NETFILTER_ADVANCED
1497	help
1498	  Physdev packet matching matches against the physical bridge ports
1499	  the IP packet arrived on or will leave by.
1500
1501	  To compile it as a module, choose M here.  If unsure, say N.
1502
1503config NETFILTER_XT_MATCH_PKTTYPE
1504	tristate '"pkttype" packet type match support'
1505	depends on NETFILTER_ADVANCED
1506	help
1507	  Packet type matching allows you to match a packet by
1508	  its "class", eg. BROADCAST, MULTICAST, ...
1509
1510	  Typical usage:
1511	  iptables -A INPUT -m pkttype --pkt-type broadcast -j LOG
1512
1513	  To compile it as a module, choose M here.  If unsure, say N.
1514
1515config NETFILTER_XT_MATCH_QUOTA
1516	tristate '"quota" match support'
1517	depends on NETFILTER_ADVANCED
1518	help
1519	  This option adds a `quota' match, which allows to match on a
1520	  byte counter.
1521
1522	  If you want to compile it as a module, say M here and read
1523	  <file:Documentation/kbuild/modules.rst>.  If unsure, say `N'.
1524
1525config NETFILTER_XT_MATCH_RATEEST
1526	tristate '"rateest" match support'
1527	depends on NETFILTER_ADVANCED
1528	select NETFILTER_XT_TARGET_RATEEST
1529	help
1530	  This option adds a `rateest' match, which allows to match on the
1531	  rate estimated by the RATEEST target.
1532
1533	  To compile it as a module, choose M here.  If unsure, say N.
1534
1535config NETFILTER_XT_MATCH_REALM
1536	tristate  '"realm" match support'
1537	depends on NETFILTER_ADVANCED
1538	select IP_ROUTE_CLASSID
1539	help
1540	  This option adds a `realm' match, which allows you to use the realm
1541	  key from the routing subsystem inside iptables.
1542
1543	  This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option
1544	  in tc world.
1545
1546	  If you want to compile it as a module, say M here and read
1547	  <file:Documentation/kbuild/modules.rst>.  If unsure, say `N'.
1548
1549config NETFILTER_XT_MATCH_RECENT
1550	tristate '"recent" match support'
1551	depends on NETFILTER_ADVANCED
1552	help
1553	This match is used for creating one or many lists of recently
1554	used addresses and then matching against that/those list(s).
1555
1556	Short options are available by using 'iptables -m recent -h'
1557	Official Website: <http://snowman.net/projects/ipt_recent/>
1558
1559config NETFILTER_XT_MATCH_SCTP
1560	tristate  '"sctp" protocol match support'
1561	depends on NETFILTER_ADVANCED
1562	default IP_SCTP
1563	help
1564	  With this option enabled, you will be able to use the
1565	  `sctp' match in order to match on SCTP source/destination ports
1566	  and SCTP chunk types.
1567
1568	  If you want to compile it as a module, say M here and read
1569	  <file:Documentation/kbuild/modules.rst>.  If unsure, say `N'.
1570
1571config NETFILTER_XT_MATCH_SOCKET
1572	tristate '"socket" match support'
1573	depends on NETFILTER_XTABLES
1574	depends on NETFILTER_ADVANCED
1575	depends on IPV6 || IPV6=n
1576	depends on IP6_NF_IPTABLES || IP6_NF_IPTABLES=n
1577	select NF_SOCKET_IPV4
1578	select NF_SOCKET_IPV6 if IP6_NF_IPTABLES
1579	select NF_DEFRAG_IPV4
1580	select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES != n
1581	help
1582	  This option adds a `socket' match, which can be used to match
1583	  packets for which a TCP or UDP socket lookup finds a valid socket.
1584	  It can be used in combination with the MARK target and policy
1585	  routing to implement full featured non-locally bound sockets.
1586
1587	  To compile it as a module, choose M here.  If unsure, say N.
1588
1589config NETFILTER_XT_MATCH_STATE
1590	tristate '"state" match support'
1591	depends on NF_CONNTRACK
1592	default m if NETFILTER_ADVANCED=n
1593	help
1594	  Connection state matching allows you to match packets based on their
1595	  relationship to a tracked connection (ie. previous packets).  This
1596	  is a powerful tool for packet classification.
1597
1598	  To compile it as a module, choose M here.  If unsure, say N.
1599
1600config NETFILTER_XT_MATCH_STATISTIC
1601	tristate '"statistic" match support'
1602	depends on NETFILTER_ADVANCED
1603	help
1604	  This option adds a `statistic' match, which allows you to match
1605	  on packets periodically or randomly with a given percentage.
1606
1607	  To compile it as a module, choose M here.  If unsure, say N.
1608
1609config NETFILTER_XT_MATCH_STRING
1610	tristate  '"string" match support'
1611	depends on NETFILTER_ADVANCED
1612	select TEXTSEARCH
1613	select TEXTSEARCH_KMP
1614	select TEXTSEARCH_BM
1615	select TEXTSEARCH_FSM
1616	help
1617	  This option adds a `string' match, which allows you to look for
1618	  pattern matchings in packets.
1619
1620	  To compile it as a module, choose M here.  If unsure, say N.
1621
1622config NETFILTER_XT_MATCH_TCPMSS
1623	tristate '"tcpmss" match support'
1624	depends on NETFILTER_ADVANCED
1625	help
1626	  This option adds a `tcpmss' match, which allows you to examine the
1627	  MSS value of TCP SYN packets, which control the maximum packet size
1628	  for that connection.
1629
1630	  To compile it as a module, choose M here.  If unsure, say N.
1631
1632config NETFILTER_XT_MATCH_TIME
1633	tristate '"time" match support'
1634	depends on NETFILTER_ADVANCED
1635	help
1636	  This option adds a "time" match, which allows you to match based on
1637	  the packet arrival time (at the machine which netfilter is running)
1638	  on) or departure time/date (for locally generated packets).
1639
1640	  If you say Y here, try `iptables -m time --help` for
1641	  more information.
1642
1643	  If you want to compile it as a module, say M here.
1644	  If unsure, say N.
1645
1646config NETFILTER_XT_MATCH_U32
1647	tristate '"u32" match support'
1648	depends on NETFILTER_ADVANCED
1649	help
1650	  u32 allows you to extract quantities of up to 4 bytes from a packet,
1651	  AND them with specified masks, shift them by specified amounts and
1652	  test whether the results are in any of a set of specified ranges.
1653	  The specification of what to extract is general enough to skip over
1654	  headers with lengths stored in the packet, as in IP or TCP header
1655	  lengths.
1656
1657	  Details and examples are in the kernel module source.
1658
1659endif # NETFILTER_XTABLES
1660
1661endmenu
1662
1663source "net/netfilter/ipset/Kconfig"
1664
1665source "net/netfilter/ipvs/Kconfig"
1666