Blame bootstrap_ver/extensions/libxt_tcp.man

Packit Service 2cd632
These extensions can be used if `\-\-protocol tcp' is specified. It
Packit Service 2cd632
provides the following options:
Packit Service 2cd632
.TP
Packit Service 2cd632
[\fB!\fP] \fB\-\-source\-port\fP,\fB\-\-sport\fP \fIport\fP[\fB:\fP\fIport\fP]
Packit Service 2cd632
Source port or port range specification. This can either be a service
Packit Service 2cd632
name or a port number. An inclusive range can also be specified,
Packit Service 2cd632
using the format \fIfirst\fP\fB:\fP\fIlast\fP.
Packit Service 2cd632
If the first port is omitted, "0" is assumed; if the last is omitted,
Packit Service 2cd632
"65535" is assumed.
Packit Service 2cd632
The flag
Packit Service 2cd632
\fB\-\-sport\fP
Packit Service 2cd632
is a convenient alias for this option.
Packit Service 2cd632
.TP
Packit Service 2cd632
[\fB!\fP] \fB\-\-destination\-port\fP,\fB\-\-dport\fP \fIport\fP[\fB:\fP\fIport\fP]
Packit Service 2cd632
Destination port or port range specification.  The flag
Packit Service 2cd632
\fB\-\-dport\fP
Packit Service 2cd632
is a convenient alias for this option.
Packit Service 2cd632
.TP
Packit Service 2cd632
[\fB!\fP] \fB\-\-tcp\-flags\fP \fImask\fP \fIcomp\fP
Packit Service 2cd632
Match when the TCP flags are as specified.  The first argument \fImask\fP is the
Packit Service 2cd632
flags which we should examine, written as a comma-separated list, and
Packit Service 2cd632
the second argument \fIcomp\fP is a comma-separated list of flags which must be
Packit Service 2cd632
set.  Flags are:
Packit Service 2cd632
.BR "SYN ACK FIN RST URG PSH ALL NONE" .
Packit Service 2cd632
Hence the command
Packit Service 2cd632
.nf
Packit Service 2cd632
 iptables \-A FORWARD \-p tcp \-\-tcp\-flags SYN,ACK,FIN,RST SYN
Packit Service 2cd632
.fi
Packit Service 2cd632
will only match packets with the SYN flag set, and the ACK, FIN and
Packit Service 2cd632
RST flags unset.
Packit Service 2cd632
.TP
Packit Service 2cd632
[\fB!\fP] \fB\-\-syn\fP
Packit Service 2cd632
Only match TCP packets with the SYN bit set and the ACK,RST and FIN bits
Packit Service 2cd632
cleared.  Such packets are used to request TCP connection initiation;
Packit Service 2cd632
for example, blocking such packets coming in an interface will prevent
Packit Service 2cd632
incoming TCP connections, but outgoing TCP connections will be
Packit Service 2cd632
unaffected.
Packit Service 2cd632
It is equivalent to \fB\-\-tcp\-flags SYN,RST,ACK,FIN SYN\fP.
Packit Service 2cd632
If the "!" flag precedes the "\-\-syn", the sense of the
Packit Service 2cd632
option is inverted.
Packit Service 2cd632
.TP
Packit Service 2cd632
[\fB!\fP] \fB\-\-tcp\-option\fP \fInumber\fP
Packit Service 2cd632
Match if TCP option set.