3.2 Source address translation
- Source address translation is always done in last by the chain POSTROUTING
- routing and filtering see the packet unchanged
- Examples:
- #Change source addresses to 1.2.3.4.
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 1.2.3.4
- # Masquerade tcp out eth0 using a range of source ports
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE -p tcp --to 2222-3333
® © Hervé Schauer Consultants 2000 -
4 bis, rue de la gare -
92300 Levallois-Perret
Phone : +33 141 409 700 -
Fax : +33 141 409 709 -
Email : <secretariat@hsc.fr>