hmmm... something like this:

iptables -t nat -A PREROUTING ! -i eth0 -p tcp --destination-port 80 -j
DNAT --to 1.1.1.2:80

means - forward all the connections  to port tcp 80 that DO NOT come from
your internal network (eth0) to IP1.1.1.2, on port 80

T.G.


----- Original Message -----
From: "Kevin - KD Micro Software" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 06, 2002 4:06 AM
Subject: Port Forwarding


> Hi all,
>
> I've spoken to a couple of people who tried port forwarding using iptables
> and apparently it's not an easy task to accomplish. I've tried myself and
> don't seem to have any luck whatsoever either (after reading numbers of
> HOWTOs etc) so I'm asking here as a last resort.
>
> Just to makes things easier, i'll try to give as much info as possible,
> using the following example:
> I would like port 8181 on my Red Hat box (7.2, kernel 2.4.9-34, let's say
ip
> is 1.1.1.1 (example only)) to be forwarded to port 80 on internal machine
IP
> 1.1.1.2. I understand that machines on the internal network (eth0) would
not
> be able to make use of this, but as long as it works from the net
connection
> (ppp0) then that is ok. That's all I need. But, of course, if there is a
way
> where this would work for both then thats even better.
>
> Has anyone actually managed to get this working right?
> Any help would be greatly appreciated.
>
> TIA
>
> ________________________________________________________________
> Kevin Green
> KD Micro Software :: "Servicing all ends of the evolutionary scale" -
Frank
> Holmes
> [EMAIL PROTECTED]
> Phone: 9256 1566 (ext 2778)
>
>
>
>
> --
> 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