OK that works. I just have one question

what's the -m stat --state NEW do. I understand that this is to allow the
packet in so that it can be forwarded but why the -m stuff. Thanks

$IPTABLES -A FORWARD -p tcp --dport 5631 -m state --state NEW -d
ip.of.internal.system -j ACCEPT


Matthew Scarrow
ComIT Solutions Inc.
www.comit.ca
Phone: 519-442-0100
Fax:   519-442-0429


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Mike Burger
Sent: Friday, August 09, 2002 12:09 PM
To: RedHat List
Subject: Re: IPTABLES and PCAnywhere


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



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

Reply via email to