7579e14e4925f52e84b1cfe5cb2136a11623b054
[iptables.git] / extensions / libipt_DNAT.man
1 This target is only valid in the
2 .B nat
3 table, in the
4 .B PREROUTING
5 and
6 .B OUTPUT
7 chains, and user-defined chains which are only called from those
8 chains.  It specifies that the destination address of the packet
9 should be modified (and all future packets in this connection will
10 also be mangled), and rules should cease being examined.  It takes one
11 type of option:
12 .TP
13 .BR "--to-destination " "\fIipaddr\fP[-\fIipaddr\fP][:\fIport\fP-\fIport\fP]"
14 which can specify a single new destination IP address, an inclusive
15 range of IP addresses, and optionally, a port range (which is only
16 valid if the rule also specifies
17 .B "-p tcp"
18 or
19 .BR "-p udp" ).
20 If no port range is specified, then the destination port will never be
21 modified.
22 .RS
23 .PP
24 You can add several --to-destination options.  If you specify more
25 than one destination address, either via an address range or multiple
26 --to-destination options, a simple round-robin (one after another in
27 cycle) load balancing takes place between these adresses.