LDAP Squid

Aus MHC-Wiki

Wechseln zu: Navigation, Suche

Vom Grundprinzip her ist es wirklich einfach. Man trängt in die "squid.conf" schicht folgendes ein:

auth_param basic program /usr/lib/squid/ldap_auth
      -b ou=People,dc=mhcsoftware,dc=de -f (&(uid=%s)(objectClass=gosaProxyAccount))
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

und

acl password proxy_auth REQUIRED
http_access allow password

Mein problem war, dass in allen Beispielen steht man soll "/usr/lib/squid/squid_ldap_auth" als Authentifizierungs programm nehmen. An sich ist das auch richtig. So steht es im Squid Sourcecode. Allerdings hat der Debina Package Maintainer beschlossen, dass das Programm anders heissen soll, und zwar: ldap_auth. Ok, es steht schon im folder "squid" und muss deshalb nich auch noch den präfix squid_ tragen.

Proxy Auto Config

Apache

AddType application/x-ns-proxy-autoconfig .pac
AddType application/x-ns-proxy-autoconfig .dat

Redirect permanent /wpad.dat /proxy.pac

DNS

ldap            CNAME           slox.TLD.
proxy           CNAME           intranet.TLD.

wpad            IN TXT          "service: wpad:http://proxy.TLD"
_wpad._tcp.TLD. SRV             0 5 80 proxy.TLD.

_ldap._tcp.TLD. SRV             0 0 389 slox.TLD.

proxy.pac

function FindProxyForURL(url, host)
{
  if (shExpMatch(url, "http://intranet.TLD/*")) return "DIRECT";
  if (shExpMatch(url, "http://server.TLD/*")) return "DIRECT";
  if (isInNet(host, "127.0.0.0", "255.255.0.0")) return "DIRECT";
  return "PROXY proxy.TLD:3128; DIRECT";
}
Persönliche Werkzeuge
Navigation