博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
squid 快速配置
阅读量:2229 次
发布时间:2019-05-09

本文共 1068 字,大约阅读时间需要 3 分钟。

安装

yum install squid -yyum install httpd-tools -y

基本认证配置文件

#网络http_port 8991dns_nameservers 100.100.2.136#认证auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/auto/passwdauth_param basic realm proxy#aclacl authenticated proxy_auth REQUIRED#应用aclhttp_access allow authenticatedhttp_access deny all

测试认证

#创建用户htpasswd -c /etc/squid/auto/passwd user#测试用户/usr/lib64/squid/basic_ncsa_auth /etc/squid/auth/passwduser 123OK#返回OK说明正常

ldap配置文件

#网络http_port 8991dns_nameservers 100.100.2.136#认证auth_param basic program /usr/lib64/squid/basic_ldap_auth -v 3 -b "dc=qq,dc=com" -D "uid=user,cn=users,dc=qq,dc=com" -w "passwd" -f uid=%s -h 115.123.183.123auth_param basic children 5auth_param basic realm example Software Corporationauth_param basic credentialsttl 15#aclacl ldapauth proxy_auth REQUIRED#应用aclhttp_access allow ldapauthhttp_access deny all

测试认证(注意你ldap服务器类型参数会有不同)

/usr/lib64/squid/basic_ldap_auth -v 3 -b "dc=qq,dc=com" -D "uid=user,cn=users,dc=qq,dc=com" -w "passwd" -f uid=%s -h 115.123.183.123OK

 

转载于:https://www.cnblogs.com/37yan/p/7672680.html

你可能感兴趣的文章
阿里云《云原生》公开课笔记 第五章 应用编排与管理
查看>>
阿里云《云原生》公开课笔记 第六章 应用编排与管理:Deployment
查看>>
阿里云《云原生》公开课笔记 第七章 应用编排与管理:Job和DaemonSet
查看>>
阿里云《云原生》公开课笔记 第八章 应用配置管理
查看>>
阿里云《云原生》公开课笔记 第九章 应用存储和持久化数据卷:核心知识
查看>>
linux系统 阿里云源
查看>>
国内外helm源记录
查看>>
牛客网题目1:最大数
查看>>
散落人间知识点记录one
查看>>
Leetcode C++ 随手刷 547.朋友圈
查看>>
手抄笔记:深入理解linux内核-1
查看>>
内存堆与栈
查看>>
Leetcode C++《每日一题》20200621 124.二叉树的最大路径和
查看>>
Leetcode C++《每日一题》20200622 面试题 16.18. 模式匹配
查看>>
Leetcode C++《每日一题》20200625 139. 单词拆分
查看>>
Leetcode C++《每日一题》20200626 338. 比特位计数
查看>>
Leetcode C++ 《拓扑排序-1》20200626 207.课程表
查看>>
Go语言学习Part1:包、变量和函数
查看>>
Go语言学习Part2:流程控制语句:for、if、else、switch 和 defer
查看>>
Go语言学习Part3:struct、slice和映射
查看>>