install squid proxy server
How to Install install squid proxy server on Centos 7 and RHEL 7 (Linux)

How to Install Squid Proxy Server on RHEL / Centos 7

This Tutorial is about How to Install Squid proxy server on Centos 7 or RHEL 7 (Linux) (Proxy and Caching). Squid is a Proxy server as well as Caching server which sits between two endpoint devices (Client and server) & acts as a intermediate device.

Squid Proxy Server Working

When Client Computer Requests resource from the server (It may be for file/web page). the request is send to the proxy server first. Then the proxy server sends the request to the destination server & obtains the resource send by the server. When the resource is obtained by the proxy server it sends the resource to the client machine. The use of Proxy server is for Blocking the web pages and caching the resources.

Example : If one user is visited Facebook, YouTube or any other website for the first time then next time another user will get content of that website from Squid server cache, it can now serve the web page directly to the user. A Proxy Server can be used to facilitate security, administration controls and caching services. Proxy servers can also be used for anonymity as whenever obtaining a resource from a server, proxy server uses it’s own IP address rather than the client’s IP Address.

Squid Proxy is an free proxy server (Open Source) caching proxy for the web. It Supports many Protocol like HTTP, HTTPS, FTP and many more. It improves the response time and reduces bandwidth by caching and reusing the frequently accessed web pages and files. In this tutorial we will learn to install squid Proxy on Centos 7.

How to Install Squid Proxy Server

  1. Check whether in your server there is any SQUID Package is installed / Not.

2. If Squid is Not Installed on your server. Install Squid Proxy :

3. After Installing Squid, Start squid :

To Start Squid Automatically after reboot:-

To Check Status of Squid:-

Sample Output:

4. Check your firewalld is running status.

Start firewalld

Then Add Squid port & you can also add service to firewalld using the following command.

  • Squid port – 3128
  • Service name – squid

After adding the Port or Service in Firewalld, Reload firewall to make changes using this command.

List Recently Added Port / Service

Sample Output:

5. Check squid port running status with the help of port Number.

6. Now, Check your ip with the following command & remember this IP.

7. Now, Open Browser and click on “Settings“.

Install Squid
squid Installation : Open Browser

Search for “Proxy Settings” and open it.

Install Squid
squid Installation : Search “Open Proxy Settings”

Go to “Connections” and Click on “LAN Settings

Install Squid
squid Installation : Open Browser

Now, Take a Look on Proxy Container & click on “Use a proxy server for your LAN” Checkbox & then Type IP address in “Addresses” block and add “port” in Port Block & then click on “OK“.

Install Squid
squid Installation : LAN Settings

Final Step is to Click on “OK” to finish the configuration of browser.

install squid
squid Installation : Browser Configuration Finish

Now, All configuration part is Over, It’s time to Test Squid Server.

Test Squid Proxy Server

8. Open chrome browser & Type any website, In my case i’m trying “”. [Note: Make sure that Squid server is running]

Preview 1 : (Squid Server is in Running State)

Install Squid in centos
Test Squid by visiting any Website

As you can see all website running. The Reason is squid is running on a server.

Check what happen if we stop Squid server.

Preview 2 : (Squid Server is NOT Running)

Install Squid in centos
Stop Squid server & Test Squid by visiting any Website.

As you can see we can’t able to visit any website after stopping squid server that means we successfully Configured Squid Proxy server.

That’s it, This is all about How to Install Squid Proxy Server on Linux (RHEL / Centos 7). If you want to ask any question about this Tutorial comment Below and always Remember to stay connected with the for Latest updates about the Linux.


Please enter your comment!
Please enter your name here