Здравствуйте! Вычитал где-то, что сабж имеет собственный редиректор, позволяющий управлять доступом групп из MS Active Directory к сайтам, чего не умеет rejik.
Поставил, посмотреть что это вообще такое, как работает, чего могёт. Web-интерфейс SAMS вроде заработал, но трафик считать не хочет, списки запрета доступа по URL игнорирует. Прокси сервер в самс добавил, авторизацию указал Active Directory и Ldap.
Руководство по настройке у разработчика какое-то, мягко говоря, ущербное.
Помогите разобраться, куда копать?
squid -v
Squid Cache: Version 3.4.9
configure options: '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--exec_prefix=/usr' '--libexecdir=/usr/lib64/squid' '--localstatedir=/var' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--with-logdir=$(localstatedir)/log/squid' '--with-pidfile=$(localstatedir)/run/squid.pid' '--disable-dependency-tracking' '--enable-follow-x-forwarded-for' '--enable-auth' '--enable-auth-basic=DB,LDAP,NCSA,NIS,PAM,POP3,RADIUS,SASL,SMB,getpwnam' '--enable-auth-ntlm=smb_lm,fake' '--enable-auth-digest=file,LDAP,eDirectory' '--enable-auth-negotiate=kerberos,wrapper' '--enable-external-acl-helpers=wbinfo_group,kerberos_ldap_group,AD_group' '--enable-cache-digests' '--enable-cachemgr-hostname=localhost' '--enable-delay-pools' '--enable-epoll' '--enable-icap-client' '--enable-ident-lookups' '--enable-linux-netfilter' '--enable-removal-policies=heap,lru' '--enable-snmp' '--enable-storeio=aufs,diskd,ufs,rock' '--enable-wccpv2' '--enable-esi' '--enable-ssl' '--enable-ssl-crtd' '--enable-icmp' '--with-aio' '--with-default-user=squid' '--with-filedescriptors=16384' '--with-dl' '--with-openssl' '--with-pthreads' '--with-included-ltdl' '--disable-arch-native' '--without-nettle' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' 'PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig' --enable-ltdl-convenience
squid.conf
#http://wiki.enchtex.info/doc/squidlogformat
#logformat squid %{%Y/%m/%d %H:%M:%S}tl %6tr %>a %[un %Ss/%03>Hs %<st %rm %ru %Sh/%<a %mt
strip_query_terms off
auth_param negotiate program /usr/lib64/squid/negotiate_kerberos_auth ttl=1200 -s HTTP/myserver.mydomain.local@MYDOMAIN.LOCAL
auth_param negotiate children 50 startup=15 idle=8
auth_param negotiate keep_alive on
auth_param basic program /usr/lib64/squid/basic_ldap_auth -R -D squidreader20@mydomain.local -W \
/etc/squid/adpw.txt -b "OU=Departments,OU=Myorganization,DC=mydomain,DC=local" -f "sAMAccountName=%s" 192.168.0.1
auth_param basic children 20
auth_param basic credentialsttl 1 hours
external_acl_type ldap_users ipv4 ttl=1200 %LOGIN /usr/lib64/squid/ext_kerberos_ldap_group_acl \
-D MYDOMAIN.LOCAL \
-S 192.168.0.1 -u squidreader20@mydomain.local -p /etc/squid/adpw.txt \
-b "OU=Squidserver,OU=System,OU=Myorganization,DC=mydomain,DC=local"
url_rewrite_children 6
cache_dir ufs /var/spool/squid 8192 16 256
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443 # RFC 4291 link-local (directly plugged) machines
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 1025-65535 # unregistered ports
acl ICQ_DOMAIN dstdomain icq.com login.icq.com aol.com icq.net api.icq.net api.login.icq.net qip.ru storage.qip.ru api.qip.ru
acl ICQ_ADDR dst 64.12.0.0/16 205.188.0.0/16 178.237.16.0-178.237.23.255 195.239.111.0/24
acl ICQ_PORTS port 443 5190 5222
acl ICQ_PROTO proto HTTPS HTTP
acl CONNECT method CONNECT # multiling http
acl POST method POST
acl GET method GET
acl not-in-domain src "/usr/local/squid/acc-list-not_in_domain"
acl auth proxy_auth REQUIRED
acl ad-disabled external ldap_users inet_disabled
acl ad-unlimited external ldap_users inet_unlimited
acl ad-default external ldap_users inet_default
acl ICQ_Users external ldap_users inet_icq
acl dc1 src "/usr/local/squid/acc-list-servers"
acl dc1-sites dstdomain "/usr/local/squid/acc-url-servers"
acl myorganization src "/usr/local/squid/acc-list-all"
acl vip src "/usr/local/squid/acc-list-Pri"
acl gip src "/usr/local/squid/acc-list-Gip"
#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
# And finally deny all other access to this proxy
http_access allow not-in-domain
#
http_access allow CONNECT ICQ_DOMAIN ICQ_Users
http_access allow CONNECT ICQ_ADDR ICQ_PORTS ICQ_Users
http_access deny ICQ_DOMAIN !ICQ_Users
http_access deny ICQ_ADDR !ICQ_Users
http_access deny ICQ_PORTS !ICQ_Users
http_access deny ad-disabled
http_access allow ad-unlimited myorganization
http_access allow ad-default myorganization
http_access allow vip
http_access allow gip
http_access allow myorganization
http_access allow dc1 dc1-sites
#http_access allow auth
http_access deny all
# Squid normally listens to port 3128
http_port 192.168.0.20:3128
visible_hostname squidserver.myorganization.nsk.su
# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?
# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256
# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid
# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
cache_effective_user squid
cache_effective_group squid
access_log /var/log/squid/access.log
delay_pools 3
delay_class 1 1
delay_class 2 2
delay_class 3 2
delay_parameters 1 -1/-1
delay_parameters 2 -1/-1 64000/512000
delay_parameters 3 -1/-1 128000/2048000
delay_access 1 allow vip
delay_access 1 allow ad-unlimited
delay_access 1 deny all
delay_access 2 allow not-in-domain
delay_access 2 allow myorganization
delay_access 2 allow ad-default
#delay_access 2 deny myorganization !myorganizationtime
delay_access 2 deny all
delay_access 3 allow gip
delay_access 3 deny all
pid_filename /var/run/squid.pid
# TAG: http_reply_access
http_reply_access allow all
icp_access allow not-in-domain
icp_access allow ad-unlimited
icp_access allow ad-default
icp_access allow myorganization
icp_access allow dc1
icp_access allow vip
icp_access allow gip
icp_access deny all
#debug_options ALL,1 33,2 28,9
sams2.conf
MYSQLUSER=root
MYSQLPASSWORD=password
MYSQLHOSTNAME=localhost
;
; This is config file for sams2
; A line started with ; or # is a comment
;
; Database engine
; To use an engine it must be enabled during configuration
DB_ENGINE=MySQL
;DB_ENGINE=PostgreSQL
;DB_ENGINE=unixODBC
; Hostname where database is runing
; This parameter is not neccesary for unixODBC engine
DB_SERVER=localhost
; Database name
SAMS_DB=sams2db
;
ODBC=0
PDO=0
; Source as defined in odbc.ini
; This parameter is not neccesary for engine other than unixODBC
ODBCSOURCE=sams_mysql
; Username for database connection
DB_USER=sams
; Password for database connection
DB_PASSWORD=sams
SQUIDCACHEFILE=access.log
SQUIDROOTDIR=/etc/squid
SQUIDLOGDIR=/var/log/squid
SQUIDCACHEDIR=/var/spool/squid
WBINFOPATH=/usr/bin
SAMSPATH=/usr
SQUIDPATH=/usr/sbin
;SQUIDGUARDLOGPATH=/var/log
;SQUIDGUARDDBPATH=/var/db/squidguard
RECODECOMMAND=iconv -f KOI8-R -t 866 %finp > %fout
REJIKPATH=/usr/local/rejik3
SHUTDOWNCOMMAND=shutdown -h now
; Proxy id
; Identificator of proxy, starting from 1
CACHENUM=2
P.S. squid уже был настроен и работал перед началом установки sams.