2 # IP netfilter configuration
5 menu "IP: Netfilter Configuration"
6 depends on INET && NETFILTER
8 config NF_CONNTRACK_IPV4
9 tristate "IPv4 support for new connection tracking (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 # connection tracking, helpers and protocols
23 config IP_NF_CONNTRACK
24 tristate "Connection tracking (required for masq/NAT)"
26 Connection tracking keeps a record of what packets have passed
27 through your machine, in order to figure out how they are related
30 This is required to do Masquerading or other kinds of Network
31 Address Translation (except for Fast NAT). It can also be used to
32 enhance packet filtering (see `Connection state match support'
35 To compile it as a module, choose M here. If unsure, say N.
38 bool "Connection tracking flow accounting"
39 depends on IP_NF_CONNTRACK
41 If this option is enabled, the connection tracking code will
42 keep per-flow packet and byte counters.
44 Those counters can be used for flow-based accounting or the
49 config IP_NF_CONNTRACK_MARK
50 bool 'Connection mark tracking support'
51 depends on IP_NF_CONNTRACK
53 This option enables support for connection marks, used by the
54 `CONNMARK' target and `connmark' match. Similar to the mark value
55 of packets, but this mark value is kept in the conntrack session
56 instead of the individual packets.
58 config IP_NF_CONNTRACK_EVENTS
59 bool "Connection tracking events (EXPERIMENTAL)"
60 depends on EXPERIMENTAL && IP_NF_CONNTRACK
62 If this option is enabled, the connection tracking code will
63 provide a notifier chain that can be used by other kernel code
64 to get notified about changes in the connection tracking state.
68 config IP_NF_CONNTRACK_NETLINK
69 tristate 'Connection tracking netlink interface (EXPERIMENTAL)'
70 depends on EXPERIMENTAL && IP_NF_CONNTRACK && NETFILTER_NETLINK
71 depends on IP_NF_CONNTRACK!=y || NETFILTER_NETLINK!=m
73 This option enables support for a netlink-based userspace interface
76 config IP_NF_CT_PROTO_SCTP
77 tristate 'SCTP protocol connection tracking support (EXPERIMENTAL)'
78 depends on IP_NF_CONNTRACK && EXPERIMENTAL
80 With this option enabled, the connection tracking code will
81 be able to do state tracking on SCTP connections.
83 If you want to compile it as a module, say M here and read
84 <file:Documentation/modules.txt>. If unsure, say `N'.
87 tristate "FTP protocol support"
88 depends on IP_NF_CONNTRACK
90 Tracking FTP connections is problematic: special helpers are
91 required for tracking them, and doing masquerading and other forms
92 of Network Address Translation on them.
94 To compile it as a module, choose M here. If unsure, say Y.
97 tristate "IRC protocol support"
98 depends on IP_NF_CONNTRACK
100 There is a commonly-used extension to IRC called
101 Direct Client-to-Client Protocol (DCC). This enables users to send
102 files to each other, and also chat to each other without the need
103 of a server. DCC Sending is used anywhere you send files over IRC,
104 and DCC Chat is most commonly used by Eggdrop bots. If you are
105 using NAT, this extension will enable you to send files and initiate
106 chats. Note that you do NOT need this extension to get files or
107 have others initiate chats, or everything else in IRC.
109 To compile it as a module, choose M here. If unsure, say Y.
111 config IP_NF_NETBIOS_NS
112 tristate "NetBIOS name service protocol support (EXPERIMENTAL)"
113 depends on IP_NF_CONNTRACK && EXPERIMENTAL
115 NetBIOS name service requests are sent as broadcast messages from an
116 unprivileged port and responded to with unicast messages to the
117 same port. This make them hard to firewall properly because connection
118 tracking doesn't deal with broadcasts. This helper tracks locally
119 originating NetBIOS name service requests and the corresponding
120 responses. It relies on correct IP address configuration, specifically
121 netmask and broadcast address. When properly configured, the output
122 of "ip address show" should look similar to this:
124 $ ip -4 address show eth0
125 4: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
126 inet 172.16.2.252/24 brd 172.16.2.255 scope global eth0
128 To compile it as a module, choose M here. If unsure, say N.
131 tristate "TFTP protocol support"
132 depends on IP_NF_CONNTRACK
134 TFTP connection tracking helper, this is required depending
135 on how restrictive your ruleset is.
136 If you are using a tftp client behind -j SNAT or -j MASQUERADING
139 To compile it as a module, choose M here. If unsure, say Y.
142 tristate "Amanda backup protocol support"
143 depends on IP_NF_CONNTRACK
145 If you are running the Amanda backup package <http://www.amanda.org/>
146 on this machine or machines that will be MASQUERADED through this
147 machine, then you may want to enable this feature. This allows the
148 connection tracking and natting code to allow the sub-channels that
149 Amanda requires for communication of the backup data, messages and
152 To compile it as a module, choose M here. If unsure, say Y.
155 tristate 'PPTP protocol support'
156 depends on IP_NF_CONNTRACK
158 This module adds support for PPTP (Point to Point Tunnelling
159 Protocol, RFC2637) connection tracking and NAT.
161 If you are running PPTP sessions over a stateful firewall or NAT
162 box, you may want to enable this feature.
164 Please note that not all PPTP modes of operation are supported yet.
165 For more info, read top of the file
166 net/ipv4/netfilter/ip_conntrack_pptp.c
168 If you want to compile it as a module, say M here and read
169 Documentation/modules.txt. If unsure, say `N'.
172 tristate "IP Userspace queueing via NETLINK (OBSOLETE)"
174 Netfilter has the ability to queue packets to user space: the
175 netlink device can be used to access them using this driver.
177 This option enables the old IPv4-only "ip_queue" implementation
178 which has been obsoleted by the new "nfnetlink_queue" code (see
179 CONFIG_NETFILTER_NETLINK_QUEUE).
181 To compile it as a module, choose M here. If unsure, say N.
183 config IP_NF_IPTABLES
184 tristate "IP tables support (required for filtering/masq/NAT)"
185 depends on NETFILTER_XTABLES
187 iptables is a general, extensible packet identification framework.
188 The packet filtering and full NAT (masquerading, port forwarding,
189 etc) subsystems now use this: say `Y' or `M' here if you want to use
192 To compile it as a module, choose M here. If unsure, say N.
195 config IP_NF_MATCH_IPRANGE
196 tristate "IP range match support"
197 depends on IP_NF_IPTABLES
199 This option makes possible to match IP addresses against IP address
202 To compile it as a module, choose M here. If unsure, say N.
204 config IP_NF_MATCH_MULTIPORT
205 tristate "Multiple port match support"
206 depends on IP_NF_IPTABLES
208 Multiport matching allows you to match TCP or UDP packets based on
209 a series of source or destination ports: normally a rule can only
210 match a single range of ports.
212 To compile it as a module, choose M here. If unsure, say N.
214 config IP_NF_MATCH_TOS
215 tristate "TOS match support"
216 depends on IP_NF_IPTABLES
218 TOS matching allows you to match packets based on the Type Of
219 Service fields of the IP packet.
221 To compile it as a module, choose M here. If unsure, say N.
223 config IP_NF_MATCH_RECENT
224 tristate "recent match support"
225 depends on IP_NF_IPTABLES
227 This match is used for creating one or many lists of recently
228 used addresses and then matching against that/those list(s).
230 Short options are available by using 'iptables -m recent -h'
231 Official Website: <http://snowman.net/projects/ipt_recent/>
233 To compile it as a module, choose M here. If unsure, say N.
235 config IP_NF_MATCH_ECN
236 tristate "ECN match support"
237 depends on IP_NF_IPTABLES
239 This option adds a `ECN' match, which allows you to match against
240 the IPv4 and TCP header ECN fields.
242 To compile it as a module, choose M here. If unsure, say N.
244 config IP_NF_MATCH_DSCP
245 tristate "DSCP match support"
246 depends on IP_NF_IPTABLES
248 This option adds a `DSCP' match, which allows you to match against
249 the IPv4 header DSCP field (DSCP codepoint).
251 The DSCP codepoint can have any value between 0x0 and 0x4f.
253 To compile it as a module, choose M here. If unsure, say N.
255 config IP_NF_MATCH_AH_ESP
256 tristate "AH/ESP match support"
257 depends on IP_NF_IPTABLES
259 These two match extensions (`ah' and `esp') allow you to match a
260 range of SPIs inside AH or ESP headers of IPSec packets.
262 To compile it as a module, choose M here. If unsure, say N.
264 config IP_NF_MATCH_TTL
265 tristate "TTL match support"
266 depends on IP_NF_IPTABLES
268 This adds CONFIG_IP_NF_MATCH_TTL option, which enabled the user
269 to match packets by their TTL value.
271 To compile it as a module, choose M here. If unsure, say N.
273 config IP_NF_MATCH_OWNER
274 tristate "Owner match support"
275 depends on IP_NF_IPTABLES
277 Packet owner matching allows you to match locally-generated packets
278 based on who created them: the user, group, process or session.
280 To compile it as a module, choose M here. If unsure, say N.
282 config IP_NF_MATCH_ADDRTYPE
283 tristate 'address type match support'
284 depends on IP_NF_IPTABLES
286 This option allows you to match what routing thinks of an address,
287 eg. UNICAST, LOCAL, BROADCAST, ...
289 If you want to compile it as a module, say M here and read
290 <file:Documentation/modules.txt>. If unsure, say `N'.
292 config IP_NF_MATCH_HASHLIMIT
293 tristate 'hashlimit match support'
294 depends on IP_NF_IPTABLES
296 This option adds a new iptables `hashlimit' match.
298 As opposed to `limit', this match dynamically crates a hash table
299 of limit buckets, based on your selection of source/destination
300 ip addresses and/or ports.
302 It enables you to express policies like `10kpps for any given
303 destination IP' or `500pps from any given source IP' with a single
306 # `filter', generic and specific targets
308 tristate "Packet filtering"
309 depends on IP_NF_IPTABLES
311 Packet filtering defines a table `filter', which has a series of
312 rules for simple packet filtering at local input, forwarding and
313 local output. See the man page for iptables(8).
315 To compile it as a module, choose M here. If unsure, say N.
317 config IP_NF_TARGET_REJECT
318 tristate "REJECT target support"
319 depends on IP_NF_FILTER
321 The REJECT target allows a filtering rule to specify that an ICMP
322 error should be issued in response to an incoming packet, rather
323 than silently being dropped.
325 To compile it as a module, choose M here. If unsure, say N.
327 config IP_NF_TARGET_LOG
328 tristate "LOG target support"
329 depends on IP_NF_IPTABLES
331 This option adds a `LOG' target, which allows you to create rules in
332 any iptables table which records the packet header to the syslog.
334 To compile it as a module, choose M here. If unsure, say N.
336 config IP_NF_TARGET_ULOG
337 tristate "ULOG target support (OBSOLETE)"
338 depends on IP_NF_IPTABLES
341 This option enables the old IPv4-only "ipt_ULOG" implementation
342 which has been obsoleted by the new "nfnetlink_log" code (see
343 CONFIG_NETFILTER_NETLINK_LOG).
345 This option adds a `ULOG' target, which allows you to create rules in
346 any iptables table. The packet is passed to a userspace logging
347 daemon using netlink multicast sockets; unlike the LOG target
348 which can only be viewed through syslog.
350 The apropriate userspace logging daemon (ulogd) may be obtained from
351 <http://www.gnumonks.org/projects/ulogd/>
353 To compile it as a module, choose M here. If unsure, say N.
355 config IP_NF_TARGET_TCPMSS
356 tristate "TCPMSS target support"
357 depends on IP_NF_IPTABLES
359 This option adds a `TCPMSS' target, which allows you to alter the
360 MSS value of TCP SYN packets, to control the maximum size for that
361 connection (usually limiting it to your outgoing interface's MTU
364 This is used to overcome criminally braindead ISPs or servers which
365 block ICMP Fragmentation Needed packets. The symptoms of this
366 problem are that everything works fine from your Linux
367 firewall/router, but machines behind it can never exchange large
369 1) Web browsers connect, then hang with no data received.
370 2) Small mail works fine, but large emails hang.
371 3) ssh works fine, but scp hangs after initial handshaking.
373 Workaround: activate this option and add a rule to your firewall
376 iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
377 -j TCPMSS --clamp-mss-to-pmtu
379 To compile it as a module, choose M here. If unsure, say N.
381 # NAT + specific targets
384 depends on IP_NF_IPTABLES && IP_NF_CONNTRACK
386 The Full NAT option allows masquerading, port forwarding and other
387 forms of full Network Address Port Translation. It is controlled by
388 the `nat' table in iptables: see the man page for iptables(8).
390 To compile it as a module, choose M here. If unsure, say N.
392 config IP_NF_NAT_NEEDED
394 depends on IP_NF_NAT != n
397 config IP_NF_TARGET_MASQUERADE
398 tristate "MASQUERADE target support"
401 Masquerading is a special case of NAT: all outgoing connections are
402 changed to seem to come from a particular interface's address, and
403 if the interface goes down, those connections are lost. This is
404 only useful for dialup accounts with dynamic IP address (ie. your IP
405 address will be different on next dialup).
407 To compile it as a module, choose M here. If unsure, say N.
409 config IP_NF_TARGET_REDIRECT
410 tristate "REDIRECT target support"
413 REDIRECT is a special case of NAT: all incoming connections are
414 mapped onto the incoming interface's address, causing the packets to
415 come to the local machine instead of passing through. This is
416 useful for transparent proxies.
418 To compile it as a module, choose M here. If unsure, say N.
420 config IP_NF_TARGET_NETMAP
421 tristate "NETMAP target support"
424 NETMAP is an implementation of static 1:1 NAT mapping of network
425 addresses. It maps the network address part, while keeping the host
426 address part intact. It is similar to Fast NAT, except that
427 Netfilter's connection tracking doesn't work well with Fast NAT.
429 To compile it as a module, choose M here. If unsure, say N.
431 config IP_NF_TARGET_SAME
432 tristate "SAME target support"
435 This option adds a `SAME' target, which works like the standard SNAT
436 target, but attempts to give clients the same IP for all connections.
438 To compile it as a module, choose M here. If unsure, say N.
440 config IP_NF_NAT_SNMP_BASIC
441 tristate "Basic SNMP-ALG support (EXPERIMENTAL)"
442 depends on EXPERIMENTAL && IP_NF_NAT
445 This module implements an Application Layer Gateway (ALG) for
446 SNMP payloads. In conjunction with NAT, it allows a network
447 management system to access multiple private networks with
448 conflicting addresses. It works by modifying IP addresses
449 inside SNMP payloads to match IP-layer NAT mapping.
451 This is the "basic" form of SNMP-ALG, as described in RFC 2962
453 To compile it as a module, choose M here. If unsure, say N.
457 depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
458 default IP_NF_NAT if IP_NF_IRC=y
459 default m if IP_NF_IRC=m
461 # If they want FTP, set to $CONFIG_IP_NF_NAT (m or y),
462 # or $CONFIG_IP_NF_FTP (m or y), whichever is weaker. Argh.
465 depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
466 default IP_NF_NAT if IP_NF_FTP=y
467 default m if IP_NF_FTP=m
469 config IP_NF_NAT_TFTP
471 depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
472 default IP_NF_NAT if IP_NF_TFTP=y
473 default m if IP_NF_TFTP=m
475 config IP_NF_NAT_AMANDA
477 depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
478 default IP_NF_NAT if IP_NF_AMANDA=y
479 default m if IP_NF_AMANDA=m
481 config IP_NF_NAT_PPTP
483 depends on IP_NF_NAT!=n && IP_NF_PPTP!=n
484 default IP_NF_NAT if IP_NF_PPTP=y
485 default m if IP_NF_PPTP=m
487 # mangle + specific targets
489 tristate "Packet mangling"
490 depends on IP_NF_IPTABLES
492 This option adds a `mangle' table to iptables: see the man page for
493 iptables(8). This table is used for various packet alterations
494 which can effect how the packet is routed.
496 To compile it as a module, choose M here. If unsure, say N.
498 config IP_NF_TARGET_TOS
499 tristate "TOS target support"
500 depends on IP_NF_MANGLE
502 This option adds a `TOS' target, which allows you to create rules in
503 the `mangle' table which alter the Type Of Service field of an IP
504 packet prior to routing.
506 To compile it as a module, choose M here. If unsure, say N.
508 config IP_NF_TARGET_ECN
509 tristate "ECN target support"
510 depends on IP_NF_MANGLE
512 This option adds a `ECN' target, which can be used in the iptables mangle
515 You can use this target to remove the ECN bits from the IPv4 header of
516 an IP packet. This is particularly useful, if you need to work around
517 existing ECN blackholes on the internet, but don't want to disable
518 ECN support in general.
520 To compile it as a module, choose M here. If unsure, say N.
522 config IP_NF_TARGET_DSCP
523 tristate "DSCP target support"
524 depends on IP_NF_MANGLE
526 This option adds a `DSCP' match, which allows you to match against
527 the IPv4 header DSCP field (DSCP codepoint).
529 The DSCP codepoint can have any value between 0x0 and 0x4f.
531 To compile it as a module, choose M here. If unsure, say N.
533 config IP_NF_TARGET_TTL
534 tristate 'TTL target support'
535 depends on IP_NF_MANGLE
537 This option adds a `TTL' target, which enables the user to modify
538 the TTL value of the IP header.
540 While it is safe to decrement/lower the TTL, this target also enables
541 functionality to increment and set the TTL value of the IP header to
542 arbitrary values. This is EXTREMELY DANGEROUS since you can easily
543 create immortal packets that loop forever on the network.
545 To compile it as a module, choose M here. If unsure, say N.
547 config IP_NF_TARGET_CLUSTERIP
548 tristate "CLUSTERIP target support (EXPERIMENTAL)"
549 depends on IP_NF_MANGLE && EXPERIMENTAL
550 depends on (IP_NF_CONNTRACK && IP_NF_CONNTRACK_MARK) || (NF_CONNTRACK_MARK && NF_CONNTRACK_IPV4)
552 The CLUSTERIP target allows you to build load-balancing clusters of
553 network servers without having a dedicated load-balancing
554 router/server/switch.
556 To compile it as a module, choose M here. If unsure, say N.
558 # raw + specific targets
560 tristate 'raw table support (required for NOTRACK/TRACE)'
561 depends on IP_NF_IPTABLES
563 This option adds a `raw' table to iptables. This table is the very
564 first in the netfilter framework and hooks in at the PREROUTING
567 If you want to compile it as a module, say M here and read
568 <file:Documentation/modules.txt>. If unsure, say `N'.
571 config IP_NF_ARPTABLES
572 tristate "ARP tables support"
573 depends on NETFILTER_XTABLES
575 arptables is a general, extensible packet identification framework.
576 The ARP packet filtering and mangling (manipulation)subsystems
577 use this: say Y or M here if you want to use either of those.
579 To compile it as a module, choose M here. If unsure, say N.
581 config IP_NF_ARPFILTER
582 tristate "ARP packet filtering"
583 depends on IP_NF_ARPTABLES
585 ARP packet filtering defines a table `filter', which has a series of
586 rules for simple ARP packet filtering at local input and
587 local output. On a bridge, you can also specify filtering rules
588 for forwarded ARP packets. See the man page for arptables(8).
590 To compile it as a module, choose M here. If unsure, say N.
592 config IP_NF_ARP_MANGLE
593 tristate "ARP payload mangling"
594 depends on IP_NF_ARPTABLES
596 Allows altering the ARP packet payload: source and destination
597 hardware and network addresses.