• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1This target is only valid in the
2.B nat
3table, in the
4.B PREROUTING
5and
6.B OUTPUT
7chains, and user-defined chains which are only called from those
8chains.  It redirects the packet to the machine itself by changing the
9destination IP to the primary address of the incoming interface
10(locally-generated packets are mapped to the localhost address,
11127.0.0.1 for IPv4 and ::1 for IPv6, and packets arriving on
12interfaces that don't have an IP address configured are dropped).
13.TP
14\fB\-\-to\-ports\fP \fIport\fP[\fB\-\fP\fIport\fP]
15This specifies a destination port or range of ports to use: without
16this, the destination port is never altered.  This is only valid
17if the rule also specifies one of the following protocols:
18\fBtcp\fP, \fBudp\fP, \fBdccp\fP or \fBsctp\fP.
19.TP
20\fB\-\-random\fP
21If option
22\fB\-\-random\fP
23is used then port mapping will be randomized (kernel >= 2.6.22).
24.TP
25IPv6 support available starting Linux kernels >= 3.7.
26