Did You Know?

How Can We Help?

Special Offer

Deploy your Cloud Server now and get $100 in Free Credits!

Get Started

How to Install Squid Proxy Server on CentOS

Table of Content


  • CentOS operating system
  • Access to a terminal window/command-line (Ctrl-Alt-T)
  • A CentOS user with root or sudo priviledges
  • The yum package installer, included by default
  • A text editor, such as vim

Let's begin the installation.

Login to your server via Putty.

Step 1: Refresh CentOS Software Repositories

[console] sudo yum -y update [/console]

Step 2: Install Squid Package on CentOS

[console] yum -y install squid [/console]

Now start Squid by entering the following command:

[console] systemctl start squid [/console]

To set up an automatic start at boot:

[console] systemctl enable squid [/console]

Review the status of the service, use:

[console] systemctl status squid [/console]

In the example below, we see that the state is ‘Active.’

Configuring the Squid Proxy Server

The Squid configuration file is found at /etc/squid/squid.conf.

1. Open the file in your preferred text editor (vim was used in this example}:

[console] sudo vi /etc/squid/squid.conf [/console]

2. Navigate to find the http_port option. Typically, this is set to listen on Port 3218. This port usually carries TCP traffic. If your system is configured for traffic on another port, change it here:

You may also set the proxy mode to transparent if you’d like to prevent Squid from modifying your requests and responses.

Change it as follows:

[console] http_port 1234 transparent [/console]

3. Navigate to the http_acacess deny all option.

It is currently configured to block all HTTP traffic, and no web traffic is allowed as shown below.

Change this to the following:

[console] http_access allow all [/console]

4. Restart the Squid service by entering:

[console] sudo systemctl restart squid [/console]

Squid Proxy Server successfully installed.

Thank You!

Special Offer

Deploy your Cloud Server now and get $100 in Free Credits!

Get Started
Table of Contents