# The port forwarding
iptables -t nat -A PREROUTING -i ethX -p tcp -m tcp --dport 12345 \
-j DNAT --to-destination 10.10.10.10:12345
# The masquerade
iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
# Don't forget to turn on ip_forwarding:
sysctl -w net.ipv4.conf.ethX.forwarding=1
Saturday, July 18, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment