1 .TH IP6TABLES 8 "Jan 22, 2006" "" ""
3 .\" Man page written by Andras Kis-Szabo <kisza@sch.bme.hu>
4 .\" It is based on iptables man page.
6 .\" iptables page by Herve Eychenne <rv@wallfire.org>
7 .\" It is based on ipchains man page.
9 .\" ipchains page by Paul ``Rusty'' Russell March 1997
10 .\" Based on the original ipfwadm man page by Jos Vos <jos@xos.nl>
12 .\" This program is free software; you can redistribute it and/or modify
13 .\" it under the terms of the GNU General Public License as published by
14 .\" the Free Software Foundation; either version 2 of the License, or
15 .\" (at your option) any later version.
17 .\" This program is distributed in the hope that it will be useful,
18 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 .\" GNU General Public License for more details.
22 .\" You should have received a copy of the GNU General Public License
23 .\" along with this program; if not, write to the Free Software
24 .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 ip6tables \- IPv6 packet filter administration
30 .BR "ip6tables [-t table] -[AD] " "chain rule-specification [options]"
32 .BR "ip6tables [-t table] -I " "chain [rulenum] rule-specification [options]"
34 .BR "ip6tables [-t table] -R " "chain rulenum rule-specification [options]"
36 .BR "ip6tables [-t table] -D " "chain rulenum [options]"
38 .BR "ip6tables [-t table] -[LFZ] " "[chain] [options]"
40 .BR "ip6tables [-t table] -N " "chain"
42 .BR "ip6tables [-t table] -X " "[chain]"
44 .BR "ip6tables [-t table] -P " "chain target [options]"
46 .BR "ip6tables [-t table] -E " "old-chain-name new-chain-name"
49 is used to set up, maintain, and inspect the tables of IPv6 packet
50 filter rules in the Linux kernel. Several different tables
51 may be defined. Each table contains a number of built-in
52 chains and may also contain user-defined chains.
54 Each chain is a list of rules which can match a set of packets. Each
55 rule specifies what to do with a packet that matches. This is called
56 a `target', which may be a jump to a user-defined chain in the same
60 A firewall rule specifies criteria for a packet, and a target. If the
61 packet does not match, the next rule in the chain is the examined; if
62 it does match, then the next rule is specified by the value of the
63 target, which can be the name of a user-defined chain or one of the
72 means to let the packet through.
74 means to drop the packet on the floor.
76 means to pass the packet to userspace. (How the packet can be received
77 by a userspace process differs by the particular queue handler. 2.4.x
78 and 2.6.x kernels up to 2.6.13 include the
81 queue handler. Kernels 2.6.14 and later additionally include the
84 queue handler. Packets with a target of QUEUE will be sent to queue number '0'
85 in this case. Please also see the
88 target as described later in this man page.)
90 means stop traversing this chain and resume at the next rule in the
91 previous (calling) chain. If the end of a built-in chain is reached
92 or a rule in a built-in chain with target
94 is matched, the target specified by the chain policy determines the
97 There are currently two independent tables (which tables are present
98 at any time depends on the kernel configuration options and which
99 modules are present), as nat table has not been implemented yet.
101 .BI "-t, --table " "table"
102 This option specifies the packet matching table which the command
103 should operate on. If the kernel is configured with automatic module
104 loading, an attempt will be made to load the appropriate module for
105 that table if it is not already there.
107 The tables are as follows:
111 This is the default table (if no -t option is passed). It contains
114 (for packets coming into the box itself),
116 (for packets being routed through the box), and
118 (for locally-generated packets).
121 This table is used for specialized packet alteration. Until kernel
122 2.4.17 it had two built-in chains:
124 (for altering incoming packets before routing) and
126 (for altering locally-generated packets before routing).
127 Since kernel 2.4.18, three other built-in chains are also supported:
129 (for packets coming into the box itself),
131 (for altering packets being routed through the box), and
133 (for altering packets as they are about to go out).
136 This table is used mainly for configuring exemptions from connection
137 tracking in combination with the NOTRACK target. It registers at the netfilter
138 hooks with higher priority and is thus called before nf_conntrack, or any other
139 IP6 tables. It provides the following built-in chains:
141 (for packets arriving via any network interface)
143 (for packets generated by local processes)
146 The options that are recognized by
148 can be divided into several different groups.
150 These options specify the specific action to perform. Only one of them
151 can be specified on the command line unless otherwise specified
152 below. For all the long versions of the command and option names, you
153 need to use only enough letters to ensure that
155 can differentiate it from all other options.
157 .BI "-A, --append " "chain rule-specification"
158 Append one or more rules to the end of the selected chain.
159 When the source and/or destination names resolve to more than one
160 address, a rule will be added for each possible address combination.
162 .BI "-D, --delete " "chain rule-specification"
165 .BI "-D, --delete " "chain rulenum"
166 Delete one or more rules from the selected chain. There are two
167 versions of this command: the rule can be specified as a number in the
168 chain (starting at 1 for the first rule) or a rule to match.
171 Insert one or more rules in the selected chain as the given rule
172 number. So, if the rule number is 1, the rule or rules are inserted
173 at the head of the chain. This is also the default if no rule number
176 .BI "-R, --replace " "chain rulenum rule-specification"
177 Replace a rule in the selected chain. If the source and/or
178 destination names resolve to multiple addresses, the command will
179 fail. Rules are numbered starting at 1.
181 .BR "-L, --list " "[\fIchain\fP]"
182 List all rules in the selected chain. If no chain is selected, all
183 chains are listed. As every other iptables command, it applies to the
184 specified table (filter is the default), so mangle rules get listed by
186 ip6tables -t mangle -n -L
188 Please note that it is often used with the
190 option, in order to avoid long reverse DNS lookups.
191 It is legal to specify the
193 (zero) option as well, in which case the chain(s) will be atomically
194 listed and zeroed. The exact output is affected by the other
195 arguments given. The exact rules are suppressed until you use
200 .BR "-F, --flush " "[\fIchain\fP]"
201 Flush the selected chain (all the chains in the table if none is given).
202 This is equivalent to deleting all the rules one by one.
204 .BR "-Z, --zero " "[\fIchain\fP]"
205 Zero the packet and byte counters in all chains. It is legal to
208 (list) option as well, to see the counters immediately before they are
209 cleared. (See above.)
211 .BI "-N, --new-chain " "chain"
212 Create a new user-defined chain by the given name. There must be no
213 target of that name already.
215 .BR "-X, --delete-chain " "[\fIchain\fP]"
216 Delete the optional user-defined chain specified. There must be no references
217 to the chain. If there are, you must delete or replace the referring
218 rules before the chain can be deleted. If no argument is given, it
219 will attempt to delete every non-builtin chain in the table.
221 .BI "-P, --policy " "chain target"
222 Set the policy for the chain to the given target. See the section
224 for the legal targets. Only built-in (non-user-defined) chains can have
225 policies, and neither built-in nor user-defined chains can be policy
228 .BI "-E, --rename-chain " "old-chain new-chain"
229 Rename the user specified chain to the user supplied name. This is
230 cosmetic, and has no effect on the structure of the table.
234 Give a (currently very brief) description of the command syntax.
236 The following parameters make up a rule specification (as used in the
237 add, delete, insert, replace and append commands).
239 .BR "-p, --protocol " "[!] \fIprotocol\fP"
240 The protocol of the rule or of the packet to check.
241 The specified protocol can be one of
247 or it can be a numeric value, representing one of these protocols or a
248 different one. A protocol name from /etc/protocols is also allowed.
249 But IPv6 extension headers except
255 can be used with Kernel version 2.6.11 or later.
256 A "!" argument before the protocol inverts the
257 test. The number zero is equivalent to
261 will match with all protocols and is taken as default when this
264 .BR "-s, --source " "[!] \fIaddress\fP[/\fImask\fP]"
265 Source specification.
267 can be either a hostname (please note that specifying
268 any name to be resolved with a remote query such as DNS is a really bad idea),
269 a network IPv6 address (with /mask), or a plain IPv6 address.
270 (the network name isn't supported now).
273 can be either a network mask or a plain number,
274 specifying the number of 1's at the left side of the network mask.
278 .IR ffff:ffff:ffff:ffff:0000:0000:0000:0000 .
279 A "!" argument before the address specification inverts the sense of
280 the address. The flag
282 is an alias for this option.
284 .BR "-d, --destination " "[!] \fIaddress\fP[/\fImask\fP]"
285 Destination specification.
286 See the description of the
288 (source) flag for a detailed description of the syntax. The flag
290 is an alias for this option.
292 .BI "-j, --jump " "target"
293 This specifies the target of the rule; i.e., what to do if the packet
294 matches it. The target can be a user-defined chain (other than the
295 one this rule is in), one of the special builtin targets which decide
296 the fate of the packet immediately, or an extension (see
299 option is omitted in a rule, then matching the rule will have no
300 effect on the packet's fate, but the counters on the rule will be
303 .BR "-i, --in-interface " "[!] \fIname\fP"
304 Name of an interface via which a packet is going to be received (only for
310 chains). When the "!" argument is used before the interface name, the
311 sense is inverted. If the interface name ends in a "+", then any
312 interface which begins with this name will match. If this option is
313 omitted, any interface name will match.
315 .BR "-o, --out-interface " "[!] \fIname\fP"
316 Name of an interface via which a packet is going to be sent (for packets
321 chains). When the "!" argument is used before the interface name, the
322 sense is inverted. If the interface name ends in a "+", then any
323 interface which begins with this name will match. If this option is
324 omitted, any interface name will match.
326 .\" Currently not supported (header-based)
328 .\" .B "[!] " "-f, --fragment"
329 .\" This means that the rule only refers to second and further fragments
330 .\" of fragmented packets. Since there is no way to tell the source or
331 .\" destination ports of such a packet (or ICMP type), such a packet will
332 .\" not match any rules which specify them. When the "!" argument
333 .\" precedes the "-f" flag, the rule will only match head fragments, or
334 .\" unfragmented packets.
336 .B "-c, --set-counters " "PKTS BYTES"
337 This enables the administrator to initialize the packet and byte
338 counters of a rule (during
344 The following additional options can be specified:
347 Verbose output. This option makes the list command show the interface
348 name, the rule options (if any), and the TOS masks. The packet and
349 byte counters are also listed, with the suffix 'K', 'M' or 'G' for
350 1000, 1,000,000 and 1,000,000,000 multipliers respectively (but see
353 flag to change this).
354 For appending, insertion, deletion and replacement, this causes
355 detailed information on the rule or rules to be printed.
359 IP addresses and port numbers will be printed in numeric format.
360 By default, the program will try to display them as host names,
361 network names, or services (whenever applicable).
365 Display the exact value of the packet and byte counters,
366 instead of only the rounded number in K's (multiples of 1000)
367 M's (multiples of 1000K) or G's (multiples of 1000M). This option is
368 only relevant for the
373 When listing rules, add line numbers to the beginning of each rule,
374 corresponding to that rule's position in the chain.
376 .B "--modprobe=command"
377 When adding or inserting rules into a chain, use
379 to load any necessary modules (targets, match extensions, etc).
381 ip6tables can use extended packet matching modules. These are loaded
382 in two ways: implicitly, when
386 is specified, or with the
390 options, followed by the matching module name; after these, various
391 extra command line options become available, depending on the specific
392 module. You can specify multiple extended match modules in one line,
397 options after the module has been specified to receive help specific
400 The following are included in the base package, and most of these can
403 to invert the sense of the match.
406 This module matches the parameters in Authentication header of IPsec packets.
408 .BR "--ahspi " "[!] \fIspi\fP[:\fIspi\fP]"
411 .BR "--ahlen " "[!] \fIlength"
412 Total length of this header in octets.
415 Matches if the reserved field is filled with zero.
417 This matches if a specific /proc filename is '0' or '1'.
419 .BR "--condition " "[!] \fIfilename"
420 Match on boolean value stored in /proc/net/ip6t_condition/filename file
422 This module matches the parameters in Destination Options header
424 .BR "--dst-len " "[!] \fIlength"
425 Total length of this header in octets.
427 .BR "--dst-opts " "\fItype\fP[:\fIlength\fP][,\fItype\fP[:\fIlength\fP]...]"
428 numeric type of option and the length of the option data in octets.
430 This module matches the SPIs in ESP header of IPsec packets.
432 .BR "--espspi " "[!] \fIspi\fP[:\fIspi\fP]"
434 This module matches the EUI-64 part of a stateless autoconfigured IPv6 address.
435 It compares the EUI-64 derived from the source MAC address in Ehternet frame
436 with the lower 64 bits of the IPv6 source address. But "Universal/Local"
437 bit is not compared. This module doesn't match other link layer frame, and
445 This module matches the parameters in Fragment header.
447 .BR "--fragid " "[!] \fIid\fP[:\fIid\fP]"
448 Matches the given Identification or range of it.
450 .BR "--fraglen " "[!] \fIlength\fP"
451 This option cannot be used with kernel version 2.6.10 or later. The length of
452 Fragment header is static and this option doesn't make sense.
455 Matches if the reserved fields are filled with zero.
458 Matches on the first fragment.
461 Matches if there are more fragments.
464 Matches if this is the last fragement.
466 This module matches a rate limit based on a fuzzy logic controller [FLC]
468 .BI "--lower-limit " "number"
469 Specifies the lower limit (in packets per second).
471 .BI "--upper-limit " "number"
472 Specifies the upper limit (in packets per second).
474 This module matches the parameters in Hop-by-Hop Options header
476 .BR "--hbh-len " "[!] \fIlength\fP"
477 Total length of this header in octets.
479 .BR "--hbh-opts " "\fItype\fP[:\fIlength\fP][,\fItype\fP[:\fIlength\fP]...]"
480 numeric type of option and the length of the option data in octets.
482 This module matches the Hop Limit field in the IPv6 header.
484 .BR "--hl-eq " "[!] \fIvalue\fP"
485 Matches if Hop Limit equals \fIvalue\fP.
487 .BI "--hl-lt " "value"
488 Matches if Hop Limit is less than \fIvalue\fP.
490 .BI "--hl-gt " "value"
491 Matches if Hop Limit is greater than \fIvalue\fP.
493 This extension is loaded if `--protocol ipv6-icmp' or `--protocol icmpv6' is
494 specified. It provides the following option:
496 .BR "--icmpv6-type " "[!] \fItype\fP[/\fIcode\fP]|\fItypename\fP"
497 This allows specification of the ICMPv6 type, which can be a numeric
503 or one of the ICMPv6 type names shown by the command
505 ip6tables -p ipv6-icmp -h
508 This module matches IPv6 extension headers and/or upper layer header.
510 .BR "--header " "[!] \fIheader\fP[,\fIheader\fP...]"
511 Matches the packet which EXACTLY includes all specified headers. The headers
512 encapsulated with ESP header are out of scope.
516 (Hop-by-Hop Options header),
518 (Destination Options header),
524 (Authentication header),
526 (Encapsulating Security Payload header),
528 (No Next header) which matches 59 in the 'Next Header field' of IPv6 header or any IPv6 extension headers, or
530 which matches any upper layer protocol header. A protocol name from /etc/protocols and numeric value also allowed. The number 255 is equivalent to
534 Matches if the packet includes all specified headers with
538 This module matches the length of the IPv6 payload in octets, or range of it.
539 IPv6 header itself isn't counted.
541 .BR "--length " "[!] \fIlength\fP[:\fIlength\fP]"
543 This module matches at a limited rate using a token bucket filter.
544 A rule using this extension will match until this limit is reached
545 (unless the `!' flag is used). It can be used in combination with the
547 target to give limited logging, for example.
549 .BI "--limit " "rate"
550 Maximum average matching rate: specified as a number, with an optional
551 `/second', `/minute', `/hour', or `/day' suffix; the default is
554 .BI "--limit-burst " "number"
555 Maximum initial number of packets to match: this number gets
556 recharged by one every time the limit specified above is not reached,
557 up to this number; the default is 5.
560 .BR "--mac-source " "[!] \fIaddress\fP"
561 Match source MAC address. It must be of the form XX:XX:XX:XX:XX:XX.
562 Note that this only makes sense for packets coming from an Ethernet device
570 This module matches the netfilter mark field associated with a packet
571 (which can be set using the
575 .BR "--mark " "\fIvalue\fP[/\fImask\fP]"
576 Matches packets with the given unsigned mark value (if a \fImask\fP is
577 specified, this is logically ANDed with the \fImask\fP before the
580 This module matches a set of source or destination ports. Up to 15
581 ports can be specified. A port range (port:port) counts as two
582 ports, but range isn't supported now. It can only be used in conjunction
588 .BR "--source-ports " "\fI[!] port\fP[,\fIport\fP[,\fIport:port\fP...]]"
589 Match if the source port is one of the given ports. The flag
591 is a convenient alias for this option.
593 .BR "--destination-ports " "\fI[!] port\fP[,\fIport\fP[,\fIport:port\fP...]]"
594 Match if the destination port is one of the given ports. The flag
596 is a convenient alias for this option.
598 .BR "--ports " "\fI[!] port\fP[,\fIport\fP[,\fIport:port\fP...]]"
599 Match if the both the source and destination ports are equal to each
600 other and to one of the given ports.
602 This module matches every `n'th packet
604 .BI "--every " "value"
605 Match every `value' packet
607 .BI "[" "--counter " "num" "]"
608 Use internal counter number `num'. Default is `0'.
610 .BI "[" "--start " "num" "]"
611 Initialize the counter at the number `num' insetad of `0'. Most between `0'
614 .BI "[" "--packet " "num" "]"
615 Match on `num' packet. Most be between `0' and `value'-1.
617 This module attempts to match various characteristics of the packet
618 creator, for locally-generated packets. It is only valid in the
620 chain, and even this some packets (such as ICMPv6 ping responses) may
621 have no owner, and hence never match. This is regarded as experimental.
623 .BI "--uid-owner " "userid"
624 Matches if the packet was created by a process with the given
627 .BI "--gid-owner " "groupid"
628 Matches if the packet was created by a process with the given
631 .BI "--pid-owner " "processid"
632 Matches if the packet was created by a process with the given
635 .BI "--sid-owner " "sessionid"
636 Matches if the packet was created by a process in the given session
639 .B NOTE: pid, sid and command matching are broken on SMP
641 This module matches on the bridge port input and output devices enslaved
642 to a bridge device. This module is a part of the infrastructure that enables
643 a transparent bridging IP firewall and is only useful for kernel versions
644 above version 2.5.44.
646 .BR --physdev-in " [!] \fIname\fP"
647 Name of a bridge port via which a packet is received (only for
653 chains). If the interface name ends in a "+", then any
654 interface which begins with this name will match. If the packet didn't arrive
655 through a bridge device, this packet won't match this option, unless '!' is used.
657 .BR --physdev-out " [!] \fIname\fP"
658 Name of a bridge port via which a packet is going to be sent (for packets
664 chains). If the interface name ends in a "+", then any
665 interface which begins with this name will match. Note that in the
666 .BR nat " and " mangle
668 chains one cannot match on the bridge output port, however one can in the
670 chain. If the packet won't leave by a bridge device or it is yet unknown what
671 the output device will be, then the packet won't match this option, unless
674 .RB "[!] " --physdev-is-in
675 Matches if the packet has entered through a bridge interface.
677 .RB "[!] " --physdev-is-out
678 Matches if the packet will leave through a bridge interface.
680 .RB "[!] " --physdev-is-bridged
681 Matches if the packet is being bridged and therefore is not being routed.
682 This is only useful in the FORWARD and POSTROUTING chains.
684 This modules matches the policy used by IPsec for handling a packet.
686 .BI "--dir " "in|out"
687 Used to select whether to match the policy used for decapsulation or the
688 policy that will be used for encapsulation.
691 .B PREROUTING, INPUT and FORWARD
695 .B POSTROUTING, OUTPUT and FORWARD
698 .BI "--pol " "none|ipsec"
699 Matches if the packet is subject to IPsec processing.
702 Selects whether to match the exact policy or match if any rule of
703 the policy matches the given policy.
706 Matches the reqid of the policy rule. The reqid can be specified with
713 Matches the SPI of the SA.
715 .BI "--proto " "ah|esp|ipcomp"
716 Matches the encapsulation protocol.
718 .BI "--mode " "tunnel|transport"
719 Matches the encapsulation mode.
721 .BI "--tunnel-src " "addr[/mask]"
722 Matches the source end-point address of a tunnel mode SA.
723 Only valid with --mode tunnel.
725 .BI "--tunnel-dst " "addr[/mask]"
726 Matches the destination end-point address of a tunnel mode SA.
727 Only valid with --mode tunnel.
730 Start the next element in the policy specification. Can only be used with
733 This module randomly matches a certain percentage of all packets.
735 .BI "--average " "percent"
736 Matches the given percentage. If omitted, a probability of 50% is set.
738 Match on IPv6 routing header
740 .BR "--rt-type" " [!] \fItype\fP"
741 Match the type (numeric).
743 .BR "--rt-segsleft" " [!] \fInum\fP[:\fInum\fP]"
744 Match the `segments left' field (range).
746 .BR "--rt-len" " [!] \fIlength\fP"
747 Match the length of this header.
750 Match the reserved field, too (type=0)
752 .BR "--rt-0-addrs" " \fIADDR\fP[,\fIADDR\fP...]"
753 Match type=0 addresses (list).
755 .BR "--rt-0-not-strict"
756 List of type=0 addresses is not a strict list.
758 These extensions are loaded if `--protocol tcp' is specified. It
759 provides the following options:
761 .BR "--source-port " "[!] \fIport\fP[:\fIport\fP]"
762 Source port or port range specification. This can either be a service
763 name or a port number. An inclusive range can also be specified,
766 If the first port is omitted, "0" is assumed; if the last is omitted,
768 If the second port greater then the first they will be swapped.
771 is a convenient alias for this option.
773 .BR "--destination-port " "[!] \fIport\fP[:\fIport\fP]"
774 Destination port or port range specification. The flag
776 is a convenient alias for this option.
778 .BR "--tcp-flags " "[!] \fImask\fP \fIcomp\fP"
779 Match when the TCP flags are as specified. The first argument is the
780 flags which we should examine, written as a comma-separated list, and
781 the second argument is a comma-separated list of flags which must be
783 .BR "SYN ACK FIN RST URG PSH ALL NONE" .
786 ip6tables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST SYN
788 will only match packets with the SYN flag set, and the ACK, FIN and
792 Only match TCP packets with the SYN bit set and the ACK and RST bits
793 cleared. Such packets are used to request TCP connection initiation;
794 for example, blocking such packets coming in an interface will prevent
795 incoming TCP connections, but outgoing TCP connections will be
797 It is equivalent to \fB--tcp-flags SYN,RST,ACK SYN\fP.
798 If the "!" flag precedes the "--syn", the sense of the
801 .BR "--tcp-option " "[!] \fInumber\fP"
802 Match if TCP option set.
804 These extensions are loaded if `--protocol udp' is specified. It
805 provides the following options:
807 .BR "--source-port " "[!] \fIport\fP[:\fIport\fP]"
808 Source port or port range specification.
809 See the description of the
811 option of the TCP extension for details.
813 .BR "--destination-port " "[!] \fIport\fP[:\fIport\fP]"
814 Destination port or port range specification.
815 See the description of the
816 .B --destination-port
817 option of the TCP extension for details.
818 .SH TARGET EXTENSIONS
819 ip6tables can use extended target modules: the following are included
820 in the standard distribution.
823 This is used to modify the Hop Limit field in IPv6 header. The Hop Limit field
824 is similar to what is known as TTL value in IPv4. Setting or incrementing the
825 Hop Limit field can potentially be very dangerous, so it should be avoided at
826 any cost. This target is only valid in
830 .B Don't ever set or increment the value on packets that leave your local network!
832 .BI "--hl-set " "value"
833 Set the Hop Limit to `value'.
835 .BI "--hl-dec " "value"
836 Decrement the Hop Limit `value' times.
838 .BI "--hl-inc " "value"
839 Increment the Hop Limit `value' times.
841 Turn on kernel logging of matching packets. When this option is set
842 for a rule, the Linux kernel will print some information on all
843 matching packets (like most IPv6 IPv6-header fields) via the kernel log
844 (where it can be read with
848 This is a "non-terminating target", i.e. rule traversal continues at
849 the next rule. So if you want to LOG the packets you refuse, use two
850 separate rules with the same matching criteria, first using target LOG
851 then DROP (or REJECT).
853 .BI "--log-level " "level"
854 Level of logging (numeric or see \fIsyslog.conf\fP(5)).
856 .BI "--log-prefix " "prefix"
857 Prefix log messages with the specified prefix; up to 29 letters long,
858 and useful for distinguishing messages in the logs.
860 .B --log-tcp-sequence
861 Log TCP sequence numbers. This is a security risk if the log is
865 Log options from the TCP packet header.
868 Log options from the IPv6 packet header.
871 Log the userid of the process which generated the packet.
873 This is used to set the netfilter mark value associated with the
874 packet. It is only valid in the
878 .BI "--set-mark " "mark"
880 This target is an extension of the QUEUE target. As opposed to QUEUE, it allows
881 you to put a packet into any specific queue, identified by its 16-bit queue
884 .BR "--queue-num " "\fIvalue"
885 This specifies the QUEUE number to use. Valud queue numbers are 0 to 65535. The default value is 0.
887 It can only be used with Kernel versions 2.6.14 or later, since it requires
893 This is used to send back an error packet in response to the matched
894 packet: otherwise it is equivalent to
896 so it is a terminating TARGET, ending rule traversal.
897 This target is only valid in the
902 chains, and user-defined chains which are only called from those
903 chains. The following option controls the nature of the error packet
906 .BI "--reject-with " "type"
907 The type given can be
911 .B " icmp6-adm-prohibited"
913 .B " icmp6-addr-unreachable"
915 .B " icmp6-port-unreachable"
918 which return the appropriate ICMPv6 error message (\fBport-unreach\fP is
919 the default). Finally, the option
921 can be used on rules which only match the TCP protocol: this causes a
922 TCP RST packet to be sent back. This is mainly useful for blocking
924 (113/tcp) probes which frequently occur when sending mail to broken mail
925 hosts (which won't accept your mail otherwise).
927 can only be used with kernel versions 2.6.14 or latter.
930 This is used to explicitly override the core network stack's routing decision.
934 .BI "--oif " "ifname"
935 Route the packet through `ifname' network interface
937 .BI "--gw " "IPv6_address"
938 Route the packet via this gateway
941 Behave like a non-terminating target and continue traversing the rules. Not valid in combination with `--tee'
944 Make a copy of the packet, and route that copy to the given destination. For the original, uncopied packet, behave like a non-terminating target and continue traversing the rules. Not valid in combination with `--continue'
946 This target has no options. It just turns on
948 for all packets that match this rule.
950 Various error messages are printed to standard error. The exit code
951 is 0 for correct functioning. Errors which appear to be caused by
952 invalid or abused command line parameters cause an exit code of 2, and
953 other errors cause an exit code of 1.
955 Bugs? What's this? ;-)
956 Well... the counters are not reliable on sparc64.
957 .SH COMPATIBILITY WITH IPCHAINS
960 is very similar to ipchains by Rusty Russell. The main difference is
965 are only traversed for packets coming into the local host and
966 originating from the local host respectively. Hence every packet only
967 passes through one of the three chains (except loopback traffic, which
968 involves both INPUT and OUTPUT chains); previously a forwarded packet
969 would pass through all three.
971 The other main difference is that
973 refers to the input interface;
975 refers to the output interface, and both are available for packets
979 .\" .PP The various forms of NAT have been separated out;
981 .\" is a pure packet filter when using the default `filter' table, with
982 .\" optional extension modules. This should simplify much of the previous
983 .\" confusion over the combination of IP masquerading and packet filtering
984 .\" seen previously. So the following options are handled differently:
992 There are several other changes in ip6tables.
994 .BR ip6tables-save (8),
995 .BR ip6tables-restore(8),
997 .BR iptables-save (8),
998 .BR iptables-restore (8),
1001 The packet-filtering-HOWTO details iptables usage for
1002 packet filtering, the NAT-HOWTO details NAT,
1003 the netfilter-extensions-HOWTO details the extensions that are
1004 not in the standard distribution,
1005 and the netfilter-hacking-HOWTO details the netfilter internals.
1008 .BR "http://www.netfilter.org/" .
1010 Rusty Russell wrote iptables, in early consultation with Michael
1013 Marc Boucher made Rusty abandon ipnatctl by lobbying for a generic packet
1014 selection framework in iptables, then wrote the mangle table, the owner match,
1015 the mark stuff, and ran around doing cool stuff everywhere.
1017 James Morris wrote the TOS target, and tos match.
1019 Jozsef Kadlecsik wrote the REJECT target.
1021 Harald Welte wrote the ULOG and NFQUEUE target, the new libiptc, aswell as TTL match+target and libipulog.
1023 The Netfilter Core Team is: Marc Boucher, Martin Josefsson, Jozsef Kadlecsik,
1024 James Morris, Harald Welte and Rusty Russell.
1026 ip6tables man page created by Andras Kis-Szabo, based on
1027 iptables man page written by Herve Eychenne <rv@wallfire.org>.
1028 .\" .. and did I mention that we are incredibly cool people?
1030 .\" .. witty, charming, powerful ..
1031 .\" .. and most of all, modest ..