Install squid3 in almalinux 9

Update all req

sudo dnf update -y

Installing Squid proxy server

sudo dnf install -y squid

Starting the squid service

sudo systemctl start squid

Check status

sudo systemctl status squid

Enabled

sudo systemctl enable squid

Config Squid

sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.bak
sudo nano /etc/squid/squid.conf
http_access deny all -> http_access allow all

Reboot service

sudo systemctl restart squid

Install httpd-tools

sudo dnf -y install httpd-tools

Create file passwords

htpasswd -c /etc/squid/passwords UserName

Config acl, add before http_access deny all

auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated

Add ports firewall

sudo firewall-cmd --add-port=33333/tcp --permanent
sudo firewall-cmd --add-service=squid --permanent
sudo firewall-cmd --reload