Re: REDIRECT to localhost

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

 



Le mar 17/08/2004 à 13:02, Igor Popov a écrit :
> As I know, REDIRECT target redirects to the same iface, but on another port.

Nope.
REDIRECT target redirects to lo interface, on the port you want.

> I can run squid on ppp iface, because it is created dynamically and I don't 
> want it to listen on all addresses.

Just have it run on 127.0.0.1, port 3128, and configure it as a
transparent proxy (see Squid doc).

> I have tried to use REDIRECT and DNAT, but without any success.

And finally try this :

	iptables -t nat -A PREROUTING -p tcp --dport 80 \
		-j REDIRECT --to-ports 3128

Should work.


-- 
http://www.netexit.com/~sid/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
>> Hi! I'm your friendly neighbourhood signature virus.
>> Copy me to your signature file and help me spread!



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux