It works just fine, and isn't difficult, at all: iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport xxxx -j DNAT --to-destination xxx.xxx.xxx.xxx iptables -A FORWARD -p tcp --dport xxxx -m state --state NEW -d xxx.xxx.xxx.xxx -j ACCEPT
On Fri, 6 Sep 2002, Kevin - KD Micro Software wrote: > 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