How to Install Squid Proxy Server on Linux CentOS

squid proxyIf you have bought a VPS and you want to use it as a proxy to browse internet anonymously ,  then here is a small tutorial to help you install Squid Proxy server on Linux VPS with CentOS as the operating system. This tutorial will also work on other Linux distributions that are derived from Red Hat Linux including Fedora and Red Hat Enterprise Linux and you will be able to install squid proxy server on those as well.

Step One:

Log in to your VPS as Root through Putty. Once inside the VPS , use the following command to update the OS:

yum update

Step Two:

Once you have updated the system, you need to issue the following command to install Squid proxy server:

yum install squid

This will install the latest version of Squid proxy which is presently 3.1

Step Three:

Once the Squid proxy server has been installed , we need to configure it for browsing websites through it and also to change the default port of 3128 for security purposes. We also need to perform configuration because otherwise it will not be an elite proxy and will identify itself as a proxy to the websites that we want to browse through it. For this , we need to edit the file /etc/squid/squid.conf but first we need to make a backup of this file .

sudo mv /etc/squid/squid.conf /etc/squid/squid.conf.bak

Step Four:

Now we will edit the configuration file of Squid proxy server with Nano editor for Linux. You may use any other editor of your choice but for this tutorial we are using Nano. Issue the following command:

nano /etc/squid/squid.conf

In the blank screen that opens , paste the following

http_port 2975
visible_hostname some.secure.domain
cache_effective_user squid squid
acl all src 0.0.0.0/0.0.0.0
acl localnet src 192.168.1.0/255.255.255.0
http_access allow all
header_access Via deny all
forwarded-for delete
header_access Forwarded-For deny all
header_access X-Forwarded-For deny all

where 2975 is the port number that proxy will listen on. We need to change it from the default port to increase security . some.secure.domain can be a domain of your choice. Once you have pasted the above configurations, press ctrl + x and then press Y when asked for confirmation.

Step Five:

Next we need to ensure that the squid proxy server will start with every service boot or reboot. We will create a daemon process for Squid proxy with the following command.

chkconfig squid on

Step Six:

The final step is to start the Squid proxy server with this command:

/etc/init.d/squid start

This is how to install Squid Proxy server on Linux. You can now add the proxy settings in the browser and start browsing through this elite proxy of your own. The IP address will be IP address of your VPS server and the port number will be the port that you gave in the configuration file ( in this case 2975).

 

4 Comments

  1. brandon
  2. Raz
  3. ershad
  4. CPMoon

Leave a Reply