Skip to content

Instantly share code, notes, and snippets.

@kazusato
Last active January 9, 2020 21:54
Show Gist options
  • Select an option

  • Save kazusato/0399c7c6bb7c9a70efd33dcc61e0adcd to your computer and use it in GitHub Desktop.

Select an option

Save kazusato/0399c7c6bb7c9a70efd33dcc61e0adcd to your computer and use it in GitHub Desktop.
Enable squid to use multiple IP addesses
http_port 3128
acl group_a myip 10.0.2.101/32
acl group_o myip 10.0.2.102/32
tcp_outgoing_address 10.0.2.101 group_a
tcp_outgoing_address 10.0.2.102 group_o
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl NOCACHE src all
http_access allow localhost manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow localnet
http_access deny all
cache deny NOCACHE
dns_nameservers 8.8.8.8 208.67.222.222
max_filedescriptors 3200
@kazusato
Copy link
Author

kazusato commented Jan 9, 2020

To disable logging, add following lines to squid.conf. See
https://wiki.squid-cache.org/SquidFaq/SquidLogs#How_can_I_disable_Squid.27s_log_files.3F
for details.

access_log none
cache_store_log none
cache_log /dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment