Port 389 (LDAP)

BOTH

Lightweight Directory Access Protocol — LDAP listens on port 389 by default.

What is Port 389?

Port 389 is the default port for LDAP (Lightweight Directory Access Protocol), a standard protocol for accessing and managing directory information services. LDAP is widely used for centralized authentication, user management, and organizational directory services.

LDAP on port 389 enables applications to query directory servers for user information, authenticate credentials, and manage organizational data structures. Active Directory, OpenLDAP, and 389 Directory Server all use port 389. LDAP directories follow a hierarchical tree structure with entries identified by Distinguished Names (DNs).

LDAP on port 389 can transmit credentials in plain text during simple bind operations. Use LDAPS on port 636 or STARTTLS on port 389 for encrypted connections. LDAP servers contain sensitive organizational data and should be protected behind firewalls with proper access controls.

Port 389 Security

LDAP on port 389 should be secured with appropriate access controls and monitoring. Ensure the service is only accessible from trusted networks by configuring firewall rules to restrict access. If the protocol supports encryption, enable TLS/SSL to protect data in transit.

Regularly update LDAP to the latest version to patch known vulnerabilities. Monitor port 389 for unauthorized access attempts and implement rate limiting where possible. Follow the principle of least privilege when configuring access permissions.

How to Check Port 389

To check if port 389 is open on a remote host, use nmap: 'nmap -p 389 hostname'. For a quick TCP connection test, use: 'telnet hostname 389' or 'nc -zv hostname 389'. On Windows PowerShell, use: 'Test-NetConnection -ComputerName hostname -Port 389'.

To check if port 389 is listening on your local machine, use: 'netstat -tlnp | grep 389' on Linux, or 'ss -tlnp | grep 389'. On Windows, use: 'netstat -an | findstr 389'. For a comprehensive scan, use: 'nmap -sV -p 389 hostname' to detect the service version running on the port.

Related Ports

Frequently Asked Questions

What is port 389 used for?

Port 389 is the default port for Lightweight Directory Access Protocol (LDAP). It is used for ldap communication using the BOTH protocol.

Is port 389 TCP or UDP?

Port 389 uses BOTH. TCP provides reliable, ordered delivery while UDP is faster but connectionless.

Should port 389 be open?

Port 389 should only be open if you are actively running LDAP. Close unused ports to reduce your attack surface. If needed, restrict access to trusted IP addresses using firewall rules.

How do I check if port 389 is open?

Use 'nmap -p 389 hostname' to scan remotely, or 'netstat -tlnp | grep 389' to check locally on Linux. On Windows, use 'Test-NetConnection -Port 389 hostname' in PowerShell.

How do I secure port 389?

Secure port 389 by restricting access with firewall rules, using encryption (TLS/SSL) where supported, keeping LDAP updated, using strong authentication, and monitoring for unauthorized access attempts.

🔍 Check Your IP Address

While you're here, find out your public IP address, location, and ISP details instantly.

Check My IP →