Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ❯ cat squid.conf
- debug_options 28,9
- dns_nameservers 192.168.15.1
- logformat squid-host %tl %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt
- access_log daemon:/var/log/squid/access.log squid-host
- acl localnet src 192.168.15.0/24 # RFC 1918 local private network (LAN)
- #========================START STANDART BLOCK======================
- 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
- acl CONNECT method CONNECT
- http_access deny !Safe_ports
- http_access deny CONNECT !SSL_ports
- http_access allow localhost manager
- http_access deny manager
- #========================END STANDART BLOCK======================
- acl whitelist url_regex -i "/etc/squid/lists/whitelist"
- http_access allow whitelist localnet
- # Последнее правило, блокирует все, что не было разрешено выше
- http_access deny all
- # Порт для HTTP трафика (если указываем вручную)
- http_port 3128
- # Прозрачный порт для HTTP трафика
- http_port 3129 intercept
- # Порт для HTTPS трафика (если указать intercept, то будет прозрачным)
- https_port 3130 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=20MB tls-cert=/etc/squid/ssl/proxyCA.pem tls-key=/etc/squid/ssl/proxyCA.pem cipher=HIGH:MEDIUM:!LOW:!RC4:!SEED:!IDEA:!3DES:!MD5:!EXP:!PSK:!DSS options=NO_TLSv1,NO_SSLv3 tls-dh=prime256v1:/etc/squid/bump_dhparam.pem
- always_direct allow all
- sslproxy_cert_error allow all
- acl whitelist_ssl ssl::server_name_regex "/etc/squid/lists/whitelist"
- acl step1 at_step SslBump1
- ssl_bump peek step1
- ssl_bump bump all
- sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/lib/squid/ssl_db -M 4MB
- refresh_pattern ^ftp: 1440 20% 10080
- refresh_pattern ^gopher: 1440 0% 1440
- refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
- refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
- refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
- refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
- refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
- # example pattern for deb packages
- #refresh_pattern (\.deb|\.udeb)$ 129600 100% 129600
- refresh_pattern . 0 20% 4320%
Advertisement
Add Comment
Please, Sign In to add comment