• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install and configure squid on RedHat 8.5

  • 00:03 cat /etc/os-release
  • 00:20 yum install squid*
  • 00:45 vim /etc/squid/squid.conf
  • 01:37 vi /blocklist.txt
  • 02:25 vi /etc/squid/squid.conf
  • 04:24 systemctl enable squid
  • 04:36 systemctl start squid
  • 04:47 systemctl status squid
  • 05:00 ip addr
{{postValue.id}}

To Install And Configure Squid on REDHAT 8.5

Introduction

A proxy server is a system or router that acts as a gateway between users and the Internet. As a result, it prevents cyber attackers from entering a private network. Essentially, it is a server that acts as an intermediary between end-users and the web pages they visit online. Squid is a full-featured web proxy cache server application that connects to Hyper Text Transport Protocol (HTTP), File Transfer Protocol (FTP), and other popular protocols to provide proxy and cache services.

Installation procedure:

Step 1 : Check the Installed version of OS by using the below command

[root@linuxhelp /]# cat /etc/os-release 
NAME="Red Hat Enterprise Linux"
VERSION="8.5 (Ootpa)"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.5"

Step 2 : Install the squid by using the below command

[root@linuxhelp /]# yum install squid*
Updating Subscription Management repositories.
Unable to read consumer identity
Installing:
 squid                  x86_64        7:4.15-1.module+el8.5.0+11469+24c223d9        1        3.6 M

perl-Digest-SHA        x86_64        1:6.02-1.el8                                  1         66 k
Transaction Summary
==============================================
Install  3 Packages
Is this ok [y/N]: y
Complete!		

Step 3 : Allow HTTP access by using the below command

[root@linuxhelp /]# vim /etc/squid/squid.conf
:set nu  in this case line number 63
	# And finally deny all other access to this proxy
     	http_access allow all

Step 4 : Create the block list of the sites by using the below command

[root@linuxhelp /]# vi /blocklist.txt
www.facebook.com
www.amazon.com

Step 5 : Open the configuration file and create some rules by using the below command

[root@linuxhelp /]# vi /etc/squid/squid.conf
:set nu  in this case line number 51 to 54
iprange src 192.168.6.0/24

acl site dstdomain "/blocklist.txt"
http_access deny iprange site
http_access allow iprange

Step 6 : Enable the squid services by using the below command

[root@linuxhelp /]# systemctl enable squid
Created symlink /etc/systemd/system/multi-user.target.wants/squid.service → /usr/lib/systemd/system/squid.service.

Step 7 : Start the squid services by using the below command

[root@linuxhelp /]# systemctl start squid

Step 8 : Check the status of squid server by using the below command

[root@linuxhelp /]# systemctl status squid
● squid.service - Squid caching proxy
 Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled)
 Active: active (running) since Fri 2022-04-15 11:45:21 IST; 11s ago

Step 9 : Check the IP address by using the below command

[root@linuxhelp /]# ip addr

2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500        inet 192.168.6.121/23 brd 192.168.7.255 scope global noprefixroute ens160	

Step 10 : Go to your favorite browser, set proxy and check the links as shown in the below images set proxy snap 1 check youtube.com snap 2 check facebook.com snap 3 check amazon.com snap 4

By this to install and configure squid on REDHAT 8.5 has been completed

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the default port of squid?

A

The default port of squid is 3218

Q

What is the configuration location for squid?

A

The configuration location for squid is /etc/squid/squid.conf

Q

In which file format does Squid store data?

A

Squid stores data in ufs format, the old well-known Squid storage format.

Q

Where does cache gets stored by squid?

A

Squid stores its cache in /var/spool/squid

Q

What is the command to start service squid?

A

The command to start service squid is systemctl start squid

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help keel johnston ?
Unhide the folders on windows Explorer

Give any solutions to unhide folder using command prompt?

forum3

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.