• squid 快速配置


    安装

    yum install squid -y
    yum install httpd-tools -y

    基本认证配置文件

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

    测试认证

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

    ldap配置文件

    #网络
    http_port 8991
    dns_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.123
    auth_param basic children 5
    auth_param basic realm example Software Corporation
    auth_param basic credentialsttl 15
    #acl
    acl ldapauth proxy_auth REQUIRED
    #应用acl
    http_access allow ldapauth
    http_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.123
    
    OK
  • 相关阅读:
    又见回文 字符串
    学密码学一定得学程序 KMP
    学密码学一定得学程序 KMP
    KMP简单应用
    KMP简单应用
    用ALAssetsLibrary将过滤后图片写入照片库
    iOS 8版本信息与屏幕尺寸
    屏幕适配的那些坑
    从工程中删除Cocoapods
    AVCaptureSession 照相时获取 AVCaptureVideoPreviewLayer尺寸
  • 原文地址:https://www.cnblogs.com/37yan/p/7672680.html
Copyright © 2020-2023  润新知