libipt_DNAT.man 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. \fB\-\-to\-destination\fP [\fIipaddr\fP[\fB\-\fP\fIipaddr\fP]][\fB:\fP\fIport\fP[\fB\-\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. \fB\-p tcp\fP
  18. or
  19. \fB\-p udp\fP).
  20. If no port range is specified, then the destination port will never be
  21. modified. If no IP address is specified then only the destination port
  22. will be modified.
  23. In Kernels up to 2.6.10 you can add several \-\-to\-destination options. For
  24. those kernels, if you specify more than one destination address, either via an
  25. address range or multiple \-\-to\-destination options, a simple round-robin (one
  26. after another in cycle) load balancing takes place between these addresses.
  27. Later Kernels (>= 2.6.11-rc1) don't have the ability to NAT to multiple ranges
  28. anymore.
  29. .TP
  30. \fB\-\-random\fP
  31. If option
  32. \fB\-\-random\fP
  33. is used then port mapping will be randomized (kernel >= 2.6.22).
  34. .TP
  35. \fB\-\-persistent\fP
  36. Gives a client the same source-/destination-address for each connection.
  37. This supersedes the SAME target. Support for persistent mappings is available
  38. from 2.6.29-rc2.