Page 1 of 1

urgent help required

Posted: Wed Jan 06, 2010 3:43 pm
by smk08
Asslamu Alaikum

i have local interface eth0 172.16.0.1/16 and outgoing (internet ) interface eth1 192.168.15.1
and i am using squid 2.6 stable version.
i add the following rule for transparent proxy

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

but this configuration does not work

kindly guide me how congfigure transparent proxy .


JAZAK ALLAH.

W.salam,

Posted: Fri Jan 08, 2010 12:30 am
by xeon
Dear First of all add this command:
echo 1 > /proc/sys/net/ipv4/ip_forward

Now add Iptables:
iptables -t nat -A POSTROUTING -o eth1 -p tcp -j MASQUERADE

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

Regards,