Squid-Proxy Server

A proxy server can be viewed as an application which acts as a medium sending client requests and making use of resources from other servers.

Why Squid Proxy Server is popular?

Consider the following diagram:

  • Cache

For instance the latest version of Ubuntu must be installed on a single CPU for the first time.This computer will go through the proxy server then through the router and then the internet.It could possibly take about 40 minutes for the installation with a good internet connection.

Suppose the next computer also must download Ubuntu’s latest version,in any normal configuration there would be NAT (Network Address Translation) and it would take another 30-40 minutes and a lot of bandwidth and time.But with the help of Squid proxy server you have a Cache .So now if the second computer goes to download Ubuntu’s latest version the proxy server will see it aldready has a local copy of the Ubuntu Os.Hence no internet connection will be required ,local transfer will take place resulting in high speed.

  • Access Control List

Using Squid Proxy,the administrator can have the control of which users are allowed to access which web pages
First you need to define certain criteria like accesses from the marketing department or accesses to google.com or need to authenticate.

Syntax : acl name type definition1 definition2 definition3…

Examples: 1)accesses_to_google dstdomain.google.com

  • Web Filters

A web filter is viewed as a certain code which screens a webpage to see if it is legitimate to be viewed to the user.This filter checks the contents of the code and compares it to certain protocols which have been set by the organisation.It allows blocking of illegal webpages at an enterprise level which may contain pornographic content,unhealthy advertisements etc. A Squid Proxy Server allows to bypass these web filters by making use of the proxyfy.com

However if this site fails you can directly connect the computer to the proxy server.The proxy server will then access the website and this information can then be viwed on the computer

Installation and Configuration of Squid Proxy Server:

Step 1:The installation Of Squid is done by the command line therefore,Open the terminal.From terminal window issue the following command.Use the sudo prefix to run commands as an administrator.

sudo apt-get install squid

Step 2: Go To Firefox->Preferences->Settings)->HTTP Proxy Server.In this case HTTP Proxy is the IP address of the machine.Go back to the terminal and type ipconfig. Here IP address of the machine is 10.0.215.By default squid listens on Port 3128.

Step 3:If you now type Google.com it displays an error Access Denied.If you get this message it means squid is working.

Step 4:To configure Squid use the command:

sudo gedit/etc/squid/squid.conf

Go to edit>Preferences>Display line numbers

Step 5:To Deny access to websites like facebook and twitter enter the following:

Step 7:Every time you make a change in a configuration file, squid must be restarted.

Step 8:Go To Firefox.Go to google.com.You will observe that you successfully reach google but if you go to facebook you get an error message which means your proxy server is working.

Leave a comment