Security
Risk: Medium
Port 389 β LDAP Directory Service
Port 389 is the default port for Lightweight Directory Access Protocol (LDAP) and Active Directory Domain Services, used for centralized enterprise user authentication and directory queries.
PORT NUMBER
389
PROTOCOL
TCP
DEFAULT PROCESS
slapd, lsass.exe, openldap
FIREWALL TARGET
389/tcp
Instant Terminal Fixes for Port 389
macOS & Linux Terminal
1. Check who is listening on port 389:
sudo lsof -i :389 || sudo ss -tulpn | grep ":389 "2. Kill process occupying port 389 (EADDRINUSE fix):
sudo systemctl stop slapd3. UFW Firewall Allow rule:
sudo ufw allow 389/tcpWindows PowerShell (Admin)
1. Check listening port:
Get-NetTCPConnection -LocalPort 3892. Force kill process on port 389:
Stop-Service NTDS -Force -ErrorAction SilentlyContinue3. Docker Port Forwarding Mapping:
docker run -p 389:389 -d osixia/openldap:latestCommon Error Encountered
ldap_bind: Can't contact LDAP server (port 389).
Security Advisory & Hardening
Ensure STARTTLS is enforced or migrate clients to LDAPS (Port 636) to prevent credentials from being intercepted over the wire.
Frequently Asked Questions
Port 389 Questions & Answers
Common questions regarding default services, kill commands, and firewall configurations.
Port 389 is commonly used for LDAP Directory Service. Port 389 is the default port for Lightweight Directory Access Protocol (LDAP) and Active Directory Domain Services, used for centralized enterprise user authentication and directory queries.