Squid 使用AD認證


配置文件以下:sql

  
  
  
  
  1. http_port 8080 bash

  2. #auth ldap ide

  3. auth_param basic program /usr/local/squid/libexec/basic_ldap_auth -R -b "dc=test,dc=net" -D "cn=Administrator,cn=Users,dc=test,dc=net" -w "xxxx" -f sAMAccountName=%s -h 192.168.1.8 ui

  4. #192.168.1.8 是AD; administrator和xxxx是此AD的用戶名和密碼 spa

  5. auth_param basic children 5 .net

  6. auth_param basic realm test.net string

  7. auth_param basic credentialsttl 5 minutes it

  8. acl test proxy_auth REQUIRED class

  9. http_access allow test test

  10. acl CONNECT method CONNECT

  11. redirect_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf

  12. cache_dir ufs /usr/local/squid/var/cache/squid 1024 16 256

  13. coredump_dir /usr/local/squid/var/cache/squid

  14. refresh_pattern ^ftp:           1440    20%     10080

  15. refresh_pattern ^gopher:        1440    0%      1440

  16. refresh_pattern -i (/cgi-bin/|\?) 0     0%      0

  17. refresh_pattern .               0       20%     4320

  18. cache_effective_user squid

  19. cache_effective_group squid

  20. visible_hostname Firewall



若是要在squidGuard裏啓用LDAP認證,那squid裏首先得啓用LDAP認證.

具體代碼就按官方的(刪除了CN=...)


ldap://ldap.example.net/cn=administrator,ou=People,dc=example,dc=net?memberUid?sub(&(objectclass=posixGroup)(memberUid=%s))
相關文章
相關標籤/搜索