blob: 90ab19d7981c3bb378a4abcb68cf12882bbe83b8 [file] [log] [blame]
Henrik Nordstromc2794132004-01-22 15:04:24 +00001This 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
Jonas Berlin8b7cc8a2005-03-15 19:20:14 +00008chains. It redirects the packet to the machine itself by changing the
9destination IP to the primary address of the incoming interface
Max Kellermann5ae6f202008-01-29 13:40:11 +000010(locally-generated packets are mapped to the 127.0.0.1 address).
Henrik Nordstromc2794132004-01-22 15:04:24 +000011.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010012\fB\-\-to\-ports\fP \fIport\fP[\fB\-\fP\fIport\fP]
Henrik Nordstromc2794132004-01-22 15:04:24 +000013This specifies a destination port or range of ports to use: without
14this, the destination port is never altered. This is only valid
15if the rule also specifies
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010016\fB\-p tcp\fP
Henrik Nordstromc2794132004-01-22 15:04:24 +000017or
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010018\fB\-p udp\fP.
Patrick McHardyef399a32007-05-29 11:24:45 +000019.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010020\fB\-\-random\fP
Patrick McHardyef399a32007-05-29 11:24:45 +000021If option
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010022\fB\-\-random\fP
Patrick McHardyef399a32007-05-29 11:24:45 +000023is used then port mapping will be randomized (kernel >= 2.6.22).
24.RS
25.PP