windows-server-2008 – 让squid通过kerberos和Windows 2008/200
这是我最近设置的,并且是一个非常大的痛苦.我的环境正在变得鱿鱼无法对 Windows 2008 Server进行Windows 7客户端身份验证. NTLM实际上不是一个选项,因为使用它需要在每个客户端上更改注册表. 自从Windows 2000以来,MS一直在推荐Kerberos,所以现在终于可以开始使用该程序了. 很多,非常感谢Squid邮件列表中的Markus Moeller帮助实现这一目标. 这是使用Squid 3.0设置的,也已经过Squid 3.1测试,应该与Squid 2.7一起使用.您的Windows用户必须是Active Directory中SQUID_USERS组的成员(无论如何都是这种情况).在Windows方面,Windows XP和Windows 2007已针对Windows 2008和Windows XP针对Windows 2003进行了测试. 请注意,几乎每个步骤都需要前面的步骤. 如果您遇到问题,DNS始终是第一个看的地方.两台Windows机器都应该能够通过名称ping Linux服务器(反之亦然),您可能需要运行ipconfig / flushdns.重新启动也可能有所帮助,如果你想确定没有任何问题. 域信息 > Windows域名:dom.local 域服务器设置 >在DNS配置中创建dom.local反向区域. Windows 2008 对于Windows 2008服务器,您需要安装Hotfix 951191. Linux安装程序 小包装 安装包 $yum install -y cyrus-sasl-gssapi cvs autoconf automake openldap openldap-devel krb5-workstation krb5-devel gcc-c++ 安装msktutil.您需要在构建之前对其进行修补. $wget http://download.systemimager.org/~finley/msktutil/msktutil_0.3.16.orig.tar.gz $wget http://download.systemimager.org/~finley/msktutil/msktutil_0.3.16-7.diff.gz $gunzip msktutil_0.3.16-7.diff.gz $tar zxf msktutil_0.3.16.orig.tar.gz $cd msktutil-0.3.16 $patch < ../msktutil_0.3.16-7.diff $./configure && make && make install 编译最新的squid_kerb_ldap. $cvs -z3 -d:pserver:anonymous@squidkerbauth.cvs.sourceforge.net:/cvsroot/squidkerbauth co -P squid_kerb_ldap $cd squid_kerb_ldap $./configure && make DNS 使用system-config-network配置域控制器的DNS点,将主机名设置为centos.dom.local. 重启 检查反向DNS工作正常: 你应该在答案部分获得centos.dom.local.如果你不这样做,那就没有意义了.如果没有正确配置DNS,Kerberos身份验证将无法运行. Kerberos的 你的krb.conf应该是这样的: [logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log [libdefaults] default_realm = DOM.LOCAL dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h # For Windows XP: default_tgs_enctypes = rc4-hmac des-cbc-crc des-cbc-md5 default_tkt_enctypes = rc4-hmac des-cbc-crc des-cbc-md5 permitted_enctypes = rc4-hmac des-cbc-crc des-cbc-md5 # For Windows 2007: # default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5 # default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5 # permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5 forwardable = yes [realms] DOM.LOCAL = { kdc = 172.17.3.11:88 admin_server = 172.17.3.11:7491 default_domain = dom.local } [domain_realm] .dom.local = DOM.LOCAL dom.local = DOM.LOCAL [appdefaults] pam = { debug = false ticket_lifetime = 36000 renew_lifetime = 36000 forwardable = true krb4_convert = false } 创建密钥表: $kinit administrator $msktutil -c -b "CN=COMPUTERS" -s HTTP/centos.dom.local -h centos.dom.local -k /etc/HTTP.keytab --computer-name centos-http --upn HTTP/centos.dom.local --server server.dom.local --verbose 对于Windows 2008,您需要将–enctypes 28添加到msktutil命令. 乌贼 安装鱿鱼: $wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE18.tar.gz $tar zxvf squid-3.0.STABLE18.tar.gz $cd squid-3.0.STABLE18 $./configure --enable-negotiate-auth-helpers=squid_kerb_auth --enable-stacktraces --prefix=/opt/squid-3.0 $make $make install $cp helpers/negotiate_auth/squid_kerb_auth/squid_kerb_auth /opt/squid-3.0/sbin/ $cp ~/squid_kerb_ldap/squid_kerb_ldap /opt/squid-3.0/sbin/ $cd /opt/squid-3.0/ $mv etc/squid.conf etc/squid.conf.ORIG 在squid.conf中设置适当的参数: auth_param negotiate program /opt/squid-3.0/sbin/squid_kerb_auth -d -s HTTP/centos.dom.local auth_param negotiate children 10 auth_param negotiate keep_alive o external_acl_type SQUID_KERB_LDAP ttl=3600 negative_ttl=3600 %LOGIN /opt/squid-3.0/sbin/squid_kerb_ldap -d -g SQUID_USERS acl AUTHENTICATED proxy_auth REQUIRED acl LDAP_GROUP_CHECK external SQUID_KERB_LDAP acl localnet src 172.17.3.0/24 # RFC1918 possible internal network #http_access allow localnet #http_access allow AUTHENTICATED http_access allow LDAP_GROUP_CHECK cache_dir ufs /var/cache/squid-3.0 100 16 256 access_log /var/log/squid-3.0/access.log squid cache_log /var/log/squid-3.0/cache.log cache_store_log /var/log/squid-3.0/store.log pid_filename /var/run/squid-3.0.pid cache_effective_user squid cache_effective_group squid coredump_dir /var/cache/squid-3.0 (编辑:ASP站长网) |