Tuesday, December 15, 2009

Basic Squid Installation on Ubuntu Server

Install Squid:
# sudo apt-get install squid3
Back up configuration file:
# sudo cp /etc/squid3.conf /etc/squid3.conf.default

Edit squid.conf, under this line:
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
Add the following lines(where localnet is the machines you want to be able to use the proxy):
# MODIFIED PORTION
# ALLOWED NETWORKS
acl localnet src 130.151.0.0/16
http_access allow localnet
icp_access allow localnet

Restart Squid to apply changes:
# service squid3 restart

Now Squid will be acting as a proxy-cache for machines with IP addresses within 130.151.0.0/16. Just point their browsers to the hostname of your squid box port number 3128 (squid's default port).

No comments:

Post a Comment