Squid 使用AD认证

简介:

配置文件如下:

 
 
  1. http_port 8080

  2. #auth ldap

  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

  4. #192.168.1.8 是AD; administrator和xxxx是此AD的用户名和密码

  5. auth_param basic children 5

  6. auth_param basic realm test.net

  7. auth_param basic credentialsttl 5 minutes

  8. acl test proxy_auth REQUIRED

  9. http_access allow 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=...)


1
ldap: //ldap .example.net /cn =administrator,ou=People, dc =example, dc =net?memberUid?sub(&(objectclass=posixGroup)(memberUid=%s))




本文转自 nonono11 51CTO博客,原文链接:http://blog.51cto.com/abian/1162210,如需转载请自行联系原作者
相关文章
|
网络协议 数据安全/隐私保护 Windows
|
2月前
|
负载均衡 应用服务中间件 nginx
nginx配置kibana访问用户名和密码认证、及无认证访问配置
nginx配置kibana访问用户名和密码认证、及无认证访问配置
107 0
|
应用服务中间件 nginx 数据安全/隐私保护
|
监控 测试技术 PHP
【Zabbix】Zabbix对接AD域
需要的信息:一个域账号密码,使用的端口;域名 1、先查看php是否安装了ldap模块 php –m (查看已安装的php模块)   若没有安装请参照“在已编译安装的PHP环境下安装LDAP模块”。
2855 0
|
应用服务中间件 网络安全 nginx