summaryrefslogtreecommitdiffstats
path: root/iptables.8
diff options
context:
space:
mode:
authorHervé Eychenne <rv@wallfire.org>2002-03-14 09:25:40 +0000
committerHarald Welte <laforge@gnumonks.org>2002-03-14 09:25:40 +0000
commit9e5180649864703b05dbdb5db6ec38aee04c28d2 (patch)
tree54ddb95b9c5cd9a7eec500986d820709686dcad2 /iptables.8
parente0a71a88ca64bc139d9cf93d984e21984875c5c1 (diff)
manpage updates by Herve Eychenne
Diffstat (limited to 'iptables.8')
-rw-r--r--iptables.8364
1 files changed, 235 insertions, 129 deletions
diff --git a/iptables.8 b/iptables.8
index baa3d33b..870eeb12 100644
--- a/iptables.8
+++ b/iptables.8
@@ -1,10 +1,12 @@
-.TH IPTABLES 8 "Aug 11, 2000" "" ""
+.TH IPTABLES 8 "Mar 09, 2002" "" ""
.\"
-.\" Man page written by Herve Eychenne <eychenne@info.enserb.u-bordeaux.fr>
-.\" It is based on ipchains man page.
+.\" Man page written by Herve Eychenne <rv@wallfire.org> (May 1999)
+.\" It is based on ipchains page.
+.\" TODO : add a word for protocol helpers (FTP, IRC, SNMP-ALG)
+.\" add EXTRA EXTENSIONS matches
.\"
.\" ipchains page by Paul ``Rusty'' Russell March 1997
-.\" Based on the original ipfwadm man page by Jos Vos <jos@xos.nl> (see README)
+.\" Based on the original ipfwadm man page by Jos Vos <jos@xos.nl>
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
@@ -26,13 +28,17 @@ iptables \- IP packet filter administration
.SH SYNOPSIS
.BR "iptables -[ADC] " "chain rule-specification [options]"
.br
-.BR "iptables -[RI] " "chain rulenum rule-specification [options]"
+.BR "iptables -I " "chain [rulenum] rule-specification [options]"
+.br
+.BR "iptables -R " "chain rulenum rule-specification [options]"
.br
.BR "iptables -D " "chain rulenum [options]"
.br
.BR "iptables -[LFZ] " "[chain] [options]"
.br
-.BR "iptables -[NX] " "chain"
+.BR "iptables -N " "chain"
+.br
+.BR "iptables -X " "[chain]"
.br
.BR "iptables -P " "chain target [options]"
.br
@@ -79,7 +85,7 @@ There are current three independent tables (which tables are present
at any time depends on the kernel configuration options and which
modules are present).
.TP
-.B "-t, --table"
+.BI "-t, --table " "table"
This option specifies the packet matching table which the command
should operate on. If the kernel is configured with automatic module
loading, an attempt will be made to load the appropriate module for
@@ -87,23 +93,26 @@ that table if it is not already there.
The tables are as follows:
.TP
-.BR "filter"
+.B "filter"
This is the default table. It contains the built-in chains INPUT (for
packets coming into the box itself), FORWARD (for packets being routed
through the box), and OUTPUT (for locally-generated packets).
.TP
-.BR "nat"
+.B "nat"
This table is consulted when a packet that creates a new
connection is encountered. It consists of three built-ins: PREROUTING
(for altering packets as soon as they come in), OUTPUT (for altering
locally-generated packets before routing), and POSTROUTING (for
altering packets as they are about to go out).
.TP
-.BR "mangle"
-This table is used for specialized packet alteration. It has two
-built-in chains: PREROUTING (for altering incoming packets before
-routing) and OUTPUT (for altering locally-generated packets before
-routing).
+.B "mangle"
+This table is used for specialized packet alteration. Until kernel
+2.4.17 it had two built-in chains: PREROUTING (for altering incoming
+packets before routing) and OUTPUT (for altering locally-generated
+packets before routing). Since kernel 2.4.18, three other built-in
+chains are also supported : INPUT (for packets coming into the box itself),
+FORWARD (for altering packets being routed through the box), and
+POSTROUTING (for altering packets as they are about to go out).
.SH OPTIONS
The options that are recognized by
.B iptables
@@ -116,63 +125,75 @@ need to use only enough letters to ensure that
.B iptables
can differentiate it from all other options.
.TP
-.BR "-A, --append"
+.BI "-A, --append " "chain rule-specification"
Append one or more rules to the end of the selected chain.
When the source and/or destination names resolve to more than one
address, a rule will be added for each possible address combination.
.TP
-.BR "-D, --delete"
+.BI "-D, --delete " "chain rule-specification"
+.ns
+.TP
+.BI "-D, --delete " "chain rulenum"
Delete one or more rules from the selected chain. There are two
versions of this command: the rule can be specified as a number in the
chain (starting at 1 for the first rule) or a rule to match.
.TP
-.B "-R, --replace"
-Replace a rule in the selected chain. If the source and/or
-destination names resolve to multiple addresses, the command will
-fail. Rules are numbered starting at 1.
-.TP
-.B "-I, --insert"
+.BR "-I, --insert " "\fIchain\fP [\fIrulenum\fP] \fIrule-specification\fP"
Insert one or more rules in the selected chain as the given rule
number. So, if the rule number is 1, the rule or rules are inserted
at the head of the chain. This is also the default if no rule number
is specified.
.TP
-.B "-L, --list"
+.BI "-R, --replace " "chain rulenum rule-specification"
+Replace a rule in the selected chain. If the source and/or
+destination names resolve to multiple addresses, the command will
+fail. Rules are numbered starting at 1.
+.TP
+.BR "-L, --list " "[\fIchain\fP]"
List all rules in the selected chain. If no chain is selected, all
-chains are listed. It is legal to specify the
+chains are listed. As every other iptables command, it applies to the
+specified table (filter is the default), so NAT rules get listed by
+.br
+ iptables -t nat -n -L
+.br
+Please note that it is often used with the
+.B -n
+option, in order to avoid long reverse DNS lookups.
+It is legal to specify the
.B -Z
(zero) option as well, in which case the chain(s) will be atomically
listed and zeroed. The exact output is affected by the other
arguments given.
.TP
-.B "-F, --flush"
-Flush the selected chain. This is equivalent to deleting all the
-rules one by one.
+.BR "-F, --flush " "[\fIchain\fP]"
+Flush the selected chain (all the chains in the table if none is given).
+This is equivalent to deleting all the rules one by one.
.TP
-.B "-Z, --zero"
+.BR "-Z, --zero " "[\fIchain\fP]"
Zero the packet and byte counters in all chains. It is legal to
specify the
.B "-L, --list"
(list) option as well, to see the counters immediately before they are
cleared. (See above.)
.TP
-.B "-N, --new-chain"
+.BI "-N, --new-chain " "chain"
Create a new user-defined chain by the given name. There must be no
target of that name already.
.TP
-.B "-X, --delete-chain"
-Delete the specified user-defined chain. There must be no references
+.BR "-X, --delete-chain " "[\fIchain\fP]"
+Delete the optional user-defined chain specified. There must be no references
to the chain. If there are, you must delete or replace the referring
rules before the chain can be deleted. If no argument is given, it
will attempt to delete every non-builtin chain in the table.
.TP
-.B "-P, --policy"
+.BI "-P, --policy " "chain target"
Set the policy for the chain to the given target. See the section
.B TARGETS
-for the legal targets. Only non-user-defined chains can have policies,
-and neither built-in nor user-defined chains can be policy targets.
+for the legal targets. Only built-in (non-user-defined) chains can have
+policies, and neither built-in nor user-defined chains can be policy
+targets.
.TP
-.B "-E, --rename-chain"
+.BI "-E, --rename-chain " "old-chain new-chain"
Rename the user specified chain to the user supplied name. This is
cosmetic, and has no effect on the structure of the table.
.TP
@@ -204,7 +225,9 @@ option is omitted.
.BR "-s, --source " "[!] \fIaddress\fP[/\fImask\fP]"
Source specification.
.I Address
-can be either a hostname, a network name, or a plain IP address.
+can be either a network name, a hostname (please note that specifying
+any name to be resolved with a remote query such as DNS is a really bad idea),
+a network IP address (with /mask), or a plain IP address.
The
.I mask
can be either a network mask or a plain number,
@@ -216,7 +239,7 @@ is equivalent to
A "!" argument before the address specification inverts the sense of
the address. The flag
.B --src
-is a convenient alias for this option.
+is an alias for this option.
.TP
.BR "-d, --destination " "[!] \fIaddress\fP[/\fImask\fP]"
Destination specification.
@@ -237,8 +260,8 @@ option is omitted in a rule, then matching the rule will have no
effect on the packet's fate, but the counters on the rule will be
incremented.
.TP
-.BR "-i, --in-interface " "[!] [\fIname\fP]"
-Optional name of an interface via which a packet is received (for
+.BR "-i, --in-interface " "[!] \fIname\fP"
+Name of an interface via which a packet is going to be received (only for
packets entering the
.BR INPUT ,
.B FORWARD
@@ -247,21 +270,19 @@ and
chains). When the "!" argument is used before the interface name, the
sense is inverted. If the interface name ends in a "+", then any
interface which begins with this name will match. If this option is
-omitted, the string "+" is assumed, which will match with any
-interface name.
+omitted, any interface name will match.
.TP
-.BR "-o, --out-interface " "[!] [\fIname\fP]"
-Optional name of an interface via which a packet is going to
-be sent (for packets entering the
+.BR "-o, --out-interface " "[!] \fIname\fP"
+Name of an interface via which a packet is going to be sent (for packets
+entering the
.BR FORWARD ,
.B OUTPUT
and
.B POSTROUTING
-chains). When the "!" argument is used before the interface name,
-the sense is inverted. If the interface name ends in a "+", then any
+chains). When the "!" argument is used before the interface name, the
+sense is inverted. If the interface name ends in a "+", then any
interface which begins with this name will match. If this option is
-omitted, the string "+" is assumed, which will match with any
-interface name.
+omitted, any interface name will match.
.TP
.B "[!] " "-f, --fragment"
This means that the rule only refers to second and further fragments
@@ -271,13 +292,13 @@ not match any rules which specify them. When the "!" argument
precedes the "-f" flag, the rule will only match head fragments, or
unfragmented packets.
.TP
-.B "-c, --set-counters " "PKTS BYTES"
+.BI "-c, --set-counters " "PKTS BYTES"
This enables the administrater to initialize the packet and byte
counters of a rule (during
.B INSERT,
.B APPEND,
.B REPLACE
-operations)
+operations).
.SS "OTHER OPTIONS"
The following additional options can be specified:
.TP
@@ -311,7 +332,7 @@ command.
When listing rules, add line numbers to the beginning of each rule,
corresponding to that rule's position in the chain.
.TP
-.B "--modprobe=<command>"
+.B "--modprobe=command"
When adding or inserting rules into a chain, use
.B command
to load any necessary modules (targets, match extensions, etc).
@@ -327,7 +348,8 @@ or
.B --match
options, followed by the matching module name; after these, various
extra command line options become available, depending on the specific
-module. You can specify multiple extended match modules in one line, and you can use the
+module. You can specify multiple extended match modules in one line,
+and you can use the
.B -h
or
.B --help
@@ -342,7 +364,7 @@ to invert the sense of the match.
These extensions are loaded if `--protocol tcp' is specified. It
provides the following options:
.TP
-.BR "--source-port " "[!] [\fIport[:port]\fP]"
+.BR "--source-port " "[!] \fIport\fP[:\fIport\fP]"
Source port or port range specification. This can either be a service
name or a port number. An inclusive range can also be specified,
using the format
@@ -352,12 +374,12 @@ If the first port is omitted, "0" is assumed; if the last is omitted,
If the second port greater then the first they will be swapped.
The flag
.B --sport
-is an alias for this option.
+is a convenient alias for this option.
.TP
-.BR "--destination-port " "[!] [\fIport[:port]\fP]"
-Destination port or port range specification. The flag
+.BR "--destination-port " "[!] \fIport\fP[:\fIport\fP]"
+Destination port or port range specification. The flag
.B --dport
-is an alias for this option.
+is a convenient alias for this option.
.TP
.BR "--tcp-flags " "[!] \fImask\fP \fIcomp\fP"
Match when the TCP flags are as specified. The first argument is the
@@ -384,17 +406,21 @@ option is inverted.
.TP
.BR "--tcp-option " "[!] \fInumber\fP"
Match if TCP option set.
+.TP
+.BR "--mss " "\fIvalue\fP[:\fIvalue\fP]"
+Match TCP SYN or SYN/ACK packets with the specified MSS value (or range),
+which control the maximum packet size for that connection.
.SS udp
These extensions are loaded if `--protocol udp' is specified. It
provides the following options:
.TP
-.BR "--source-port " "[!] [\fIport[:port]\fP]"
+.BR "--source-port " "[!] \fIport\fP[:\fIport\fP]"
Source port or port range specification.
See the description of the
.B --source-port
option of the TCP extension for details.
.TP
-.BR "--destination-port " "[!] [\fIport[:port]\fP]"
+.BR "--destination-port " "[!] \fIport\fP[:\fIport\fP]"
Destination port or port range specification.
See the description of the
.B --destination-port
@@ -413,18 +439,19 @@ ICMP type, or one of the ICMP type names shown by the command
.TP
.BR "--mac-source " "[!] \fIaddress\fP"
Match source MAC address. It must be of the form XX:XX:XX:XX:XX:XX.
-Note that this only makes sense for packets entering the
+Note that this only makes sense for packets coming from an Ethernet device
+and entering the
.BR PREROUTING ,
.B FORWARD
or
.B INPUT
-chains for packets coming from an ethernet device.
+chains.
.SS limit
-This module matches at a limited rate using a token bucket filter: it
-can be used in combination with the
+This module matches at a limited rate using a token bucket filter.
+A rule using this extension will match until this limit is reached
+(unless the `!' flag is used). It can be used in combination with the
.B LOG
-target to give limited logging. A rule using this extension will
-match until this limit is reached (unless the `!' flag is used).
+target to give limited logging, for example.
.TP
.BI "--limit " "rate"
Maximum average matching rate: specified as a number, with an optional
@@ -432,23 +459,27 @@ Maximum average matching rate: specified as a number, with an optional
3/hour.
.TP
.BI "--limit-burst " "number"
-The maximum initial number of packets to match: this number gets
+Maximum initial number of packets to match: this number gets
recharged by one every time the limit specified above is not reached,
up to this number; the default is 5.
.SS multiport
-This module matches a set of source or destination ports. Up to 15
-ports can be specified. It can only be used in conjunction with
+This module matches a set of source or destination ports. Up to 15
+ports can be specified. It can only be used in conjunction with
.B "-p tcp"
or
.BR "-p udp" .
.TP
-.BR "--source-port" " [\fIport[,port]\fP]"
-Match if the source port is one of the given ports.
+.BR "--source-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+Match if the source port is one of the given ports. The flag
+.B --sports
+is a convenient alias for this option.
.TP
-.BR "--destination-port" " [\fIport[,port]\fP]"
-Match if the destination port is one of the given ports.
+.BR "--destination-ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
+Match if the destination port is one of the given ports. The flag
+.B --dports
+is a convenient alias for this option.
.TP
-.BR "--port" " [\fIport[,port]\fP]"
+.BR "--ports " "\fIport\fP[,\fIport\fP[,\fIport\fP...]]"
Match if the both the source and destination ports are equal to each
other and to one of the given ports.
.SS mark
@@ -457,7 +488,7 @@ This module matches the netfilter mark field associated with a packet
.B MARK
target below).
.TP
-.BI "--mark " "value[/mask]"
+.BR "--mark " "\fIvalue\fP[/\fImask\fP]"
Matches packets with the given unsigned mark value (if a mask is
specified, this is logically ANDed with the mask before the
comparison).
@@ -508,9 +539,6 @@ directions, and
meaning that the packet is starting a new connection, but is
associated with an existing connection, such as an FTP data transfer,
or an ICMP error.
-.SS unclean
-This module takes no options, but attempts to match packets which seem
-malformed or unusual. This is regarded as experimental.
.SS tos
This module matches the 8 bits of Type of Service field in the IP
header (ie. including the precedence bits).
@@ -521,6 +549,49 @@ The argument is either a standard name, (use
iptables -m tos -h
.br
to see the list), or a numeric value to match.
+.SS ah
+This module matches the SPIs in AH header of IPSec packets.
+.TP
+.BR "--ahspi " "[!] \fIspi\fP[:\fIspi\fP]"
+.SS esp
+This module matches the SPIs in ESP header of IPSec packets.
+.TP
+.BR "--espspi " "[!] \fIspi\fP[:\fIspi\fP]"
+.SS length
+This module matches the length of a packet against a specific value
+or range of values.
+.TP
+.BR "--length " "\fIlength\fP[:\fIlength\fP]"
+.SS ttl
+This module matches the time to live field in the IP header.
+.TP
+.BI "--ttl " "ttl"
+Matches the given TTL value.
+.SS owner
+This module attempts to match various characteristics of the packet
+creator, for locally-generated packets. It is only valid in the
+.B OUTPUT
+chain, and even this some packets (such as ICMP ping responses) may
+have no owner, and hence never match. This is regarded as experimental.
+.TP
+.BI "--uid-owner " "userid"
+Matches if the packet was created by a process with the given
+effective user id.
+.TP
+.BI "--gid-owner " "groupid"
+Matches if the packet was created by a process with the given
+effective group id.
+.TP
+.BI "--pid-owner " "processid"
+Matches if the packet was created by a process with the given
+process id.
+.TP
+.BI "--sid-owner " "sessionid"
+Matches if the packet was created by a process in the given session
+group.
+.SS unclean
+This module takes no options, but attempts to match packets which seem
+malformed or unusual. This is regarded as experimental.
.SH TARGET EXTENSIONS
iptables can use extended target modules: the following are included
in the standard distribution.
@@ -532,6 +603,10 @@ matching packets (like most IP header fields) via the kernel log
.I dmesg
or
.IR syslogd (8)).
+This is a "non-terminating target", i.e. rule traversal continues at
+the next rule. So if you want to LOG the packets you refuse, use two
+separate rules with the same matching criterias, first using target LOG
+then DROP (or REJECT).
.TP
.BI "--log-level " "level"
Level of logging (numeric or see \fIsyslog.conf\fP(5)).
@@ -553,20 +628,21 @@ Log options from the IP packet header.
This is used to set the netfilter mark value associated with the
packet. It is only valid in the
.B mangle
-table.
+table. It can for example be used in conjunction with iproute2.
.TP
.BI "--set-mark " "mark"
.SS REJECT
This is used to send back an error packet in response to the matched
packet: otherwise it is equivalent to
-.BR DROP .
+.B DROP
+so it is a terminating TARGET, ending rule traversal.
This target is only valid in the
.BR INPUT ,
.B FORWARD
and
.B OUTPUT
chains, and user-defined chains which are only called from those
-chains. Several options control the nature of the error packet
+chains. The following option controls the nature of the error packet
returned:
.TP
.BI "--reject-with " "type"
@@ -575,19 +651,16 @@ The type given can be
.BR icmp-host-unreachable ,
.BR icmp-port-unreachable ,
.BR icmp-proto-unreachable ,
-.BR icmp-net-prohibited or
+.BR "icmp-net-prohibited or"
.BR icmp-host-prohibited ,
-which return the appropriate ICMP error message (port-unreachable is
-the default). The option
-.B echo-reply
-is also allowed; it can only be used for rules which specify an ICMP
-ping packet, and generates a ping reply. Finally, the option
+which return the appropriate ICMP error message (\fBport-unreachable\fP is
+the default). The option
.B tcp-reset
can be used on rules which only match the TCP protocol: this causes a
TCP RST packet to be sent back. This is mainly useful for blocking
.I ident
-probes which frequently occur when sending mail to broken mail hosts
-(which won't accept your mail otherwise).
+(113/tcp) probes which frequently occur when sending mail to broken mail
+hosts (which won't accept your mail otherwise).
.SS TOS
This is used to set the 8-bit Type of Service field in the IP header.
It is only valid in the
@@ -622,7 +695,7 @@ chain. It specifies that the source address of the packet should be
modified (and all future packets in this connection will also be
mangled), and rules should cease being examined. It takes one option:
.TP
-.BI "--to-source " "<ipaddr>[-<ipaddr>][:port-port]"
+.BR "--to-source " "\fIipaddr\fP[-\fIipaddr\fP][:\fIport\fP-\fIport\fP]"
which can specify a single new source IP address, an inclusive range
of IP addresses, and optionally, a port range (which is only valid if
the rule also specifies
@@ -646,7 +719,7 @@ should be modified (and all future packets in this connection will
also be mangled), and rules should cease being examined. It takes one
option:
.TP
-.BI "--to-destination " "<ipaddr>[-<ipaddr>][:port-port]"
+.BR "--to-destination " "\fIipaddr\fP[-\fIipaddr\fP][:\fIport\fP-\fIport\fP]"
which can specify a single new destination IP address, an inclusive
range of IP addresses, and optionally, a port range (which is only
valid if the rule also specifies
@@ -670,14 +743,14 @@ when the interface goes down. This is the correct behavior when the
next dialup is unlikely to have the same interface address (and hence
any established connections are lost anyway). It takes one option:
.TP
-.BI "--to-ports " "<port>[-<port>]"
+.BR "--to-ports " "\fIport\fP[-\fIport\fP]"
This specifies a range of source ports to use, overriding the default
.B SNAT
-source port-selection heuristics (see above). This is only valid with
+source port-selection heuristics (see above). This is only valid
if the rule also specifies
.B "-p tcp"
or
-.BR "-p udp" ).
+.BR "-p udp" .
.SS REDIRECT
This target is only valid in the
.B nat
@@ -690,35 +763,13 @@ chains. It alters the destination IP address to send the packet to
the machine itself (locally-generated packets are mapped to the
127.0.0.1 address). It takes one option:
.TP
-.BI "--to-ports " "<port>[-<port>]"
-This specifies a destination port or range or ports to use: without
-this, the destination port is never altered. This is only valid with
+.BR "--to-ports " "\fIport\fP[-\fIport\fP]"
+This specifies a destination port or range of ports to use: without
+this, the destination port is never altered. This is only valid
if the rule also specifies
.B "-p tcp"
or
-.BR "-p udp" ).
-.SH EXTRA EXTENSIONS
-The following extensions are not included by default in the standard
-distribution.
-.SS ttl
-This module matches the time to live field in the IP header.
-.TP
-.BI "--ttl " "ttl"
-Matches the given TTL value.
-.SS TTL
-This target is used to modify the time to live field in the IP header.
-It is only valid in the
-.B mangle
-table.
-.TP
-.BI "--ttl-set " "ttl"
-Set the TTL to the given value.
-.TP
-.BI "--ttl-dec " "ttl"
-Decrement the TTL by the given value.
-.TP
-.BI "--ttl-inc " "ttl"
-Increment the TTL by the given value.
+.BR "-p udp" .
.SS ULOG
This target provides userspace logging of matching packets. When this
target is set for a rule, the Linux kernel will multicast this packet
@@ -727,23 +778,73 @@ through a
socket. One or more userspace processes may then subscribe to various
multicast groups and receive the packets.
.TP
-.BI "--ulog-nlgroup " "<nlgroup>"
+.BI "--ulog-nlgroup " "nlgroup"
This specifies the netlink group (1-32) to which the packet is sent.
Default value is 1.
.TP
-.BI "--ulog-prefix " "<prefix>"
+.BI "--ulog-prefix " "prefix"
Prefix log messages with the specified prefix; up to 32 characters
long, and useful fro distinguishing messages in the logs.
.TP
-.BI "--ulog-cprange " "<size>"
+.BI "--ulog-cprange " "size"
Number of bytes to be copied to userspace. A value of 0 always copies
-the entire packet, regardless of its size. Default is 0
+the entire packet, regardless of its size. Default is 0.
.TP
-.BI "--ulog-qthreshold " "<size>"
+.BI "--ulog-qthreshold " "size"
Number of packet to queue inside kernel. Setting this value to, e.g. 10
accumulates ten packets inside the kernel and transmits them as one
-netlink multipart message to userspace. Default is 1 (for backwards
-compatibility)
+netlink multipart message to userspace. Default is 1 (for backwards
+compatibility).
+.SS TCPMSS
+This target allows to alter the MSS value of TCP SYN packets, to control
+the maximum size for that connection (usually limiting it to your
+outgoing interface's MTU minus 40). Of course, it can only be used
+in conjunction with
+.BR "-p tcp" .
+.br
+This target is used to overcome criminally braindead ISPs or servers
+which block ICMP Fragmentation Needed packets. The symptoms of this
+problem are that everything works fine from your Linux
+firewall/router, but machines behind it can never exchange large
+packets:
+.br
+ 1) Web browsers connect, then hang with no data received.
+.br
+ 2) Small mail works fine, but large emails hang.
+.br
+ 3) ssh works fine, but scp hangs after initial handshaking.
+.br
+Workaround: activate this option and add a rule to your firewall
+configuration like:
+.br
+ iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \\
+.br
+ -j TCPMSS --clamp-mss-to-pmtu
+.TP
+.BI "--set-mss " "value"
+Explicitly set MSS option to specified value.
+.TP
+.B "--clamp-mss-to-pmtu"
+Automatically clamp MSS value to (path_MTU - 40).
+.TP
+These options are mutually exclusive.
+.SH EXTRA EXTENSIONS
+The following extensions are not included by default in the standard
+distribution.
+.SS TTL
+This target is used to modify the time to live field in the IP header.
+It is only valid in the
+.B mangle
+table.
+.TP
+.BI "--ttl-set " "ttl"
+Set the TTL to the given value.
+.TP
+.BI "--ttl-dec " "ttl"
+Decrement the TTL by the given value.
+.TP
+.BI "--ttl-inc " "ttl"
+Increment the TTL by the given value.
.SH DIAGNOSTICS
Various error messages are printed to standard error. The exit code
is 0 for correct functioning. Errors which appear to be caused by
@@ -787,9 +888,12 @@ seen previously. So the following options are handled differently:
.br
There are several other changes in iptables.
.SH SEE ALSO
-The packet-filtering-HOWTO, which details more iptables usage for packet filtering, the NAT-HOWTO,
-which details NAT, and the netfilter-hacking-HOWTO which details the
-internals.
+The packet-filtering-HOWTO, which details more iptables usage for
+packet filtering, the NAT-HOWTO, which details NAT,
+and the netfilter-hacking-HOWTO which details the internals.
+.br
+See
+.BR "http://www.netfilter.org/" .
.SH AUTHORS
Rusty Russell wrote iptables, in early consultation with Michael
Neuling.
@@ -806,6 +910,8 @@ Harald Welte wrote the ULOG target, TTL match+target and libipulog.
.PP
The Netfilter Core Team is: Marc Boucher, Jozsef Kadlecsik, James Morris,
Harald Welte and Rusty Russell.
+.PP
+Man page written by Herve Eychenne <rv@wallfire.org>.
.\" .. and did I mention that we are incredibly cool people?
.\" .. sexy, too ..
.\" .. witty, charming, powerful ..