The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

форумы  помощь  поиск  регистрация  майллист  вход/выход  слежка  RSS
"Squid + Solaris + Active Directory"
Вариант для распечатки  
Пред. тема | След. тема 
Форум Настройка Squid и других прокси серверов (Аутентификация)
Изначальное сообщение [ Отслеживать ]

"Squid + Solaris + Active Directory"  +/
Сообщение от MikAndr email on 29-Дек-15, 16:48 
Всем привет!
Встала задача настроить работу Squid под управлением Solaris с аутентификацией пользователей через Active Directory.
Что было сделано.
Установлен сервер Solaris 11.3 (GUI установка). Двум имеющимся сетевым интерфейсам назначен статический адрес IP: один внутренний, другой - внешний.
Настроил клиент DNS на сервера - контроллеры домена.
Далее настроил клиента Solaris Active Directory в соответствии со статьей: http://docs.oracle.com/cd/E23824_01/html/821-1455/adsetup-10... (Overview of the nss_ad Naming Service Module)
Настоил клиент NTP на синхронизацию времени с контроллером домена (http://docs.oracle.com/cd/E36784_01/html/E36824/gen_html/tim...)
В качестве руководств по настройке Squid я использовал Configuring a Squid Server to authenticate off Active Directory
(http://wiki.squid-cache.org/ConfigExamples/Authenticate/Wind...), SQUID аутентификация (Kerberos и LDAP) на основе доменных групп Active Directory (http://www.k-max.name/linux/squid-auth-kerberos-ldap-grupp-a.../) и Настройка прокси сервера Squid 3.3 на Ubuntu Server 14.04 LTS. Часть 5. Конфигурация Squid 3 (http://blog.it-kb.ru/2014/06/26/forward-proxy-squid-3-3-on-u.../).
Произвел установку Squid с помощью встренной программы установки дополнительного программного обеспчеения. После установки проверил: squid работает.
Создал учетную запись компьютера squid в AD.
Создал кейтаб и поместил его в папку /etc/squid. Создал файл /etc/default/squid:
KRB5_KTNAME=/etc/squid/squid.keytab
export KRB5_KTNAME
Далее действовал в соответствии со статьей Настройка прокси сервера Squid 3.3 на Ubuntu Server 14.04 LTS. Часть 5. Конфигурация Squid 3. Эта конфигурация подходит мне больше всего.
В результате получился такой squid.cfg:
#
# Recommended minimum configuration:
#

# OPTIONS FOR AUTHENTICATION
auth_param negotiate program /usr/squid/libexec/negotiate_kerberos_auth -s HTTP/srv-sfh-proxy1.sfh.local@SFH.LOCAL
auth_param negotiate children 50 startup=10 idle=5
auth_param negotiate keep_alive on

# ACCESS CONTROLS
external_acl_type memberof ttl=3600 ipv4 %LOGIN /usr/squid/libexec/ext_ldap_group_acl -v 3 -P -R -K -b "dc=sfh,dc=local" -D squid@sfh.local -W /etc/squid/conf_param_ldappass.txt -f "(&(objectclass=person)(sAMAcountName=%v)(memberOf:1.2.840.113556.1.4.1941:=cn=%g,OU=squid,DC=sfh,DC=local))" -h srv-ad1.sfh.local srv-ad2.sfh.local

# ACLs
acl auth proxy_auth REQUIRED
acl BlockedAccess    external memberof "/etc/squid/conf_param_groups_blocked.txt"
acl RestrictedAccess    external memberof "/etc/squid/conf_param_groups_restricted.txt"
acl StandardAccess    external memberof "/etc/squid/conf_param_groups_standard.txt"
acl FullAccess        external memberof "/etc/squid/conf_param_groups_full_auth.txt"
acl AnonymousAccess    external memberof "/etc/squid/conf_param_groups_full_anon.txt"

acl allowedsites    dstdomain "/etc/squid/conf_param_sites_allowed.txt"
acl blockedsites    dstdomain "/etc/squid/conf_param_sites_blocked.txt"
acl prioritysites    dstdomain "/etc/squid/conf_param_sites_priority.txt"

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8    # RFC1918 possible internal network
acl localnet src 172.16.0.0/23    # RFC1918 possible internal network
acl localnet src 192.168.0.0/24    # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80        # http
acl Safe_ports port 21        # ftp
acl Safe_ports port 443        # https
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

#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access allow localnet manager
http_access deny manager

# Allow unrestricted access to prioritysites
http_access allow prioritysites localnet

# Enforce authentication, order of rules is important for authorization levels
http_access deny !auth

# Prevent access to basic auth prompt for BlockedAccess users
http_access deny BlockedAccess all
http_access allow allowedsites localnet
http_access deny RestrictedAccess all
http_access allow AnonymousAccess auth localnet
http_access allow FullAccess auth localnet
http_access deny blockedsites
http_access allow StandardAccess auth localnet

# And finally deny all other access to this proxy
http_access deny all

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# 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 deny all

# Squid normally listens to port 3128
http_port 3128

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/squid/cache/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/squid/cache/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

Тестового пользователя поместил в группу GRP-Internet-Full-Auth. Но squid запрещает доступ. Ошибка: Доступ запрещен.
В журнале access.log появляются записи типа:
TCP_DENIED/402 nnnn http://WWW.MSN.COM/ USER@DOM.local HIER-NONE/ text/html

Ответить | Правка | Cообщить модератору

Оглавление

Сообщения по теме [Сортировка по ответам | RSS]

1. "Squid + Solaris + Active Directory"  +/
Сообщение от eRIC (ok) on 30-Дек-15, 08:36 
> Тестового пользователя поместил в группу GRP-Internet-Full-Auth. Но squid запрещает доступ.
> Ошибка: Доступ запрещен.
> В журнале access.log появляются записи типа:
> TCP_DENIED/402 nnnn http://WWW.MSN.COM/ USER@DOM.local HIER-NONE/ text/html

402 Payment Required

    Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, but that has not happened, and this code is not usually used. Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.


Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору


Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру