Skip to content
AdminKit

LDAP

What is LDAP?

LDAP (Lightweight Directory Access Protocol, RFC 4511) queries directory services like Active Directory for user accounts and authentication data. Plain LDAP on port 389 sends bind credentials without encryption unless upgraded with STARTTLS or run over LDAPS (port 636), so AdminKit's port check tool can confirm a directory service isn't directly reachable from the open internet.

By AdminKit team, Netbase JSC · Updated

LDAP (Lightweight Directory Access Protocol, RFC 4511) is used to query and update directory services — most commonly Active Directory — that store user accounts, group memberships, and authentication data for an organization. Plain LDAP on port 389 transmits queries and, critically, the bind credentials used to authenticate, without encryption by default, unless the connection is upgraded with STARTTLS or run over the separate LDAPS port (636) with TLS from the start — the exact setup Microsoft’s own Active Directory documentation walks through for enabling LDAPS — both covered by RFC 4513’s authentication and security mechanisms, with the protocol’s extended operations and attribute syntaxes tracked in IANA’s LDAP Parameters registry. On the client side, the OpenLDAP administrator’s guide on using TLS documents both approaches: the -Z and -ZZ flags that issue a Start TLS operation, and the ldaps:// URI scheme. A directory service reachable from the open internet over unencrypted LDAP exposes authentication traffic to interception and gives an external attacker a direct path to probe an organization’s user and group structure, information normally only reachable from inside the corporate network. Directory services are meant to sit behind a firewall or VPN, not be directly internet-facing, regardless of which LDAP variant is in use — AdminKit’s port check tool can confirm whether ports 389 or 636 are unexpectedly reachable from outside. LDAP joins other commonly-exposed, weakly authenticated management and remote-access protocols in AdminKit’s glossary, like Telnet and VNC, where the fix is usually the same: don’t expose it to the internet at all.

Frequently asked questions

Is LDAP the same as Active Directory?

No -- LDAP is the protocol used to query and update directory services, and Active Directory is Microsoft's directory service implementation that LDAP is most commonly used against; other directory services also speak LDAP.

What's the difference between LDAP and LDAPS?

Plain LDAP on port 389 transmits queries and bind credentials without encryption by default; LDAPS runs the same protocol over TLS from the start on port 636, and STARTTLS is a third option that upgrades an existing port-389 connection to TLS mid-session.

Why is unencrypted LDAP risky if it's exposed to the internet?

Because bind credentials used to authenticate are sent in the clear, an attacker who can observe the network can intercept them, and anyone who can reach the port at all gets a direct path to probe an organization's user and group structure.

Should a directory service ever be directly reachable from the internet?

No -- directory services are meant to sit behind a firewall or VPN, not be directly internet-facing, regardless of which LDAP variant (plain, STARTTLS, or LDAPS) is in use.