To install Squid type the following command in a terminal:
sudo aptitude install squid
Configuration of Squid is done through the editing of the following file: /etc/squid/squid.conf
To edit this file ,type Alt+F2 and enter the following command:
gksu gedit /etc/squid/squid.conf
Its important that Squid knows the name of the machine. To do this, locate the line visible_hostname.
For example, if the machine called ubuntu insert:
visible_hostname ubuntu
By default, the proxy server will use port 3128. To choose another port, locate the line:
http_port 3128
and change the port number, for example:
http_port 3177
By default the proxy server will listen on all interfaces. For security reasons, its better to put in on your local network only.
For example, if the network card connected to your LAN, has IP 10.0.0.1, change the line:
http_port 10.0.0.1:3177
By default, nobody is allowed to connect to the proxy server. (Only from your machine itself)
A list of permissions must be created.
For example, we will define a group encompassing the local network.
Find the line beginning with acl localhost...
At the end of the section, add:
acl lanhome src 10.0.0.0/255.255.255.0
(lanhome is a random name chosen).
Now that the group is defined, we will authorize to use the proxy.
Locate the line http_access allow ...
and add below (before the line http_access deny all):
http_access allow lanhome
By default, Squid allows HTTP traffic only on specific ports (80, etc.).
Restart the proxy to take apply the modifications you made. Type:
sudo /etc/init.d/squid restart
From there, the proxy should work based upon your requirements. Just configure the software using the proxy and all should run smoothly.
The proxy logs are located in: /var/log/squid/access.log
Squid is full of options and modules:
To do this, open Synaptic, and click on Search and enter squid to find the modules related to Squid.
Consult the documentation for each module and the Squid manual for more information.
Ref: http://en.kioskea.net/faq/804-ubuntu-installing-an-http-proxy-server-squid, http://opensource.cc.psu.ac.th/