Skip to content

Instantly share code, notes, and snippets.

@KrustyHack
Last active June 10, 2020 11:31
Show Gist options
  • Select an option

  • Save KrustyHack/1cad537e77f93d5f5f6fadce345a1146 to your computer and use it in GitHub Desktop.

Select an option

Save KrustyHack/1cad537e77f93d5f5f6fadce345a1146 to your computer and use it in GitHub Desktop.
Squid Proxy Linux
mkdir -p /var/cache/squid3
chown -R proxy:proxy /var/cache/squid3
systemctl restart squid.service
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
ens3:
dhcp4: true
match:
macaddress: MACADRESS
set-name: ens3
addresses:
- FAILOVERIP/32
version: 2
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
# Squid normally listens to port 3128
http_port SERVERIP:3128 name=3128
acl a myportname 3128
http_access allow a
tcp_outgoing_address IPFAILOVER a
access_log /var/log/squid/squid3_access.log
cache_dir ufs /var/cache/squid3 70000 16 256
forwarded_for off
request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment