Web Filtering On Squid 3 With QuintoLabs Content Security 1.4 And Windows Active Directory Integration
Web Filtering On Squid 3 With QuintoLabs Content Security 1.4 And Windows Active Directory IntegrationThis HOWTO will show you how to set up a Squid proxy server deployed on CentOS or RedHat 6 Linux with web and content filtering done by QuintoLabs Content Security with proxy users transparently authenticated by Windows 2008 R2 based Active Directory. This is the work in progress and all comments are welcomed. The HOWTO is targeted at novice users and may sometimes seem too thorough for more advanced gurus. No compilation magic will be involved in our setup so any system administrator accustomed to Windows will be able to easily follow the instructions. :) We will use VMWare's Workstation 8 to setup the staging test lab to make sure everything works before deploying it on the production servers and real hardware. The chosen virtualization platform does not really matter much and any other virtualization solution can be successfully used too.
PrerequisitesThe test lab will contain three machines - a domain controller running Microsoft Windows 2008 R2 server, a user machine running Windows 7 and a proxy machine running CentOS 6 with Squid Proxy 3 coming from standard repository. I presume you have ISOs of Windows Server R2, Windows 7 and RedHat (CentOS) 6 Linuxes somewhere around you. I also presume installation of Microsoft Windows and Active Directory is not a problem for you. The domain we are creating is called example.lan. The IP addresses in use come from standard network used in NAT networking in VMWare Workstation - 192.168.28.0. Name of the Domain Controller will be dc.example.lan, proxy will be called proxy.example.lan and client workstation client.example.lan.
Step 1. Install Domain ControllerFirst, perform basic installation of Microsoft Windows and do the initial post install configuration.
Now install Active Directory.
Now set up static IP address information for dc.example.lan and proxy.example.lan hosts.
Step 2. Install Windows 7 Client MachineNow create a VM that will act as a machine for the users of the proxy. Give VM a name - client.example.lan, set up Windows 7 as you normally do, join the machine to the example.lan domain created on Step 1 and make a bunch of domain users that will act as proxy clients.
Step 3. Install CentOS Proxy MachineCreate a new virtual machine named proxy.example.lan. Ensure the network adapter is set to "NAT" mode. Start the VM and follow the steps of the CentOS install wizard mostly accepting the defaults. Configure machine hostname as "proxy.example.lan" and root password as "P@ssw0rd" (without quotation marks). Wait a little until the installation is complete and then reboot the system. NOTE 1: For the purpose of this howto I have SELinux explicitly disabled in /etc/selinux/config. NOTE 2: For the purpose of this howto I have firewall explicitly disabled by typing #chkconfig iptables off and #chkconfig ip6tables off in the root terminal and restarting the proxy.example.lan VM.
Step 3.1 - Configure NetworkingCentOS 6 deployed as VM usually does not have network subsystem enabled by default. In order to enable networking we need to do the following:
Restart your network subsystem by # /etc/init.d/network restart or by just restarting the virtual machine. After restart confirm that the network functions correctly by typing the following commands in the terminal and watching for any error outputs $ping -c 3 192.168.28.2 Finally update the VM # yum update and install needed prerequisites for the next steps: # yum install bind-utils
Step 3.2 - Configure Network Time Synchronization (NTP)To perform successful Kerberos authentication system time on proxy.domain.lan must be synchronized with system time on dc.example.lan. The easiest way to do that is to install network synchronization server and point it to the domain controller.
NOTE: If you get "Clock skew too great while getting initial credentials" later while running the kinit utility then the sync was probably not successful and you are advised to check that the server name in /etc/ntp.conf is correct and restart the ntpd service. Log files at /var/log/messages may contain more information about the reason of unsuccessful synchronization.
Step 3.3 - Install KerberosAll needed Kerberos packages are installed by default in CentOS. But to ensure you really have all the needed Kerberos packages on the proxy.example.lan type # yum install krb5-workstation krb5-libs Kerberos configuration is stored in /etc/krb5.conf, open it with the text editor and change the contents to the following: [logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = EXAMPLE.LAN
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
default_tgs_enctypes = rc4-hmac
default_tkt_enctypes = rc4-hmac
permitted_enctypes = rc4-hmac
[realms]
EXAMPLE.LAN = {
kdc = dc.example.lan
admin_server = dc.example.lan
default_domain = example.lan
}
[domain_realm]
.example.lan = EXAMPLE.LAN
example.lan = EXAMPLE.LAN
To test that Kerberos authentication is set up correctly type in the root terminal # kinit Administrator@EXAMPLE.LAN The command should complete without errors. The command # klist should print the info about acquired Kerberos ticket. Ticket cache: FILE:/tmp/krb5cc_0 Now reboot the VM.
Step 3.4 - Install Samba and Join the proxy.example.lan to Active DirectoryNOTE: this step heavily relies on RedHat 6 Documentation side at http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/index.html, especially on books "Deployment Guide" and "Enterprise Identity Management Guide". In order to be able to transparently authenticate clients of Squid proxy using their Active Directory's credentials the server with Squid must be joined into the Active Directory domain (i.e. example.lan). The easiest way to do it is to run Samba on the proxy machine.
If you now browse the network from the client.example.lan you should see a proxy machine in the EXAMPLE workgroup. Now join the machine proxy.example.lan into the Active Directory:
|






Recent comments
2 days 15 hours ago
2 days 23 hours ago
3 days 2 hours ago
3 days 3 hours ago
3 days 5 hours ago
3 days 6 hours ago
3 days 8 hours ago
3 days 9 hours ago
4 days 1 hour ago
4 days 2 hours ago