Getting Squid (Internet Proxy) Working

October 21st, 2008 | by Jeff Fitzsimons |

Problem

After configuring Safari and Firefox to use my local network’s squid proxy, I got the following error whenever I tried to browse to a page:

ERROR

The requested URL could not be retrieved
While trying to retrieve the URL:  http://www.google.com/

The following error was encountered:
 * Access Denied. 
   Access control configuration prevents your request from
   being allowed at this time. Please contact your service
   provider if you feel this is incorrect.

Solution

The squid.conf file on my server wasn’t configured correctly. Actually, I had simply neglected to ever bother configuring it! By default, Squid rejects all requests.

I edited the Squid configuration file:

sudo vi /etc/squid/squid.conf

Changing from this:

# Example rule allowing access from your local networks. Adapt
# to list your (internal) IP networks from where browsing should
# be allowed
#acl our_networks src 192.168.1.0/24 192.168.2.0/24
#http_access allow our_networks

To this:

# Example rule allowing access from your local networks. Adapt
# to list your (internal) IP networks from where browsing should
# be allowed
acl our_networks src 192.168.1.0/24
http_access allow our_networks

Then restarted Squid:

sudo /etc/init.d/squid restart

Post a Comment