Procedure:Setting up update proxy

From OACISS Systems Wiki
Jump to navigation Jump to search

Client setup

The client setup for use of a Squid proxy is remarkably simple. YUM and APT natively support use of it through a single modified configuration line.

Current, Cerberus is configured to provide local proxying services to its 10.0.0.0/8 network and to 128.223.202.0/24 (i.e. the PRL).

Ubuntu 16

Add to /etc/apt/apt.conf.d/01-vendor-ubuntu (or presumably, whatever file here),

   Acquire::http::Proxy "http://hostname:3128/";

CentOS/RedHat

/etc/yum.conf:

   proxy=http://10.0.0.1:3128/


Server setup

After installing SQUID 3 (yum install squid), /etc/squid/squid.conf see Cerberus

Notable lines:

   refresh_pattern ^ftp:           1440    20%     10080
   refresh_pattern ^gopher:        1440    0%      1440
   refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
   refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
   refresh_pattern (Release|Packages(.bz2)*)$      0       20%     2880
   refresh_pattern .               0       20%     4320
   refresh_all_ims on

- Need to proxy both gz and bz2, different distros use different ones - make certain that Squid ACLs deny access to anything other than our network!