Итого здравствуйте уважаемые.
Поднял и настроил squid(squid_kerb_auth+ldap_auth) и все хорошо, кроме логов и запроса пароля для тех кто зашел с ноута но пользователь доменный.
1. squid_kerb_auth пишет пользователей как username@domain а хочется как domain\username а ldap_auth пишет просто username а хочется как domain\username
2. Так же непонятно, можно ли сделать так что бы при запросе логина и пароля надо было писать domain\username? К примеру у меня два домена или три.
Я так понимаю в ldap_auth ключ -d обязателен а без него не работает.
Можно ли как то исправить ситуацию?
То есть
1. Логин должен писаться как domain\username а не как username@domain
2. При запросе пароля по ldap_auth необходимо писать domain\username а не как сейчас username.
p.s. Написал очень сумбурно, простите, не умею корректно выражать мысли =(
Заранее спасибо.
Squid (squid_kerb_auth и логи) + (ldap_auth и логи + запрос пароля)
Модераторы: SLEDopit, Модераторы разделов
-
McSim
- Сообщения: 419
- Статус: Экспериментатор
- ОС: заGNU/Linux Debian
Re: Squid (squid_kerb_auth и логи) + (ldap_auth и логи + запрос пароля)
Что за дистрибутив и какие версии сквида и хелперов?
-
nikto
- Сообщения: 27
Re: Squid (squid_kerb_auth и логи) + (ldap_auth и логи + запрос пароля)
Прошу прощения, а как версии хелперов можно посмотреть?
Код: Выделить всё
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.7 (wheezy)
Release: 7.7
Codename: wheezyКод: Выделить всё
Squid Cache: Version 2.7.STABLE9
configure options: '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/sbin' '--sbindir=/usr/sbin' '--libexecdir=/usr/lib/squid' '--sysconfdir=/etc/squid' '--localstatedir=/var/spool/squid' '--datadir=/usr/share/squid' '--with-pthreads' '--enable-async-io' '--enable-storeio=ufs,aufs,coss,diskd,null' '--enable-linux-netfilter' '--enable-arp-acl' '--enable-epoll' '--enable-removal-policies=lru,heap' '--enable-snmp' '--enable-delay-pools' '--enable-htcp' '--enable-cache-digests' '--enable-referer-log' '--enable-useragent-log' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-carp' '--enable-follow-x-forwarded-for' '--with-large-files' '--with-maxfd=65536' '--build' 'x86_64-linux-gnu' 'build_alias=x86_64-linux-gnu'-
McSim
- Сообщения: 419
- Статус: Экспериментатор
- ОС: заGNU/Linux Debian
Re: Squid (squid_kerb_auth и логи) + (ldap_auth и логи + запрос пароля)
Конфиг сквида в студию )
Версию хелперов можно понять, запустив хелпер с ключом -v, а так же, по версии дистрибутива.
[оффтоп] ну вот скажите мне, почему все последние топикастеры используют версию 2.7? Ну чем она так манит, а?[/оффтоп]
Версию хелперов можно понять, запустив хелпер с ключом -v, а так же, по версии дистрибутива.
[оффтоп] ну вот скажите мне, почему все последние топикастеры используют версию 2.7? Ну чем она так манит, а?[/оффтоп]
-
nikto
- Сообщения: 27
Re: Squid (squid_kerb_auth и логи) + (ldap_auth и логи + запрос пароля)
Увы
Код: Выделить всё
/usr/lib/squid/squid_kerb_auth -v
/usr/lib/squid/squid_kerb_auth: invalid option -- 'v'
2014/10/29 18:23:50| squid_kerb_auth: unknown option: -?Код: Выделить всё
/usr/lib/squid/ldap_auth -v
Protocol version should be 2 or 3Код: Выделить всё
http_port 3128
strip_query_terms off
cache_mgr user@domain
error_directory /usr/share/squid/errors/Russian-1251
auth_param negotiate program /usr/lib/squid/squid_kerb_auth -d -s HTTP/proxy.domain@DOMAIN
auth_param negotiate children 30
auth_param negotiate keep_alive on
auth_param basic program /usr/lib/squid/ldap_auth -R -b "dc=domain" -D "user@domain" -w "password" -f "sAMAccountName=%s" -h 192.168.100.100
auth_param basic children 30
auth_param basic realm Proxy Autentification Required
auth_param basic credentialsttl 2 minute
external_acl_type ldap_group children=30 %LOGIN /usr/lib/squid/squid_ldap_group -v 3 -R -K -b "dc=domain" -D "user@domain" -w "password" -f "(&(objectclass=person)(sAMAccountName=%v)(memberof=cn=%a,dc=domain))" -h 192.168.100.100
acl manager proto cache_object
acl all src all
cache deny all
no_cache deny all
maximum_object_size 0KB
minimum_object_size 0KB
cache_dir null /null
acl ad_list dstdom_regex -i "/etc/squid/list/ad_list"
acl full_deny-for_all dstdomain -i "/etc/squid/list/full_deny-for_all"
acl communication_list dstdomain -i "/etc/squid/list/communication_list"
acl game_list dstdomain -i "/etc/squid/list/game_list"
acl humor_list dstdomain -i "/etc/squid/list/humor_list"
acl job_list dstdomain -i "/etc/squid/list/job_list"
acl porno_list dstdomain -i "/etc/squid/list/porno_list"
acl video_list dstdomain -i "/etc/squid/list/video_list
acl proxy_list dstdomain -i "/etc/squid/list/proxy_list"
acl worck_time time MTWHF 09:30-18:30
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl webserver src 192.168.100.101/255.255.255.255
acl full_access external ldap_group Internet-full-access
acl standart_access external ldap_group Internet-standart-access
acl social_network_access external ldap_group Internet-social_network-access
acl all_au_users proxy_auth REQUIRED
acl SSL_ports port 443
acl SSL_ports port 5228
acl SSL_ports port 5190
acl Safe_ports port 80 # http
acl Safe_ports port 8080 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl mtalk_ports port 5228
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager
http_access allow localhost
http_access allow webserver
http_access allow CONNECT mtalk_ports
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow social_network_access worck_time communication_list
http_access deny standart_access full_deny-for_all
deny_info http://ya.ru full_deny-for_all
http_access deny standart_access worck_time game_list
deny_info http://ya.ru game_list
http_access deny standart_access worck_time humor_list
deny_info http://ya.ru humor_list
http_access deny standart_access worck_time job_list
deny_info http://ya.ru job_list
http_access deny standart_access worck_time proxy_list
deny_info http://ya.ru proxy_list
http_access deny standart_access worck_time video_list
deny_info http://ya.ru video_list
http_access deny standart_access worck_time porno_list
deny_info http://ya.ru porno_list
http_access deny standart_access worck_time communication_list
deny_info http://ya.ru communication_list
http_access deny full_access full_deny-for_all
deny_info http://ya.ru full_access
http_access allow standart_access
http_access allow full_access
http_access allow social_network_access
http_access deny all
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
read_timeout 1 minutes
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log-
McSim
- Сообщения: 419
- Статус: Экспериментатор
- ОС: заGNU/Linux Debian
Re: Squid (squid_kerb_auth и логи) + (ldap_auth и логи + запрос пароля)
Если рассмотреть порядок http_access, то:
1. правило
идущее перед правилом
не имеет никакого смысла. Это лишний ldap запрос.
2. Попробуйте добавить правило
прямо перед строкой
Посмотрите как себя будет вести прокси.
1. правило
Код: Выделить всё
http_access allow social_network_access worck_time communication_listидущее перед правилом
Код: Выделить всё
http_access allow social_network_accessне имеет никакого смысла. Это лишний ldap запрос.
2. Попробуйте добавить правило
Код: Выделить всё
http_access deny !all_au_users allпрямо перед строкой
Код: Выделить всё
http_access deny allПосмотрите как себя будет вести прокси.