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

Re: Redirect port 80->8080 on the same machine




>>> Vineet Kumar <debian-security@virtual.doorstop.net> 08/07/02 01:31PM >>>
* Janusz Ulanowski (janul@netten.pl) [020807 08:25]:
> Hello,
> What string (iptables) to add to redirect port from 80 to 8080
> on the same machine (to transparent proxy)
> I've used 
> iptables -t  nat -A PREROUTING -p tcp --dport 80 -i eth0 -j DNAT 
> --to 192.168.0.1:8080
> 
> but it's working for incoming packets, from my localhost isn't work

iptables -t  nat -A PREROUTING -p tcp --dport 80 -i lo -j DNAT \
--to 192.168.0.1:8080

=)

good times,
Vineet
-- 
http://www.doorstop.net/ 
-- 
"Computer Science is no more about computers
than astronomy is about telescopes."  -- E.W. Dijkstra

..



Reply to: