This is something I setup recently and was quite a big pain. My environment was getting squid to authenticate a Windows 7 client against a Windows 2008 Server invisibly. NTLM is not really an option, as using it requires a registry change on each client.
MS have been recommending Kerberos since Windows 2000, so it's finally time to get with the program.
Many, many thanks to Markus Moeller of the Squid mailing lists for helping to get this working.
This is setup with Squid 3.0, has also been tested with Squid 3.1 and should work with Squid 2.7. Your Windows user must be a member of the SQUID_USERS group in Active Directory (for this case anyway).
On the Windows side, Windows XP and Windows 2007 have been tested against Windows 2008, and Windows XP against Windows 2003.
Note that almost every step requires the one before it to proceed.
If you have a problem, DNS is always the first place to look. Both Windows machines should be able to ping the Linux server by name (and vice versa), and you may need to run
ipconfig /flushdns
at times. A reboot may help too, if you want to be really sure there's no cruft hanging around.Domain info
dom.local
server.dom.local
,172.17.3.11
centos.dom.local
,172.17.3.10
Domain server setup
dom.local
reverse zone in the DNS config.centos.dom.local
pointing to172.17.3.10
, select Yes when asked if you want to setup the reverse PTR as well.Windows 2008
For Windows 2008 server you need to install Hotfix 951191.
Linux Setup
Minor packages
Install packages
Install
msktutil
. You need to patch it before you build it.Compile the latest squid
_
kerb_
ldap.DNS
Use
system-config-network
to configure the DNS point to the domain controller, set the hostname tocentos.dom.local
.Reboot
Check reverse DNS is working: $ dig -x 172.17.3.10
You should get
centos.dom.local
in the answer section. If you don't there is no point continuing. Kerberos authentication will not work without DNS configured properly.Kerberos
Your
krb.conf
should look like something like this:Create keytab:
For Windows 2008 you need to add
--enctypes 28
to themsktutil
command.Squid
Install squid:
Setup the appropriate parameters in squid.conf:
Setup the user and directories:
Create caches:
Init script
Now this is important: Squid needs some environment variables setup to run properly. The best way to do this is to use an init script. Here's a slightly edited CentOS one:
These are the important lines:
Client Machine
Set your proxy to server
centos.dom.local
using port3128
. It is important that you use the fully qualified domain name and NOT the IP address.Instead of editing /etc/init.d/squid to set the KRB5_KTNAME environment variable you should just put the lines in /etc/sysconfig/squid. Since the init script sources /etc/sysconfig/squid on every execution it will pick up those 2 lines.
Additionally, you do not need to explicitly name the hosts to be the KDC and the kadmin server, it is enough to merely enter the DNS domain for your Active Directory domain. There are 2 reasons why:
following this tuto I could get squid to work on a fedora 12 server. Check the firewall on your Linux Server (enable port 3128) and set SELinux in permissive mode.