The general rule for port forwarding with iptables is:
iptables -t nat -I PREROUTING -p <protocol> -d <destination IP> --dport <destination port> -j DNAT --to-destination <destination IP>:<destination port>
So, for example:
iptables -t nat -I PREROUTING -p tcp -d 10.10.0.10 --dport 80 -j DNAT --to-destination 10.10.0.20:8080
Last edited by macemoneta; 10-06-2005 at 03:33 PM.
|