
그래서 Ubuntu 서버에 오징어 프록시를 설정했고 이제 내 도메인으로 사용자 대상 지정을 설정하고 싶습니다. AD 내의 보안 그룹에 대해 acl을 설정할 수 있도록 하고 싶습니다. 이것이 가능합니까? 어떻게 해야 합니까?
또한 현재 프록시가 열려 있으므로 사용자는 프록시를 사용하여 인증해야 합니다. 그룹 정책을 사용하여 프록시를 설정했습니다. 사용자가 로그인하고 특정 ACL을 얻을 수 있도록 프록시를 AD에 연결하고 싶습니다. 내가 본 모든 튜토리얼은 사용자 이름과 비밀번호를 묻는 팝업 메시지였습니다. 사용자가 로그인할 때 자동으로 인증되도록 이 작업이 자동으로 수행되기를 바랍니다. 어떻게 이것을 달성할 수 있습니까? NTLM이 여기에 역할을 할 것이라고 생각했나요? 그런 다음 사용자가 속한 보안 그룹에는 Squid가 시행하는 차단된 웹 사이트 세트가 있습니다.
미리 감사드립니다
답변1
다음은 원하는 작업을 수행하는 구성 예입니다.
## Active Directory Authentication
auth_param basic program /usr/lib/squid/basic_ldap_auth -R -b "dc=example,dc=com" -D [email protected] -W /etc/squid/conf.d/ldap.pass -f sAMAccountName=%s -h example.com
auth_param basic children 100 startup=5 idle=5
auth_param basic realm Windows Logon
auth_param basic credentialsttl 2 hours
## Group Membership Lookup
external_acl_type ldap_group children-max=1000 children-startup=100 children-idle=50 %LOGIN /usr/lib/squid/ext_ldap_group_acl -d -R -b "dc=example,dc=com" -D [email protected] -W /etc/squid/conf.d/ldap.pass -K -f "(&(objectclass=person)(sAMAccountName=%u)(memberof=CN=%g,OU=Squid_Users,DC=example,DC=com))" -h example.com
# Defines the networks which are allowed to use the proxy
acl allowed-networks src 192.168.1.0/24
# Defines the Active Directory Groups as Squid ACLs (i.e. `InternetGeneralUsers` is a group in AD)
acl users-general external ldap_group InternetGeneralUsers
# Defines the filter ACLs
acl domains-allowed dstdomain "/etc/squid/conf.d/domains/domains-allowed"
# Actual Allow/Deny rules
http_access allow allowed-networks users-general domains-allowed
# And finally deny all other access to this proxy
http_access deny all
이는 단순한 Active Directory 이상의 것이지만 일반적인 개념은 다음과 같습니다.
- 사용자의 Active Directory에 대한 연결을 정의합니다.
- AD에서 그룹을 조회하는 방법을 정의합니다.
- AD 그룹의 구성원을 포함하는 ACL을 정의합니다. 이 예에서는 AD 그룹을 호출
InternetGeneralUsers
하고 Squid ACL을users-general
. - Squid ACL이
users-general
프록시를 통과하도록 허용하는 허용 규칙을 정의합니다.