mocart2

squid.conf

Feb 2nd, 2022
4,841
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.68 KB | None | 0 0
  1. ❯ cat squid.conf
  2. debug_options 28,9
  3. dns_nameservers 192.168.15.1
  4. logformat squid-host %tl %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt
  5. access_log daemon:/var/log/squid/access.log squid-host
  6.  
  7.  
  8. acl localnet src 192.168.15.0/24            # RFC 1918 local private network (LAN)
  9. #========================START STANDART BLOCK======================
  10. acl SSL_ports port 443
  11. acl Safe_ports port 80          # http
  12. acl Safe_ports port 21          # ftp
  13. acl Safe_ports port 443         # https
  14. acl Safe_ports port 70          # gopher
  15. acl Safe_ports port 210         # wais
  16. acl Safe_ports port 1025-65535  # unregistered ports
  17. acl Safe_ports port 280         # http-mgmt
  18. acl Safe_ports port 488         # gss-http
  19. acl Safe_ports port 591         # filemaker
  20. acl Safe_ports port 777         # multiling http
  21. acl CONNECT method CONNECT
  22. http_access deny !Safe_ports
  23. http_access deny CONNECT !SSL_ports
  24. http_access allow localhost manager
  25. http_access deny manager
  26. #========================END STANDART BLOCK======================
  27.  
  28.  
  29. acl whitelist url_regex -i "/etc/squid/lists/whitelist"
  30. http_access allow whitelist localnet
  31.  
  32. # Последнее правило, блокирует все, что не было разрешено выше
  33. http_access deny all
  34.  
  35. # Порт для HTTP трафика (если указываем вручную)
  36. http_port 3128
  37. # Прозрачный порт для HTTP трафика
  38. http_port 3129 intercept
  39. # Порт для HTTPS трафика (если указать intercept, то будет прозрачным)
  40. 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
  41.  
  42. always_direct allow all
  43. sslproxy_cert_error allow all
  44.  
  45. acl whitelist_ssl ssl::server_name_regex "/etc/squid/lists/whitelist"
  46. acl step1 at_step SslBump1
  47. ssl_bump peek step1
  48. ssl_bump bump all
  49.  
  50. sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/lib/squid/ssl_db -M 4MB
  51. refresh_pattern ^ftp:           1440    20%     10080
  52. refresh_pattern ^gopher:        1440    0%      1440
  53. refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
  54. refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
  55. refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
  56. refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
  57. refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
  58. # example pattern for deb packages
  59. #refresh_pattern (\.deb|\.udeb)$   129600 100% 129600
  60. refresh_pattern .               0       20%     4320%
Advertisement
Add Comment
Please, Sign In to add comment