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

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) and acts as a intermediate device.

Many Peoples don’t know How Squid Works. So basically, When a Client Computer Requests a resource from the server, it may be for file or a web page the request is send to the proxy server first. Then the proxy server sends the request to the destination server and obtains the resource send by the server. Once 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. For 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 Open Source caching proxy for the web. It Supports many Protocols such as 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. First of all Check whether in your server there is any SQUID Package is installed or not using the following command.

2. If package is not installed on your server then you can install Squid Proxy using the following command.

3. Once squid is installed, you can start squid using the following command.

To Start Squid Automatically after reboot:-

To Check Status of Squid:-

Sample Output:

4. Check your firewalld is running or not with this command

If Firewalld is not running/active then start it with this command.

Then Add Squid port or 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.

To confirm port or service is added into firewall or not. Type the following command.

Sample Output:

5. Check whether squid port is running or not with this following command.

6. Now, Check your ip with the following command and 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, Go to Proxy Container and click on “Use a proxy server for your LAN” Checkbox and then Type IP address in “Addresses” block and add “port” in Port Block and 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. Go to Homepage of chrome browser and then type any website name like “”. [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. Because, squid is running on a server.

so, Let’s check whether all websites is accessing or not after stopping Squid server. for that type the following command.

Preview 2 : (Squid Server is NOT Running)

Install Squid in centos
Test Squid by visiting any Website : Squid server is stopped

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