Skip to Content
Active Directory Cookbook
book

Active Directory Cookbook

by Robbie Allen
September 2003
Intermediate to advanced
624 pages
15h 49m
English
O'Reilly Media, Inc.
Content preview from Active Directory Cookbook

14.4. Restricting Hosts from Performing LDAP Queries

Problem

You want domain controllers to reject LDAP queries from certain IP addresses. This can be useful if you want to prohibit domain controllers from responding to LDAP queries for certain applications or hosts.

Solution

Using a command-line interface

Tip

This option is not present in the Windows Server 2003 version of ntdsutil.

The following adds network 10.0.0.0 with mask 255.255.255.0 to the IP deny list:

> ntdsutil "ipdeny list" conn "co t s <DomainControllerName>" q
IP Deny List: Add 10.0.0.0 255.255.255.0
*[1] 10.0.0.0 GROUP MASK      255.255.255.0

NOTE: * | D - uncommitted addition | deletion
IP Deny List: Commit
 [1] 10.10.10.0 GROUP MASK      255.255.255.0

NOTE: * | D - uncommitted addition | deletion

Discussion

The IP deny list is stored as an octet string in the lDAPIPDenyList attribute of a query policy. See Recipe 4.23 for more information on the LDAP query policy.

When the IP deny list is set, domain controllers that are using the default query policy will not respond to LDAP queries from any IP address specified in the deny list address range. To test whether a certain IP address would be denied, run Test x.x.x.x, where x.x.x.x is an IP address, from the IP Deny List: subcommand in ntdsutil.

By setting the IP deny list on the default query policy, you would effectively restrict the IP address range from querying any domain controller in the forest. If you need to only restrict queries for a specific domain controller, you’ll need ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Active Directory Administration Cookbook

Active Directory Administration Cookbook

Sander Berkouwer
Active Directory Cookbook, 3rd Edition

Active Directory Cookbook, 3rd Edition

Laura E. Hunter, Robbie Allen
Active Directory Cookbook, 4th Edition

Active Directory Cookbook, 4th Edition

Brian Svidergol, Robbie Allen

Publisher Resources

ISBN: 0596004648Supplemental ContentCatalog PageErrata