Advertisement
cyanohumanos

squid.conf openwrt

Mar 12th, 2013
3,232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. pid_filename /var/run/squid.pid
  2.  
  3. #cache_effective_user root
  4. cache_effective_group nogroup
  5. cache_mgr arifstwn
  6. visible_hostname fusion
  7.  
  8. # These default to lru if commented. Broken on '2.6'? (squid 2.6? Kernel 2.6?)
  9. #cache_replacement_policy heap LFUDA
  10. #memory_replacement_policy LFUDA
  11.  
  12. ipcache_size 2048
  13. cache_swap_low 90
  14. cache_swap_high 95
  15. maximum_object_size_in_memory 100 KB
  16.  
  17. # If you have 64/8MB Router you can use 16MB cache_mem. If smaller, use 8MB ram. Any less, no worky well.
  18. cache_mem 16 MB
  19.  
  20. # cache_dir: change it if you want. 100 meams 100MB cache size.
  21. cache_dir ufs /mnt/sda3/squid/squid-cache 6000 16 256
  22.  
  23. logfile_rotate 10
  24. fqdncache_size 2048
  25. memory_pools off
  26. maximum_object_size 16384 KB
  27. quick_abort_min 0 KB
  28. quick_abort_max 0 KB
  29. log_icp_queries off
  30. client_db off
  31. buffered_logs on
  32. half_closed_clients off
  33. negative_dns_ttl 10 second
  34. connect_timeout 60 second
  35. read_timeout 80 second
  36. request_timeout 80 second
  37.  
  38. # Logs, goes to USB stick
  39. cache_access_log /mnt/sda3/squid/log/squid-access.log
  40. cache_log /mnt/sda3/squid/log/squid-debug.log
  41. cache_store_log /mnt/sda3/squid/log/squid-storage.log
  42.  
  43. # Logs, goes into openwrt's existing log folder.
  44. #cache_access_log /var/log/squid-access.log
  45. #cache_log /var/log/squid-debug.log
  46. #cache_store_log /var/log/squid-storage.log
  47.  
  48.  
  49. hierarchy_stoplist on
  50.  
  51. # Our internal IP and listen port
  52. http_port 192.168.2.1:3128 transparent
  53.  
  54. # Global ACL-Definitions (Access control lists)
  55. acl idents ident REQUIRED
  56. acl manager proto cache_object
  57. acl localhost src 127.0.0.1/255.255.255.255
  58. acl all src 0.0.0.0/0.0.0.0
  59. acl intern dst 192.168.2.0/24
  60. acl FTP proto FTP
  61. always_direct allow FTP
  62.  
  63. # Allowed External Ports and Internal Lan IPs
  64. acl Allowed_Ports port 80 99 443 21 563 488 777 210 1025-65535
  65. acl yourLAN src 192.168.2.0/24
  66.  
  67. #http_access definition
  68. http_access allow idents
  69. http_access allow all
  70. http_access allow intern
  71. http_access deny manager all
  72. http_access allow yourLAN
  73. http_access deny all
  74. icp_access deny all
  75. miss_access allow all
  76. always_direct allow intern
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement