squid.conf
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
squid.conf
vor dem ersten Start oder bei CFG-Änderungen muss dieser Befehl aufgerufen werden:
> squid -z > squid -z -f /etc/squid/squid.conf
minimal
# ### Erlaubniss-Definitionen acl MANAGER proto cache_object acl LOKAL src 127.0.0.1/255.255.255.255 acl ALL src 0.0.0.0/0.0.0.0 acl ERLAUBT src 192.168.1.0/255.255.255.0 # ### Erlaubniss-Regeln # alle dürfen alles http_access allow ALL # # nur einige dürfen alles http_access allow ERLAUBT # # der Rest darf nichts http_access deny ALL # icp_access allow ALL # ### unser Proxy-Port http_port 3128 # ### weiteres access_log /var/log/squid/access.log squid hosts_file /etc/hosts coredump_dir /tmp
standard
# ### Erlaubniss-Definitionen acl MANAGER proto cache_object acl LOKAL src 127.0.0.1/255.255.255.255 acl ALL src 0.0.0.0/0.0.0.0 acl ERLAUBT src 192.168.1.0/255.255.255.0 # ### Erlaubniss-Regeln # alle dürfen alles http_access allow ALL # # nur einige dürfen alles http_access allow ERLAUBT # # der Rest darf nichts http_access deny ALL # icp_access allow ALL # ### unser Proxy-Port http_port 3128 # ### weiteres cache_mem 2048 MB # # Cache-Verzeichnis soll nur max. 10 GB groß werden # cache_dir ufs Directory-Name Mbytes L1 L2 [options] cache_dir ufs /var/spool/squid 10240 16 256 #cache_dir null /var/spool/squid # access_log /var/log/squid/access.log squid hosts_file /etc/hosts # memory_pools_limit 1024 MB coredump_dir /tmp
https proxy für große dateien mit lan zugriff
acl private_networkdefiniert die lokalen ipv6 & ipv4 netze (ip ranges)http_access allow private_networkwhitelisted die vorher definierte aclhttp_access deny allam ende verbietet alles was bisher noch nicht gematched wurde (verwandelt sozusagen allehttp_access allowzeilen in whitelist einträge)https_port 3128 tls-cert=fullchain.pem tls-key=privkey.pemlistened auf port 3128 als https proxy mit einem letsencrypt zertifikat (fullchain ist das vollständige zertifikat und privkey der private key)cache_dir aufs /var/spool/squid 50000 16 256setzt das cache dir mit dem speichertyp aufs (ufs aber moderner und non blocking), 50gb größe, 16 sub dirs 1. grades, 256 sub dirs 2. grades
- /etc/squid/squid.conf
include /etc/squid/conf.d/*.conf shutdown_lifetime 10 seconds acl private_network src fe80::/10 # rfc 4291 link local (ipv6) acl private_network src 169.254.0.0/16 # rfc 3927 link local (ipv4) acl private_network src fc00::/7 # rfc 4193 unique local (ipv6) acl private_network src 10.0.0.0/8 # rfc 1918 private (ipv4) acl private_network src 172.16.0.0/12 # rfc 1918 private (ipv4) acl private_network src 192.168.0.0/16 # rfc 1918 private (ipv4) acl safe_ports port 80 # http acl safe_ports port 443 # https acl secure_ports port 443 http_access deny !safe_ports http_access deny CONNECT !secure_ports http_access allow localhost manager http_access deny manager http_access allow localhost http_access allow private_network http_access deny to_localhost http_access deny to_linklocal http_access deny all #http_port 3128 https_port 3128 tls-cert=fullchain.pem tls-key=privkey.pem coredump_dir /var/spool/squid cache_dir aufs /var/spool/squid 50000 16 256 minimum_object_size 100 MB maximum_object_size 10 GB maximum_object_size_in_memory 1 GB
/home/http/wiki/data/attic/squid.conf.1721360241.txt · Zuletzt geändert: von david
