LDAP port, LDAPS, and LDAP signing: The complete guide
Nov 30, 2026
The default LDAP port is 389, and the LDAPS port is 636. The Global Catalog adds 3268 and 3269. This guide lists every LDAP port, explains how LDAP, LDAPS, and LDAP signing differ, and compares LDAP with Active Directory and SAML. It also shows how to enforce signing on domain controllers without breaking legacy apps.
An app stops authenticating. The firewall shows that the LDAP port is open, and the service account looks fine. Neither check explains why authentication stopped. Usually it's a certificate the client doesn't trust, a client pointed at the wrong protocol, or a signing policy someone enforced last week.
How LDAP authentication works
LDAP, the Lightweight Directory Access Protocol, lets applications query a directory and check credentials. Authentication happens through a bind. The client connects and sends credentials. The server accepts or rejects them. After a successful bind, the client can search.
Two bind types matter here. A simple bind sends a username and password, and over an unencrypted connection that password crosses the network in cleartext. A Simple Authentication and Security Layer (SASL) bind negotiates an authentication mechanism, such as Kerberos in Active Directory, and can request signing. Most of the trouble later in this guide traces back to simple binds, which are easy to configure and easy to expose.
LDAP port reference: 389, 636, 3268, and 3269
Domain controllers listen for LDAP on four ports.
Port | Protocol | What it does |
|---|---|---|
|
389 |
LDAP |
Directory queries and binds. Supports StartTLS to upgrade the session to TLS. |
|
636 |
LDAPS |
LDAP wrapped in TLS from the first packet. |
|
3268 |
Global Catalog |
Forest-wide searches, unencrypted. |
|
3269 |
Global Catalog over TLS |
Forest-wide searches, encrypted. |
The LDAP TCP port in most firewall rules is 389. Clients that need encryption use port 636 for LDAPS or stay on port 389 and upgrade with StartTLS. Allow these ports between clients and domain controllers only where an app needs them.
When an app can't connect, check the firewall rule first, then the protocol the app is set to use. A client configured for LDAPS but pointed at 389 fails just like a blocked LDAP port, so the error alone rarely tells you which problem you have.
The LDAPS port and secure LDAP
LDAPS is LDAP over TLS. The LDAPS port is 636, and the Global Catalog version is 3269. StartTLS gets the same protection on port 389 by upgrading an existing connection, so you'll see both called secure LDAP, and some tools call 636 the SSL port for LDAP.
When LDAPS fails, start with the certificate:
- The domain controller needs a valid server certificate. An enterprise CA can issue one, for example from the Kerberos Authentication template.
- The client has to trust the CA that issued it.
- The client has to connect by the DC's fully qualified domain name, because an IP address won't match the certificate.
Test-NetConnection dc01.corp.example.com -Port 636 confirms the port is reachable but says nothing about the certificate. To test the certificate, connect with ldp.exe and select SSL.
LDAP vs. LDAPS vs. LDAP signing
Teams comparing LDAP with LDAPS often assume signing and LDAPS do the same job. LDAPS encrypts the whole session. Signing proves messages weren't altered in transit but hides nothing. Channel binding ties the authentication to the TLS channel it happened on, which blocks relay attacks against LDAPS.
Passwords are where it bites. A simple bind with signing alone still sends the password in the clear, so a DC that requires signing also rejects simple binds over unencrypted connections. An app that only does simple binds needs LDAPS or StartTLS before you enforce anything.
LDAP vs. Active Directory and SAML
LDAP is a protocol. Active Directory is Microsoft's directory service, and it speaks LDAP alongside Kerberos, DNS, and Group Policy. When someone says "we use LDAP," they often mean AD. If a Linux app, an appliance, or an open source tool needs to authenticate users against AD, the practical question is whether it can connect over LDAP. Those tools usually bind over LDAP, which is why domain controllers see so much of it.
When comparing SAML (Security Assertion Markup Language) with LDAP, consider whether the app needs single sign-on or direct directory access. SAML passes signed assertions between an identity provider and a web app for single sign-on, so the app never queries the directory itself. An app that has to look up users or check credentials directly still needs LDAP.
Enforce LDAP signing without breaking legacy apps
Enforcement takes one registry value or one Group Policy setting, so it's tempting to flip it and see what breaks. Work through this order instead.
- Log first. On each DC, set 16 LDAP Interface Events to 2 under HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics. Event 2889 in the Directory Service log records the client IP, account, and bind type for every unsigned or cleartext LDAP bind, and event 2887 gives a daily count. Run it for several weeks so monthly jobs show up. Event 2889 can fill the log fast on a busy DC, so raise the log size too.
- Trace each client to an app. The DC gives you an IP and an account, not the application. On the client, Get-NetTCPConnection -RemotePort 389,636,3268,3269 shows the owning process. For Linux hosts and appliances, the bind account usually names the app.
- Move apps to LDAPS or StartTLS. Fix certificate trust and FQDN problems first. A simple LDAP bind over TLS keeps working when signing is required, but a simple bind sent to the plain LDAP port on 389 gets rejected.
- Deal with the stragglers. For apps that can't do TLS, stunnel on the app server or IPsec buys time. The app goes on a replacement list.
- Enforce signing. Set "Domain controller: LDAP server signing requirements" to Require signing in Group Policy, or set LDAPServerIntegrity to 2 under HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters. Do it on every DC. Signing is a per-DC setting, so one unenforced DC becomes an easy relay target.
- Move on to LDAP channel binding. Set LdapEnforceChannelBinding to 1 (when supported) first, confirm your LDAPS clients still connect, then move to 2 (always).
Windows Server 2025 domain controllers require signing by default when no policy says otherwise. Legacy apps will break on any new 2025 DC even if nobody touched the policy.
LDAP error 49 and LDAP injection
LDAP error 49 means invalid credentials. The data code in the message narrows the cause: 52e is a wrong password, 525 an unknown user, 532 an expired password, 533 a disabled account, and 775 a locked account. Check the account state on the DC before you blame the app.
LDAP injection happens when an app drops unsanitized user input into an LDAP filter, which lets an attacker change what the query returns. Escape the special characters (*, (, ), \, and NUL), validate input against an allow list, and give the bind account only the permissions it needs.
Keep every domain controller hardened
A GPO pushes the signing setting once. It won't tell you when a domain controller drifts later, and signing protects you only as far as your weakest DC. A GPO also shows what you intended, not what each DC is running.
Netwrix Change Tracker is a security configuration management tool. It baselines configuration on Windows servers, including domain controllers, and flags changes that don't match an approved change. It can import approved changes from ITSM tools such as ServiceNow, so planned work stays out of the way and unplanned changes stand out. It also reports each server against CIS Benchmarks. Netwrix holds CIS certification for Windows Server 2019 and 2025, including Domain Controller profiles, and results export to PDF, Excel, or CSV for audits.
Stop configuration drift across your domain controllers
See Netwrix Change Tracker in actionLDAP port FAQs
Share on
Learn More
About the author
Dirk Schrader
VP of Security Research
Dirk Schrader is a Resident CISO (EMEA) and VP of Security Research at Netwrix. A 25-year veteran in IT security with certifications as CISSP (ISC²) and CISM (ISACA), he works to advance cyber resilience as a modern approach to tackling cyber threats. Dirk has worked on cybersecurity projects around the globe, starting in technical and support roles at the beginning of his career and then moving into sales, marketing and product management positions at both large multinational corporations and small startups. He has published numerous articles about the need to address change and vulnerability management to achieve cyber resilience.