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

Re: Redirecting incoming local ports [SOLVED]



On -6-Wed, Jun 18, 2003 at 03:28:52PM -0300, Koba <koba@grupocom.com.ar> spake thus,
> This should work:
> 
> $IPTABLES -t nat -A PREROUTING -p tcp --dport 80 -j DROP
> $IPTABLES -t nat -A PREROUTING -p tcp --dport 9090 -j REDIRECT --to-ports 
> 80
> 
> $IPTABLES -t nat -A INPUT -p tcp --dport 80 -j ACCEPT
> 
> The packets to port 80 are dropped even before touching the INPUT chain.
> The ones accepted by INPUT rule are only those which had been redirected 
> from port 9090.
> I'll recommend using -d your_ip/32 so you don't drop http requests being 
> routed by your box, and -i ext_if.
> 

That absolutely worked, thanks Koba!

Also thanks to the others who have sent me suggestions, they helped me to
better understand iptables even though they didn't work out quite as expected.

-- 
Aaron Bieber
-
Graphic Design // Web Design
http://www.core-dev.com/
aaron@core-dev.com



Reply to: