Hello all:
I am trying to get squid running on my centos machine. The server has two NICs, eth0 tied to internet with DHCP and eth1 tied to the lan with IP 192.168.1.1. I used "yum install squid" and it installed 3.1.10. I have iptables running for firewall and nat. I issued the command
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
I am trying to use a basic squid.conf file just to get it all working. My squid.conf file is (basically the default file with the visible_hostname added, cache_mem added, and all "deny" entries deleted):
Code:
visible_hostname blitz
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 192.168.1.0/24
http_access allow manager localhost
http_access deny manager
http_access allow localnet
http_access allow localhost
http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
cache_dir ufs /var/spool/squid 100 16 256
cache_mem 32 MB
coredump_dir /var/spool/squid
When I do a service squid start, it starts fine with no errors or warnings. The /var/log/squid/cache.log file gets appended to and seems okay. Whenever I try to access an http page from my lan (specific IP address of 192.168.1.76), I get a "waiting for respone..." from the website until the timeout and then a page cannot be displayed error. https websites seem to work. In both cases, there is nothing in the /var/log/squid/access.log file. It remains 0 bytes no matter how many times I try to access the internet. Also, /var/log/messages does not show any traffic (not sure if it should, but just indicated that for fyi...)
netstat -van | grep 3128 shows
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN
I also tried running squid without the "transparent" in the squid.conf file and pointing the web browser on the 192.168.1.76 machine (windows 7) to use a proxy at 192.168.1.1:3128 and it told me the proxy server is not responding. It seems to me that squid is actually not listening, but netstat seems to indicate it is. Also, ps -ef | grep squid shows a squid -f /etc/squid/squid.conf entry, and a (squid) -f /etc/squid/squid.conf entry and a (unlinkd) entry.
I am stumped. I have tried everything I can think of and searched high and low on the internet. Everything seems to indicate that the configurations I have listed will work. Any ideas as to what to do next?
Thanks much