** Reply to message from Matthew Scarrow <[EMAIL PROTECTED]> on Fri, 09 Aug 2002 
09:48:49 -0400


> Does anyone have an idea on how to setup port forwarding with iptables to
> allow a host on the internal network to be accessed from outside.
> 
> I know the prots are tcp 5631 udp 5632
> 
> I've tried forwarding the ports like this:
> 
> iptables -A FORWARD -i eth0 -p TCP -s outside IP --sport 5631  -d inside IP
> iptables -A FORWARD -i eth0 -p UDP -s outside IP --sport 5632  -d inside IP
> 
> I also tried it this way:
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5631 -j REDIRECT --to
> inside IP
> iptables -t nat -A PREROUTING -i eth0 -p udp --dport 5632 -j REDIRECT --to
> inside IP

Close on the last one:

/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5631 -j DNAT --to inside ip

REDIRECT only routes to the same box so you have to use DNAT.

jb

-- 
Jack Bowling
mailto: [EMAIL PROTECTED]



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to