FedoraRHEL Based

How To Install Squid Proxy Cache on Fedora 39

Install Squid Proxy Cache on Fedora 39

In this tutorial, we will show you how to install Squid Proxy Cache on Fedora 39. Squid Proxy Cache is an open-source, high-performance caching proxy server designed to optimize web content delivery, reduce bandwidth usage, and improve response times. It supports various protocols, including HTTP, HTTPS, FTP, and more. Squid is widely used by businesses, educational institutions, and internet service providers to enhance their network performance and security.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Squid Proxy Cache on a Fedora 39.


Before diving into the installation process, let’s ensure that you have everything you need:

  • A server running one of the following operating systems: Fedora 39.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • Basic knowledge of Linux commands and text editors is necessary. Familiarity with the command-line interface (CLI) and understanding of network protocols can be beneficial.
  • A stable internet connection is also required for package installation.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Squid Proxy Cache on Fedora 39

Step 1. Keeping your Fedora 39 LTS system up-to-date ensures that you have the latest security patches, bug fixes, and software enhancements. An updated system reduces the risk of potential issues during the Squid installation process. To update your Fedora system, open the terminal and type the following command:

sudo dnf clean all
sudo dnf update

Step 2. Installing Squid Proxy Cache on Fedora 39.

In the terminal, type the following command to install Squid:

sudo dnf install squid

Enter your password when prompted, and press Y to confirm the installation.

After the installation is complete, check the Squid version by executing:

squid -v

You should see the Squid version number and build information displayed in the terminal.

Step 3. Configuring Squid Proxy Cache.

The primary configuration file for Squid is squid.conf, located in the /etc/squid/ directory. This file contains various settings and directives that control Squid’s behavior, such as listening ports, access control lists, and caching policies.

Open the configuration file with a text editor, such as nano:

sudo nano /etc/squid/squid.conf

By default, Squid listens on port 3128. To change the listening port, locate the http_port directive and modify the port number. For example, to set the listening port to 8080, update the line as follows:

http_port 8080

 Access Control Lists (ACLs) define rules for granting or denying access to specific resources. To create an ACL, use the acl directive followed by a unique name, the ACL type, and any required arguments. For example, to allow access from the local network with the IP range, add the following lines:

acl localnet src

 The http_access directive controls client access to the proxy based on defined ACLs. To allow access for the localnet ACL created earlier, add the following line:

http_access allow localnet

 Ensure that the http_access deny all line is present at the end of the configuration file to deny access for any undefined ACLs.

To save your changes in nano, press Ctrl + X, then Y, and finally Enter. If you are using vi, press Esc, type :wq, and press Enter.

After configuring Squid, restart the service to apply the changes:

sudo systemctl restart squid

Step 4. Test the Squid Proxy Cache.

To test the proxy, configure your web browser or another application to use the Squid proxy server’s IP address and listening port. For example, if your proxy server’s IP address is and the listening port is 8080, enter these values in your application’s proxy settings.

To verify that Squid is functioning correctly, access a website or download a file through the proxy. If the content loads successfully, Squid is working as expected. You can also check the Squid access log at /var/log/squid/access.log to confirm that client requests are being processed.

Congratulations! You have successfully installed Squid. Thanks for using this tutorial for installing the Squid Proxy Cache on your Fedora 39 system. For additional Apache or useful information, we recommend you check the official Squid Proxy website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button