Try this, instead:

$IPTABLES -t nat -A PREROUTING -i eth0 -p tcp --dport 5631 -j DNAT --to 
ip.of.internal.system
$IPTABLES -A FORWARD -p tcp --dport 5631 -m state --state NEW -d 
ip.of.internal.system -j ACCEPT
$IPTABLES -t nat -A PREROUTING -i eth0 -p udp --dport 5632 -j DNAT --to 
ip.of.internal.system
$IPTABLES -A FORWARD -p udp --dport 5632 -m state --state NEW -d 
ip.of.internal.system -j ACCEPT

Of course, each entry should be on its own line, not broken as they are 
above.

On Fri, 9 Aug 2002, Matthew Scarrow wrote:

> 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
> 
> Didn't work either.
> 
> Anyone know what I'm doing wrong.
> 
> 
> Matthew Scarrow
> ComIT Solutions Inc.
> www.comit.ca
> Phone: 519-442-0100
> Fax:   519-442-0429
> 
> 
> 
> 



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

Reply via email to