try this (on your gateway box):
# iptables -v -t nat -A PREROUTING -i eth0 -p tcp --dport 3782 -j DNAT --to-destination 10.0.0.2:3782
# iptables -v -t nat -A PREROUTING -i eth0 -p udp --dport 3782 -j DNAT --to-destination 10.0.0.2:3782
that should work.
oh actually... it will need to go before any of the reject rules. so either insert it into the script you use that sets up the rules at bootup, or use '-I' (insert) rather than '-A' (add) to put it at the start of the PREROUTING rules.
must be run as root of course.
[in english, it says "if packets recieved from the internet (eth0) are destined for port 3782 and are tcp or udp, then before doing anything else with them, change their destination IP address to 10.0.0.2 and port to 3782"...]
Last edited by eccles23; 03-30-2004 at 07:48 PM.
|