Advertisement
moemyintshein

Squid Proxy Configuration

Feb 20th, 2017
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Squid Proxy Server
  2. --------------------
  3.  
  4. #yum install squid
  5. #vi /etc/squid/squid.conf
  6.  
  7. http_port 8080
  8. cache_mem 100 MB
  9. cache_dir /../../
  10. acl NetA src 172.10.0.1/24
  11. acl NetB src 172.19.1.1/24
  12. http_access allow NetA
  13. http_access allow NetB
  14. dns_nameservers 8.8.8.8 8.8.4.4
  15. always_direct allow NetA NetB
  16. never_direct allow NetA NetB
  17.  
  18. cache_peer 2.2.2.2 parent 4040 0 default no-query /*if use 2 step proxy*/
  19.  
  20. /*NCSA_users config*/
  21.  
  22. #htpasswd -c /etc/squid/passwd username
  23. #chmod o+r /etc/squid/passwd
  24. #rpm -ql squid | grep ncsa_auth
  25. #vi /etc/squid/squid.config
  26.  
  27. auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/passwd
  28. auth_param basic children 5
  29. auth_param basic realm Squid proxy-caching web server
  30. auth_param basic credentialsttl 2 hours
  31. auth_param basic casesensitive off
  32.  
  33. acl ncsa_users proxy_auth REQUIRED
  34. http_access allow ncsa_users
  35.  
  36. /*banning domains*/
  37.  
  38. acl ban_domains dstdomain .facebook.com .youtube.com
  39. http_access deny CONNECT ban_domains /*CONNECT for https*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement