Increase visibility into IT operations to detect and resolve technical issues before they impact your business.
Engage with our Red Hat Product Security team, access security updates, and ensure your environments are not exposed to any known security vulnerabilities. Product Security Center
Keep your systems secure with Red Hat's specialized responses to security vulnerabilities. View Responses Squid is a proxy server that caches content to reduce bandwidth and load web pages more quickly. This chapter describes how to set up Squid as a proxy for the HTTP, HTTPS, and FTP protocol, as well as authentication and restricting access.
/etc/squid/squid.conf
# yum install squid
localnet
acl localnet src 192.0.2.0/24 acl localnet 2001:db8::/32
http_access allow localnet
Important
acl localnet
443
acl SSL_ports port 443
acl SSL_ports port port_number
acl Safe_ports
acl Safe_ports port 21 acl Safe_ports port 80 acl Safe_ports port 443
http_access deny !Safe_ports
Safe_ports
cache_dir
cache_dir ufs /var/spool/squid 10000 16 256
ufs
/var/spool/squid/
10000
16
256
# mkdir -p path_to_cache_directory
# chown squid:squid path_to_cache_directory
enforcing
squid_cache_t
# semanage fcontext -a -t squid_cache_t "path_to_cache_directory(/.*)?" # restorecon -Rv path_to_cache_directory
semanage
3128
# firewall-cmd --permanent --add-port=3128/tcp # firewall-cmd --reload
squid
# systemctl start squid
# systemctl enable squid
curl
# curl -O -L "https://www.redhat.com/index.html" -x "proxy.example.com:3128"
index.html