View Single Post
Old 09-25-2003, 04:03 PM  
Hansm
Confirmed User
 
Join Date: Jun 2002
Posts: 871
If you are running LINUX on your gateway then you can use iptables.

below a example of my routing iptables rule.

external ip is 212.???.???.53 and port 22650 forwards to internal ip 192.168.0.2 and port 21

/sbin/iptables -A PREROUTING -t nat -p tcp -d 212.???.???.53 --dport 22650 -j DNAT --to 192.168.0.2:21

if you want to redirect every port use this

/sbin/iptables -A PREROUTING -t nat -p tcp -d 212.???.???.53 -j DNAT --to 192.168.0.2
Hansm is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote