Parameter name | Value |
---|---|
AD_SQUID_USER | squid |
AD_SQUID_PASSWORD | squid_password |
PROXY_FULL_DNS_NAME | proxy.company.ru |
DOMAIN_CONTROLLER | dc.company.lan |
REALM | COMPANY.LAN |
SQUID_DN | cn=squid,ou=users_special,dc=company,dc=lan |
BASE_DN | ou=users,dc=company,dc=lan |
sudo apt-get install squid3 krb5-user
[libdefaults] default_realm = COMPANY.LAN
ktpass -princ HTTP/proxy.company.ru@COMPANY.LAN -mapuser squid -pass squid_password -ptype KRB5_NT_PRINCIPAL -out HTTP.keytab
echo "squid_password" | sudo tee /etc/squid3/LDAP.pass
sudo chown proxy:proxy /etc/squid3/HTTP.keytab /etc/squid3/LDAP.pass sudo chmod 400 /etc/squid3/HTTP.keytab /etc/squid3/LDAP.pass
echo "export KRB5_KTNAME=/etc/squid3/HTTP.keytab" | sudo tee /etc/default/squid3
# Enable Kerberos authentication first auth_param negotiate program /usr/lib/squid3/squid_kerb_auth -s HTTP/proxy.company.ru@COMPANY.LAN auth_param negotiate children 10 auth_param negotiate keep_alive on # Fallback to LDAP if Kerberos fails auth_param basic program /usr/lib/squid3/squid_ldap_auth -R -b "ou=users,dc=company,dc=lan" -f sAMAccountName=%s -h dc.company.lan -D "cn=squid,ou=users_special,dc=company,dc=lan" -W /etc/squid3/LDAP.pass auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours # Force authentication requirement acl auth proxy_auth REQUIRED http_access allow auth
--- squid.conf.orig 2011-02-18 22:43:47.000000000 +0300 +++ squid.conf 2011-11-23 20:36:10.348219178 +0400 @@ -646,6 +646,9 @@ #http_access allow localnet http_access allow localhost +# Include Kerberos and LDAP configuration +include /etc/squid3/squid.auth.conf + # And finally deny all other access to this proxy http_access deny all
sudo /etc/init.d/squid3 restart
kinit -V -kt /etc/squid3/HTTP.keytab HTTP/proxy.company.ru@COMPANY.LAN