Ubuntu 16.04安装squid http代理,ldap认证配置

发表时间:2018-10-17 15:28 | 分类:Linux | 浏览:1,361 次

安装

  1. apt-get install squid

配置

  1. vi /etc/squid/squid.conf

类似如下
auth_param basic program /usr/lib/squid/basic_ldap_auth -v 3 -d -b "dc=nbhao,dc=org" -D cn=admin,dc=nbhao,dc=org -w password -f uid=%s ldap.nbhao.org

auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 minute

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http

acl CONNECT method CONNECT

acl localhost src 127.0.0.1/32 ::1
acl all src all
acl auth proxy_auth REQUIRED

http_access allow auth
http_access allow localhost
http_access deny all

http_port 3033

cache deny all

forwarded_for off

request_header_access X-Forwarded-For deny all
request_header_access From deny all
request_header_access Via deny all

参数:/usr/lib/squid/basic_ldap_auth -h

-v ldap版本
-d 开启debug
-b 基础的ldap dn搜索域
-D -w ldap登录的用户名密码
-f uid=%s 搜索过滤uid
ldap.nbhao.org ldap的地址

其他参考:
squid http代理nsca认证
https://wiki.squid-cache.org/ConfigExamples/Authenticate/Ldap

本文标签:

本文链接:https://www.sijitao.net/2873.html

欢迎您在本博客中留下评论,如需转载原创文章请注明出处,谢谢!

一键脚本 博客历程 留言联系 文章归档 网站地图 谷歌地图
Copyright © 2010-2024 章郎虫博客 All Rights Reserved.