[CentOS] Unable to configure squid transparent proxy on Centos4.0

Sat Jul 22 02:58:22 UTC 2006
Guillermo Garron <guillermo.fedora at gmail.com>

>  I am trying to configure Squid Transparent Proxy on Centos4.0. The eth0 is
> connected to the Internet and eth1 is for the LAN connection
> I am testing this scenario with 2 machines one machine (Centos4.0 ) on which
> squid is running and other machine which is debian is on the network
> .
> Centos4.0
>    eth0:
>    eth1:
> Debian:
>    eth0:  gateway: (eth1 of Centos)
> Squid works fine if I manually add the proxy settings in any browser for the
> clients of network ( but as I want to configure transparent
> proxy I have added these lines to squid.conf
>           http_port 5678
>           httpd_accel_host virtual
>           httpd_accel_port 80
>           httpd_accel_with_proxy on
>           httpd_accel_uses_host_header on
> iptables configuration  Only one rule is there
> iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 5678
> Any pointers what can be the problem ?
The only difference i can see with my configuration is

iptables -A PREROUTING -t nat -s -i eth1 -p tcp --dport 80
-j REDIRECT --to-port 3128
as you can see i have the -s option enabled, i just wonder if you are
creating a loop and making squid to go back to himself when "he" wants
to go for the webpage?