Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What exactly is wrong here

Entry in SQUID File---

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
acl lan src 192.168.1.1 192.168.2.0/24
http_access allow localhost

Error after: service squid restart

2010/02/01 14:24:29| Processing Configuration File: /etc/squid/squid.conf (depth 0)
2010/02/01 14:24:29| cache_cf.cc(361) parseOneConfigFile: squid.conf:10 unrecognized: 'broken_vary_encoding'
2010/02/01 14:24:29| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
2010/02/01 14:24:29| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
2010/02/01 14:24:29| WARNING: For now we assume you meant to write /0
2010/02/01 14:24:29| WARNING: (B) '::/4294967200' is a subnetwork of (A) '::'
2010/02/01 14:24:29| WARNING: because of this '::' is ignored to keep splay tree searching predictable
2010/02/01 14:24:29| WARNING: You should probably remove '::/4294967200' from the ACL named 'all'
2010/02/01 14:24:29| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
2010/02/01 14:24:29| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
2010/02/01 14:24:29| WARNING: For now we assume you meant to write /128
2010/02/01 14:24:29| aclParseIpData: unknown netmask '255.255.255.255' in '127.0.0.1/255.255.255.255'
FATAL: Bungled squid.conf line 25: acl localhost src 127.0.0.1/255.255.255.255
Squid Cache (Version 3.1.0.14): Terminated abnormally.
CPU Usage: 0.013 seconds = 0.006 user + 0.007 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0

Also please provide me with the simplest squid script for the proxy to run. Restrictions can be entered.

share|improve this question
    
It's fine asking for specific help with a problem you have. However, asking to "provide simplest squid script" is very broad and sounds like you're asking others to do your job for you instead of helping you understand the issue at hand. –  Theuni Dec 8 '12 at 22:50
add comment

migrated from superuser.com Feb 1 '10 at 15:07

This question came from our site for computer enthusiasts and power users.

3 Answers

http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
access_log /var/log/squid/access.log squid
hosts_file /etc/hosts
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320

# 1000MB max cache size (default is 100MB):
cache_dir ufs /var/spool/squid 1000 16 256

acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
acl lan src 192.168.0.0/32
http_access allow localhost
http_access allow lan
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname sumardilamoha.com
always_direct allow all
coredump_dir /var/spool/squid
share|improve this answer
add comment

Just erase the netmask from acl localhost src 127.0.0.1/255.255.255.255 to CIDR mask, it's 127.0.0.0/8 instead of 127.0.0.1/255.255.255.255, or any acl with this /255.255.255.255 mask and that's it...

share|improve this answer
add comment

Could you post your squid.conf (preferably through a pastie.org link for formatting purposes) ? In addition, it might be helpful (though not necessarily required) to share some environment information in case anybody has relevant tutorials to get you pointed in the right direction. I am assuming you might be using a redhat based distro with your reference to the service command. If this is correct, this tutorial might help you get started with a simple example to get up and running, then you can expand outward from there.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.