epike on Tue, 11 Mar 2003 11:14:09 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Iptables/Port Forwarding


> $IPTABLES -t nat -A PREROUTING -p tcp -i eth1 -d 66.71.91.54 --dport 8888
> -j DNAT --to 192.168.0.2:80
> 
> $IPTABLES -A FORWARD -p tcp -i eth0 -d 192.168.0.2 --dport 80 -j ACCEPT

Just guessing (been awhile since i tried any of this):

Perhaps the problem is when packets from 192.168.0.2
tries to reply to the client--could be because its replying
from source port 80 wheras the client contacted port 8888.
perhaps a -j SNAT for the reverse direction is needed.
Also could try -j REDIRECT instead of DNAT that might work

Also shouldnt the second line be "-o eth0" instead of "-i eth0"?
maybe that line is not needed at all.

epike

> 
> 
> Thanks,
> Naresh

_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug