1. 首页
  2. 服务器运维
  3. Linux

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

安装

  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

原创文章,作者:章郎虫,如若转载,请注明出处:http://www.szl724.com/sysmaint/linux-os/2873.html

联系我们

0574-55011290

QQ:248687950

邮件:admin@nbhao.org

工作时间:周一至周五,9:00-18:00,节假日休息

QR code