相关文章推荐

Increase visibility into IT operations to detect and resolve technical issues before they impact your business.

Learn More Go to Insights

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.

Prerequisites

Procedure

  1. # yum install squid
  2. acl localnet src 192.0.2.0/24
    acl localnet 2001:db8::/32
  3. acl Safe_ports port 21
    acl Safe_ports port 80
    acl Safe_ports port 443
    cache_dir ufs /var/spool/squid 10000 16 256
    # mkdir -p path_to_cache_directory
  4. # chown squid:squid path_to_cache_directory
  5. # semanage fcontext -a -t squid_cache_t "path_to_cache_directory(/.*)?"
    # restorecon -Rv path_to_cache_directory
    # firewall-cmd --permanent --add-port=3128/tcp
    # firewall-cmd --reload
  6. # systemctl start squid
  7. # systemctl enable squid

Verification Steps

# curl -O -L "https://www.redhat.com/index.html" -x "proxy.example.com:3128"
 
推荐文章