Hi ALL, <br><br>I want to setup Transpaent Proxy on the box running iptables Firewall. <br><br>With iptables,  I have given below rules. <br><br>iptables -F INPUT<br>iptables -F OUTPUT<br>iptables -F FORWARD<br>iptables -F -t nat
<br>iptables -F -t mangle<br><br>#Enabling ip forwarding<br>echo "1" > /proc/sys/net/ipv4/ip_forward<br><br>#enable syn cookies (prevent against the common 'syn flood attack')<br>echo "1" > /proc/sys/net/ipv4/tcp_syncookies
<br><br>#do source validation by reversed path<br>echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter<br><br>#Enable tracking mechanism<br>/sbin/modprobe -a ip_conntrack_ftp ip_nat_ftp<br><br>iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
<br>iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT<br>iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br><br>iptables -A INPUT DROP<br>
iptables -A FORWARD DROP<br>
iptables -A OUTPUT DROP<br><br>in addition to that, There are many rules , ALL work fine. <br><br>in squid.conf file, I have added below rules, <br><br>http_port 3128<br>cache_mem 64 MB<br>cache_dir ufs /var/spool/squid 100 16 256
<br>cache_access_log /var/log/squid/access.log<br>cache_log /var/log/squid/cache.log<br>cache_store_log /var/log/squid/store.log<br><br>httpd_accel_host virtual<br>httpd_accel_port 80<br>httpd_accel_with_proxy on<br>httpd_accel_uses_host_header on
<br><br>And, Then, I did below command.<br><br>iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128<br><br>But, When I browse Internet , request will not get ridirected to 3128 port. So I can not use squid as a Transpaent Proxy. 
<br><br>Where have I gone wrong? <br><br>I reffered to below URL. <br><a href="http://www.tldp.org/HOWTO/TransparentProxy.html#toc2">http://www.tldp.org/HOWTO/TransparentProxy.html#toc2</a><br><br>Pls help me.<br clear="all">
<br>-- <br>Thank you<br>Indunil Jayasooriya<br>