Blame extensions/libxt_SNAT.man

Packit Service d1fe03
This target is only valid in the
Packit Service d1fe03
.B nat
Packit Service d1fe03
table, in the
Packit Service d1fe03
.B POSTROUTING
Packit Service d1fe03
and
Packit Service d1fe03
.B INPUT
Packit Service d1fe03
chains, and user-defined chains which are only called from those
Packit Service d1fe03
chains.  It specifies that the source address of the packet should be
Packit Service d1fe03
modified (and all future packets in this connection will also be
Packit Service d1fe03
mangled), and rules should cease being examined.  It takes the
Packit Service d1fe03
following options:
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-to\-source\fP [\fIipaddr\fP[\fB\-\fP\fIipaddr\fP]][\fB:\fP\fIport\fP[\fB\-\fP\fIport\fP]]
Packit Service d1fe03
which can specify a single new source IP address, an inclusive range
Packit Service d1fe03
of IP addresses. Optionally a port range,
Packit Service d1fe03
if the rule also specifies one of the following protocols:
Packit Service d1fe03
\fBtcp\fP, \fBudp\fP, \fBdccp\fP or \fBsctp\fP.
Packit Service d1fe03
If no port range is specified, then source ports below 512 will be
Packit Service d1fe03
mapped to other ports below 512: those between 512 and 1023 inclusive
Packit Service d1fe03
will be mapped to ports below 1024, and other ports will be mapped to
Packit Service d1fe03
1024 or above. Where possible, no port alteration will occur.
Packit Service d1fe03
In Kernels up to 2.6.10, you can add several \-\-to\-source options. For those
Packit Service d1fe03
kernels, if you specify more than one source address, either via an address
Packit Service d1fe03
range or multiple \-\-to\-source options, a simple round-robin (one after another
Packit Service d1fe03
in cycle) takes place between these addresses.
Packit Service d1fe03
Later Kernels (>= 2.6.11-rc1) don't have the ability to NAT to multiple ranges
Packit Service d1fe03
anymore.
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-random\fP
Packit Service d1fe03
If option
Packit Service d1fe03
\fB\-\-random\fP
Packit Service d1fe03
is used then port mapping will be randomized through a hash-based algorithm (kernel >= 2.6.21).
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-random-fully\fP
Packit Service d1fe03
If option
Packit Service d1fe03
\fB\-\-random-fully\fP
Packit Service d1fe03
is used then port mapping will be fully randomized through a PRNG (kernel >= 3.14).
Packit Service d1fe03
.TP
Packit Service d1fe03
\fB\-\-persistent\fP
Packit Service d1fe03
Gives a client the same source-/destination-address for each connection.
Packit Service d1fe03
This supersedes the SAME target. Support for persistent mappings is available
Packit Service d1fe03
from 2.6.29-rc2.
Packit Service d1fe03
.PP
Packit Service d1fe03
Kernels prior to 2.6.36-rc1 don't have the ability to
Packit Service d1fe03
.B SNAT
Packit Service d1fe03
in the
Packit Service d1fe03
.B INPUT
Packit Service d1fe03
chain.
Packit Service d1fe03
.TP
Packit Service d1fe03
IPv6 support available since Linux kernels >= 3.7.