Don't like ads? PRO users don't see any ads ;-)
Guest

squid_ricardp

By: a guest on May 7th, 2012  |  syntax: Bash  |  size: 3.10 KB  |  hits: 45  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #
  2. # Recommended minimum configuration:
  3. #
  4. acl manager proto cache_object
  5. acl localhost src 127.0.0.1/32 ::1
  6. acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
  7.  
  8. # Example rule allowing access from your local networks.
  9. # Adapt to list your (internal) IP networks from where browsing
  10. # should be allowed
  11. acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
  12. acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
  13. acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
  14. acl localnet src fc00::/7       # RFC 4193 local private network range
  15. acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
  16.  
  17. acl blockeddomain dstdomain "/etc/squid/blocked_sites.acl"
  18. #acl blocksites dstdomain .record.xl.pt
  19. #acl blocksites dstdomain .record.pt
  20.  
  21. acl Safe_ports port 22
  22. acl SSL_ports port 443
  23. acl Safe_ports port 80          # http
  24. acl Safe_ports port 21          # ftp
  25. acl Safe_ports port 443         # https
  26. # acl Safe_ports port 70                # gopher
  27. # acl Safe_ports port 210               # wais
  28. # acl Safe_ports port 1025-65535        # unregistered ports
  29. # acl Safe_ports port 280               # http-mgmt
  30. # acl Safe_ports port 488               # gss-http
  31. # acl Safe_ports port 591               # filemaker
  32. # acl Safe_ports port 777               # multiling http
  33. acl CONNECT method CONNECT
  34.  
  35. http_access deny CONNECT !SSL_ports
  36. http_access deny blockeddomain
  37. #http_access deny blocksites
  38.  
  39. acl MSN_ports port 1863 443 1503
  40. acl MSN_domains dstdomain .microsoft.com .hotmail.com .live.com .msft.net .msn.com .passport.com
  41. acl MSN_hosts dstdomain messenger.hotmail.com
  42. acl MSN_nets dst 207.46.111.0/255.255.255.0
  43. acl MSN_methods method CONNECT
  44. http_access allow MSN_methods MSN_ports MSN_hosts
  45.  
  46.  
  47. #
  48. # Recommended minimum Access Permission configuration:
  49. #
  50. # Only allow cachemgr access from localhost
  51. http_access allow manager localhost
  52. http_access deny manager
  53.  
  54. # Deny requests to certain unsafe ports
  55. http_access deny !Safe_ports
  56.  
  57. # Deny CONNECT to other than secure SSL ports
  58. http_access deny CONNECT !SSL_ports
  59.  
  60. # We strongly recommend the following be uncommented to protect innocent
  61. # web applications running on the proxy server who think the only
  62. # one who can access services on "localhost" is a local user
  63. #http_access deny to_localhost
  64.  
  65. #
  66. # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
  67. #
  68.  
  69. # Example rule allowing access from your local networks.
  70. # Adapt localnet in the ACL section to list your (internal) IP networks
  71. # from where browsing should be allowed
  72. http_access allow localnet
  73. http_access allow localhost
  74.  
  75. # And finally deny all other access to this proxy
  76. http_access deny all
  77.  
  78. # Squid normally listens to port 3128
  79. http_port 3128
  80.  
  81. # We recommend you to use at least the following line.
  82. hierarchy_stoplist cgi-bin ?
  83.  
  84. # Uncomment and adjust the following to add a disk cache directory.
  85. #cache_dir ufs /var/spool/squid 100 16 256
  86.  
  87. # Leave coredumps in the first cache dir
  88. coredump_dir /var/spool/squid
  89.  
  90. # Add any of your own refresh_pattern entries above these.
  91. refresh_pattern ^ftp:           1440    20%     10080
  92. refresh_pattern ^gopher:        1440    0%      1440
  93. refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
  94. refresh_pattern .               0       20%     4320