In a view simple steps you can setup a proxy-server based on Squid.

1. Installing Squid


apt-get install squid

to install squid.


2. Generate password file

First generate a passwd file for your user and password. Got to a directory of choice like /etc/squid3 and run the following command:

htpasswd -c passwd username

You get ask for your password. Enter your password twice and your passwd will be created.


3. Squid Configuration ( /etc/squid/squid.conf )

Go to /etc/squid3 and rename the existing squid.conf file to squid.conf.original and create a new empty squid.conf file with nano, vi or a editor of your choice.

nano suqid.conf


Then enter the following commands:

auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid3/passwd
acl password proxy_auth REQUIRED
http_access allow password


If you like to change the port of squid insert the following:

http_port 3128 #default port of squid 3128


4. Restart Squid

To restart squid after you have done the configuration you can use:
/etc/init.d/squid restart

or in newer versions of Ubuntu use:

service squid3 restart

That's it! Now you can use the proxy like any other proxy server! Also you can connect to devices in your local network where your proxy server is running!


5. Use your proxy server

Now after the installation you want to use your proxy server. For that you can insert the proxy in you network configuration or you can directly use the proxy configuration of your browser.

For firefox it looks like this: