2 # IP netfilter configuration
5 menu "IP: Netfilter Configuration"
6 depends on INET && NETFILTER
8 config NF_CONNTRACK_IPV4
9 tristate "IPv4 connection tracking support (required for NAT) (EXPERIMENTAL)"
10 depends on EXPERIMENTAL && NF_CONNTRACK
12 Connection tracking keeps a record of what packets have passed
13 through your machine, in order to figure out how they are related
16 This is IPv4 support on Layer 3 independent connection tracking.
17 Layer 3 independent connection tracking is experimental scheme
18 which generalize ip_conntrack to support other layer 3 protocols.
20 To compile it as a module, choose M here. If unsure, say N.
22 config NF_CONNTRACK_PROC_COMPAT
23 bool "proc/sysctl compatibility with old connection tracking"
24 depends on NF_CONNTRACK_IPV4
27 This option enables /proc and sysctl compatibility with the old
28 layer 3 dependant connection tracking. This is needed to keep
29 old programs that have not been adapted to the new names working.
33 # connection tracking, helpers and protocols
35 bool "Connection tracking flow accounting"
36 depends on IP_NF_CONNTRACK
38 If this option is enabled, the connection tracking code will
39 keep per-flow packet and byte counters.
41 Those counters can be used for flow-based accounting or the
46 config IP_NF_CONNTRACK_MARK
47 bool 'Connection mark tracking support'
48 depends on IP_NF_CONNTRACK
50 This option enables support for connection marks, used by the
51 `CONNMARK' target and `connmark' match. Similar to the mark value
52 of packets, but this mark value is kept in the conntrack session
53 instead of the individual packets.
55 config IP_NF_CONNTRACK_SECMARK
56 bool 'Connection tracking security mark support'
57 depends on IP_NF_CONNTRACK && NETWORK_SECMARK
59 This option enables security markings to be applied to
60 connections. Typically they are copied to connections from
61 packets using the CONNSECMARK target and copied back from
62 connections to packets with the same target, with the packets
63 being originally labeled via SECMARK.
67 config IP_NF_CONNTRACK_EVENTS
68 bool "Connection tracking events (EXPERIMENTAL)"
69 depends on EXPERIMENTAL && IP_NF_CONNTRACK
71 If this option is enabled, the connection tracking code will
72 provide a notifier chain that can be used by other kernel code
73 to get notified about changes in the connection tracking state.
77 config IP_NF_CONNTRACK_NETLINK
78 tristate 'Connection tracking netlink interface (EXPERIMENTAL)'
79 depends on EXPERIMENTAL && IP_NF_CONNTRACK && NETFILTER_NETLINK
80 depends on IP_NF_CONNTRACK!=y || NETFILTER_NETLINK!=m
81 depends on IP_NF_NAT=n || IP_NF_NAT
83 This option enables support for a netlink-based userspace interface
86 config IP_NF_CT_PROTO_SCTP
87 tristate 'SCTP protocol connection tracking support (EXPERIMENTAL)'
88 depends on IP_NF_CONNTRACK && EXPERIMENTAL
90 With this option enabled, the connection tracking code will
91 be able to do state tracking on SCTP connections.
93 If you want to compile it as a module, say M here and read
94 <file:Documentation/modules.txt>. If unsure, say `N'.
97 tristate "FTP protocol support"
98 depends on IP_NF_CONNTRACK
100 Tracking FTP connections is problematic: special helpers are
101 required for tracking them, and doing masquerading and other forms
102 of Network Address Translation on them.
104 To compile it as a module, choose M here. If unsure, say Y.
107 tristate "IRC protocol support"
108 depends on IP_NF_CONNTRACK
110 There is a commonly-used extension to IRC called
111 Direct Client-to-Client Protocol (DCC). This enables users to send
112 files to each other, and also chat to each other without the need
113 of a server. DCC Sending is used anywhere you send files over IRC,
114 and DCC Chat is most commonly used by Eggdrop bots. If you are
115 using NAT, this extension will enable you to send files and initiate
116 chats. Note that you do NOT need this extension to get files or
117 have others initiate chats, or everything else in IRC.
119 To compile it as a module, choose M here. If unsure, say Y.
121 config IP_NF_NETBIOS_NS
122 tristate "NetBIOS name service protocol support (EXPERIMENTAL)"
123 depends on IP_NF_CONNTRACK && EXPERIMENTAL
125 NetBIOS name service requests are sent as broadcast messages from an
126 unprivileged port and responded to with unicast messages to the
127 same port. This make them hard to firewall properly because connection
128 tracking doesn't deal with broadcasts. This helper tracks locally
129 originating NetBIOS name service requests and the corresponding
130 responses. It relies on correct IP address configuration, specifically
131 netmask and broadcast address. When properly configured, the output
132 of "ip address show" should look similar to this:
134 $ ip -4 address show eth0
135 4: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
136 inet 172.16.2.252/24 brd 172.16.2.255 scope global eth0
138 To compile it as a module, choose M here. If unsure, say N.
141 tristate "TFTP protocol support"
142 depends on IP_NF_CONNTRACK
144 TFTP connection tracking helper, this is required depending
145 on how restrictive your ruleset is.
146 If you are using a tftp client behind -j SNAT or -j MASQUERADING
149 To compile it as a module, choose M here. If unsure, say Y.
152 tristate "Amanda backup protocol support"
153 depends on IP_NF_CONNTRACK
155 select TEXTSEARCH_KMP
157 If you are running the Amanda backup package <http://www.amanda.org/>
158 on this machine or machines that will be MASQUERADED through this
159 machine, then you may want to enable this feature. This allows the
160 connection tracking and natting code to allow the sub-channels that
161 Amanda requires for communication of the backup data, messages and
164 To compile it as a module, choose M here. If unsure, say Y.
167 tristate 'PPTP protocol support'
168 depends on IP_NF_CONNTRACK
170 This module adds support for PPTP (Point to Point Tunnelling
171 Protocol, RFC2637) connection tracking and NAT.
173 If you are running PPTP sessions over a stateful firewall or NAT
174 box, you may want to enable this feature.
176 Please note that not all PPTP modes of operation are supported yet.
177 For more info, read top of the file
178 net/ipv4/netfilter/ip_conntrack_pptp.c
180 If you want to compile it as a module, say M here and read
181 Documentation/modules.txt. If unsure, say `N'.
184 tristate 'H.323 protocol support (EXPERIMENTAL)'
185 depends on IP_NF_CONNTRACK && EXPERIMENTAL
187 H.323 is a VoIP signalling protocol from ITU-T. As one of the most
188 important VoIP protocols, it is widely used by voice hardware and
189 software including voice gateways, IP phones, Netmeeting, OpenPhone,
192 With this module you can support H.323 on a connection tracking/NAT
195 This module supports RAS, Fast Start, H.245 Tunnelling, Call
196 Forwarding, RTP/RTCP and T.120 based audio, video, fax, chat,
197 whiteboard, file transfer, etc. For more information, please
198 visit http://nath323.sourceforge.net/.
200 If you want to compile it as a module, say 'M' here and read
201 Documentation/modules.txt. If unsure, say 'N'.
204 tristate "SIP protocol support (EXPERIMENTAL)"
205 depends on IP_NF_CONNTRACK && EXPERIMENTAL
207 SIP is an application-layer control protocol that can establish,
208 modify, and terminate multimedia sessions (conferences) such as
209 Internet telephony calls. With the ip_conntrack_sip and
210 the ip_nat_sip modules you can support the protocol on a connection
211 tracking/NATing firewall.
213 To compile it as a module, choose M here. If unsure, say Y.
216 tristate "IP Userspace queueing via NETLINK (OBSOLETE)"
218 Netfilter has the ability to queue packets to user space: the
219 netlink device can be used to access them using this driver.
221 This option enables the old IPv4-only "ip_queue" implementation
222 which has been obsoleted by the new "nfnetlink_queue" code (see
223 CONFIG_NETFILTER_NETLINK_QUEUE).
225 To compile it as a module, choose M here. If unsure, say N.
227 config IP_NF_IPTABLES
228 tristate "IP tables support (required for filtering/masq/NAT)"
229 depends on NETFILTER_XTABLES
231 iptables is a general, extensible packet identification framework.
232 The packet filtering and full NAT (masquerading, port forwarding,
233 etc) subsystems now use this: say `Y' or `M' here if you want to use
236 To compile it as a module, choose M here. If unsure, say N.
239 config IP_NF_MATCH_IPRANGE
240 tristate "IP range match support"
241 depends on IP_NF_IPTABLES
243 This option makes possible to match IP addresses against IP address
246 To compile it as a module, choose M here. If unsure, say N.
248 config IP_NF_MATCH_TOS
249 tristate "TOS match support"
250 depends on IP_NF_IPTABLES
252 TOS matching allows you to match packets based on the Type Of
253 Service fields of the IP packet.
255 To compile it as a module, choose M here. If unsure, say N.
257 config IP_NF_MATCH_RECENT
258 tristate "recent match support"
259 depends on IP_NF_IPTABLES
261 This match is used for creating one or many lists of recently
262 used addresses and then matching against that/those list(s).
264 Short options are available by using 'iptables -m recent -h'
265 Official Website: <http://snowman.net/projects/ipt_recent/>
267 To compile it as a module, choose M here. If unsure, say N.
269 config IP_NF_MATCH_ECN
270 tristate "ECN match support"
271 depends on IP_NF_IPTABLES
273 This option adds a `ECN' match, which allows you to match against
274 the IPv4 and TCP header ECN fields.
276 To compile it as a module, choose M here. If unsure, say N.
278 config IP_NF_MATCH_AH
279 tristate "AH match support"
280 depends on IP_NF_IPTABLES
282 This match extension allows you to match a range of SPIs
283 inside AH header of IPSec packets.
285 To compile it as a module, choose M here. If unsure, say N.
287 config IP_NF_MATCH_TTL
288 tristate "TTL match support"
289 depends on IP_NF_IPTABLES
291 This adds CONFIG_IP_NF_MATCH_TTL option, which enabled the user
292 to match packets by their TTL value.
294 To compile it as a module, choose M here. If unsure, say N.
296 config IP_NF_MATCH_OWNER
297 tristate "Owner match support"
298 depends on IP_NF_IPTABLES
300 Packet owner matching allows you to match locally-generated packets
301 based on who created them: the user, group, process or session.
303 To compile it as a module, choose M here. If unsure, say N.
305 config IP_NF_MATCH_ADDRTYPE
306 tristate 'address type match support'
307 depends on IP_NF_IPTABLES
309 This option allows you to match what routing thinks of an address,
310 eg. UNICAST, LOCAL, BROADCAST, ...
312 If you want to compile it as a module, say M here and read
313 <file:Documentation/modules.txt>. If unsure, say `N'.
315 # `filter', generic and specific targets
317 tristate "Packet filtering"
318 depends on IP_NF_IPTABLES
320 Packet filtering defines a table `filter', which has a series of
321 rules for simple packet filtering at local input, forwarding and
322 local output. See the man page for iptables(8).
324 To compile it as a module, choose M here. If unsure, say N.
326 config IP_NF_TARGET_REJECT
327 tristate "REJECT target support"
328 depends on IP_NF_FILTER
330 The REJECT target allows a filtering rule to specify that an ICMP
331 error should be issued in response to an incoming packet, rather
332 than silently being dropped.
334 To compile it as a module, choose M here. If unsure, say N.
336 config IP_NF_TARGET_LOG
337 tristate "LOG target support"
338 depends on IP_NF_IPTABLES
340 This option adds a `LOG' target, which allows you to create rules in
341 any iptables table which records the packet header to the syslog.
343 To compile it as a module, choose M here. If unsure, say N.
345 config IP_NF_TARGET_ULOG
346 tristate "ULOG target support"
347 depends on IP_NF_IPTABLES
350 This option enables the old IPv4-only "ipt_ULOG" implementation
351 which has been obsoleted by the new "nfnetlink_log" code (see
352 CONFIG_NETFILTER_NETLINK_LOG).
354 This option adds a `ULOG' target, which allows you to create rules in
355 any iptables table. The packet is passed to a userspace logging
356 daemon using netlink multicast sockets; unlike the LOG target
357 which can only be viewed through syslog.
359 The appropriate userspace logging daemon (ulogd) may be obtained from
360 <http://www.gnumonks.org/projects/ulogd/>
362 To compile it as a module, choose M here. If unsure, say N.
364 config IP_NF_TARGET_TCPMSS
365 tristate "TCPMSS target support"
366 depends on IP_NF_IPTABLES
368 This option adds a `TCPMSS' target, which allows you to alter the
369 MSS value of TCP SYN packets, to control the maximum size for that
370 connection (usually limiting it to your outgoing interface's MTU
373 This is used to overcome criminally braindead ISPs or servers which
374 block ICMP Fragmentation Needed packets. The symptoms of this
375 problem are that everything works fine from your Linux
376 firewall/router, but machines behind it can never exchange large
378 1) Web browsers connect, then hang with no data received.
379 2) Small mail works fine, but large emails hang.
380 3) ssh works fine, but scp hangs after initial handshaking.
382 Workaround: activate this option and add a rule to your firewall
385 iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
386 -j TCPMSS --clamp-mss-to-pmtu
388 To compile it as a module, choose M here. If unsure, say N.
390 # NAT + specific targets: ip_conntrack
393 depends on IP_NF_IPTABLES && IP_NF_CONNTRACK
395 The Full NAT option allows masquerading, port forwarding and other
396 forms of full Network Address Port Translation. It is controlled by
397 the `nat' table in iptables: see the man page for iptables(8).
399 To compile it as a module, choose M here. If unsure, say N.
401 # NAT + specific targets: nf_conntrack
404 depends on IP_NF_IPTABLES && NF_CONNTRACK_IPV4
406 The Full NAT option allows masquerading, port forwarding and other
407 forms of full Network Address Port Translation. It is controlled by
408 the `nat' table in iptables: see the man page for iptables(8).
410 To compile it as a module, choose M here. If unsure, say N.
412 config IP_NF_NAT_NEEDED
422 config IP_NF_TARGET_MASQUERADE
423 tristate "MASQUERADE target support"
424 depends on (NF_NAT || IP_NF_NAT)
426 Masquerading is a special case of NAT: all outgoing connections are
427 changed to seem to come from a particular interface's address, and
428 if the interface goes down, those connections are lost. This is
429 only useful for dialup accounts with dynamic IP address (ie. your IP
430 address will be different on next dialup).
432 To compile it as a module, choose M here. If unsure, say N.
434 config IP_NF_TARGET_REDIRECT
435 tristate "REDIRECT target support"
436 depends on (NF_NAT || IP_NF_NAT)
438 REDIRECT is a special case of NAT: all incoming connections are
439 mapped onto the incoming interface's address, causing the packets to
440 come to the local machine instead of passing through. This is
441 useful for transparent proxies.
443 To compile it as a module, choose M here. If unsure, say N.
445 config IP_NF_TARGET_NETMAP
446 tristate "NETMAP target support"
447 depends on (NF_NAT || IP_NF_NAT)
449 NETMAP is an implementation of static 1:1 NAT mapping of network
450 addresses. It maps the network address part, while keeping the host
451 address part intact. It is similar to Fast NAT, except that
452 Netfilter's connection tracking doesn't work well with Fast NAT.
454 To compile it as a module, choose M here. If unsure, say N.
456 config IP_NF_TARGET_SAME
457 tristate "SAME target support"
458 depends on (NF_NAT || IP_NF_NAT)
460 This option adds a `SAME' target, which works like the standard SNAT
461 target, but attempts to give clients the same IP for all connections.
463 To compile it as a module, choose M here. If unsure, say N.
465 config IP_NF_NAT_SNMP_BASIC
466 tristate "Basic SNMP-ALG support (EXPERIMENTAL)"
467 depends on EXPERIMENTAL && IP_NF_NAT
470 This module implements an Application Layer Gateway (ALG) for
471 SNMP payloads. In conjunction with NAT, it allows a network
472 management system to access multiple private networks with
473 conflicting addresses. It works by modifying IP addresses
474 inside SNMP payloads to match IP-layer NAT mapping.
476 This is the "basic" form of SNMP-ALG, as described in RFC 2962
478 To compile it as a module, choose M here. If unsure, say N.
480 config NF_NAT_SNMP_BASIC
481 tristate "Basic SNMP-ALG support (EXPERIMENTAL)"
482 depends on EXPERIMENTAL && NF_NAT
485 This module implements an Application Layer Gateway (ALG) for
486 SNMP payloads. In conjunction with NAT, it allows a network
487 management system to access multiple private networks with
488 conflicting addresses. It works by modifying IP addresses
489 inside SNMP payloads to match IP-layer NAT mapping.
491 This is the "basic" form of SNMP-ALG, as described in RFC 2962
493 To compile it as a module, choose M here. If unsure, say N.
495 # If they want FTP, set to $CONFIG_IP_NF_NAT (m or y),
496 # or $CONFIG_IP_NF_FTP (m or y), whichever is weaker.
497 # From kconfig-language.txt:
499 # <expr> '&&' <expr> (6)
501 # (6) Returns the result of min(/expr/, /expr/).
502 config NF_NAT_PROTO_GRE
504 depends on NF_NAT && NF_CT_PROTO_GRE
508 depends on IP_NF_IPTABLES && IP_NF_CONNTRACK && IP_NF_NAT
509 default IP_NF_NAT && IP_NF_FTP
513 depends on IP_NF_IPTABLES && NF_CONNTRACK && NF_NAT
514 default NF_NAT && NF_CONNTRACK_FTP
518 depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
519 default IP_NF_NAT if IP_NF_IRC=y
520 default m if IP_NF_IRC=m
524 depends on IP_NF_IPTABLES && NF_CONNTRACK && NF_NAT
525 default NF_NAT && NF_CONNTRACK_IRC
527 config IP_NF_NAT_TFTP
529 depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
530 default IP_NF_NAT if IP_NF_TFTP=y
531 default m if IP_NF_TFTP=m
535 depends on IP_NF_IPTABLES && NF_CONNTRACK && NF_NAT
536 default NF_NAT && NF_CONNTRACK_TFTP
538 config IP_NF_NAT_AMANDA
540 depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
541 default IP_NF_NAT if IP_NF_AMANDA=y
542 default m if IP_NF_AMANDA=m
546 depends on IP_NF_IPTABLES && NF_CONNTRACK && NF_NAT
547 default NF_NAT && NF_CONNTRACK_AMANDA
549 config IP_NF_NAT_PPTP
551 depends on IP_NF_NAT!=n && IP_NF_PPTP!=n
552 default IP_NF_NAT if IP_NF_PPTP=y
553 default m if IP_NF_PPTP=m
557 depends on IP_NF_IPTABLES && NF_CONNTRACK && NF_NAT
558 default NF_NAT && NF_CONNTRACK_PPTP
559 select NF_NAT_PROTO_GRE
561 config IP_NF_NAT_H323
563 depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
564 default IP_NF_NAT if IP_NF_H323=y
565 default m if IP_NF_H323=m
569 depends on IP_NF_IPTABLES && NF_CONNTRACK && NF_NAT
570 default NF_NAT && NF_CONNTRACK_H323
574 depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
575 default IP_NF_NAT if IP_NF_SIP=y
576 default m if IP_NF_SIP=m
580 depends on IP_NF_IPTABLES && NF_CONNTRACK && NF_NAT
581 default NF_NAT && NF_CONNTRACK_SIP
583 # mangle + specific targets
585 tristate "Packet mangling"
586 depends on IP_NF_IPTABLES
588 This option adds a `mangle' table to iptables: see the man page for
589 iptables(8). This table is used for various packet alterations
590 which can effect how the packet is routed.
592 To compile it as a module, choose M here. If unsure, say N.
594 config IP_NF_TARGET_TOS
595 tristate "TOS target support"
596 depends on IP_NF_MANGLE
598 This option adds a `TOS' target, which allows you to create rules in
599 the `mangle' table which alter the Type Of Service field of an IP
600 packet prior to routing.
602 To compile it as a module, choose M here. If unsure, say N.
604 config IP_NF_TARGET_ECN
605 tristate "ECN target support"
606 depends on IP_NF_MANGLE
608 This option adds a `ECN' target, which can be used in the iptables mangle
611 You can use this target to remove the ECN bits from the IPv4 header of
612 an IP packet. This is particularly useful, if you need to work around
613 existing ECN blackholes on the internet, but don't want to disable
614 ECN support in general.
616 To compile it as a module, choose M here. If unsure, say N.
618 config IP_NF_TARGET_TTL
619 tristate 'TTL target support'
620 depends on IP_NF_MANGLE
622 This option adds a `TTL' target, which enables the user to modify
623 the TTL value of the IP header.
625 While it is safe to decrement/lower the TTL, this target also enables
626 functionality to increment and set the TTL value of the IP header to
627 arbitrary values. This is EXTREMELY DANGEROUS since you can easily
628 create immortal packets that loop forever on the network.
630 To compile it as a module, choose M here. If unsure, say N.
632 config IP_NF_TARGET_CLUSTERIP
633 tristate "CLUSTERIP target support (EXPERIMENTAL)"
634 depends on IP_NF_MANGLE && EXPERIMENTAL
635 depends on (IP_NF_CONNTRACK && IP_NF_CONNTRACK_MARK) || (NF_CONNTRACK_MARK && NF_CONNTRACK_IPV4)
637 The CLUSTERIP target allows you to build load-balancing clusters of
638 network servers without having a dedicated load-balancing
639 router/server/switch.
641 To compile it as a module, choose M here. If unsure, say N.
643 # raw + specific targets
645 tristate 'raw table support (required for NOTRACK/TRACE)'
646 depends on IP_NF_IPTABLES
648 This option adds a `raw' table to iptables. This table is the very
649 first in the netfilter framework and hooks in at the PREROUTING
652 If you want to compile it as a module, say M here and read
653 <file:Documentation/modules.txt>. If unsure, say `N'.
656 config IP_NF_ARPTABLES
657 tristate "ARP tables support"
658 depends on NETFILTER_XTABLES
660 arptables is a general, extensible packet identification framework.
661 The ARP packet filtering and mangling (manipulation)subsystems
662 use this: say Y or M here if you want to use either of those.
664 To compile it as a module, choose M here. If unsure, say N.
666 config IP_NF_ARPFILTER
667 tristate "ARP packet filtering"
668 depends on IP_NF_ARPTABLES
670 ARP packet filtering defines a table `filter', which has a series of
671 rules for simple ARP packet filtering at local input and
672 local output. On a bridge, you can also specify filtering rules
673 for forwarded ARP packets. See the man page for arptables(8).
675 To compile it as a module, choose M here. If unsure, say N.
677 config IP_NF_ARP_MANGLE
678 tristate "ARP payload mangling"
679 depends on IP_NF_ARPTABLES
681 Allows altering the ARP packet payload: source and destination
682 hardware and network addresses.