Port 389 — LDAP
Port 389 is LDAP, and on most corporate networks that means Active Directory. The directory holds every user, group, computer, organisational unit and much of the metadata that describes how the organisation is structured — and on port 389 the queries and the bind credentials travel in clear text unless StartTLS is negotiated.
Anonymous bind is the specific risk. Where it is permitted, an unauthenticated query enumerates users and groups, which is the single most valuable reconnaissance step against a Windows environment: it produces the username list for password spraying and the group structure for choosing targets. Even authenticated, a simple bind on plain 389 puts a domain credential on the wire in readable form.
Port 636 is LDAPS, TLS from the first byte, and is the port to use across any network segment you do not fully control. Note that 389 with StartTLS is not equivalent in practice — the upgrade can be skipped or stripped, and clients frequently fall back silently. Our reference marks 389 never and 636 care, which is the right asymmetry. LDAP is also a documented DDoS amplification vector, which is a second reason it should never be internet-reachable.
Port 389 at a glance
| Field | Value | Detail |
|---|---|---|
| Port | 389 | Well-known |
| Service | LDAP | Directory lookups — usually Active Directory. (TCP) |
| Category | Infrastructure | the plumbing: DNS, directory, routing, monitoring |
| Exposure | Never | Never expose to the internet |
Should port 389 face the internet? Cleartext directory queries: your entire user list. Also a DDoS amplifier.
Bind it to localhost or a private network. Mass scanners find these within minutes of a host appearing online.
What commonly goes wrong
“strong(er) authentication required” from Active Directory
Microsoft’s LDAP channel binding and signing enforcement rejecting a simple bind over an unencrypted connection. That is the correct behaviour; the fix is to move the client to LDAPS on 636 or to negotiate StartTLS properly, not to relax the domain controller policy.
An application only supports plain LDAP on 389
Common in older appliances and monitoring tools. Keep the traffic on a segment where cleartext is acceptable, give the application a dedicated read-only service account with the narrowest possible scope, and never let that account be a domain administrator — which is the shortcut such applications usually document.
Check port 389 yourself
No browser can open a raw TCP socket, so no web page can honestly tell you whether this port is open on a remote host. These are the real commands, generated for port 389 — swap example.com for the host you are actually testing.
Is port 389 reachable on another host?
nc -vz example.com 389"succeeded!" means the TCP handshake completed — the port is open. "Connection refused" is closed; a hang until timeout means filtered (a firewall dropped it silently).
nmap -Pn -p 389 example.comThe only common tool that distinguishes open / closed / filtered. -Pn skips the ping sweep, so it still works against hosts that ignore ICMP.
Test-NetConnection example.com -Port 389Read TcpTestSucceeded: True = open. It is built in — nothing to install.
telnet example.com 389A blank screen or a banner means it connected. "Connection refused" means closed. Quit with Ctrl-] then `quit`.
curl -v --max-time 5 telnet://example.com:389Handy when telnet is not installed: "Connected to …" proves the TCP handshake, without curl trying to speak HTTP.
What on this machine is holding port 389?
sudo ss -tlnp | grep :389Lists the listening socket and the PID/program holding it. Drop sudo and you get the socket but not the process name.
sudo lsof -i :389The macOS answer to "address already in use". Kill it with `kill -9 <PID>` once you are sure what it is.
netstat -ano | findstr :389The last column is the PID. Match it in Task Manager’s Details tab, or `taskkill /PID <pid> /F`.
No web page can tell you whether a port is open on a remote host
A browser cannot open a raw TCP socket — there is no API for it, by design. So a site that reports “port 3389 is OPEN on 203.0.113.10” is not checking from your browser; it is asking its own server to scan on your behalf. That works, but it means their server sees the host you asked about, scans from their address rather than yours, and answers a question about their network path, not yours.
We don't have a server here and won't pretend to. So this page does three honest things instead:
| Port | Proto | Service | What it is | Exposure | |
|---|---|---|---|---|---|
| 389 | tcp | LDAP | Directory lookups — usually Active Directory.Cleartext directory queries: your entire user list. Also a DDoS amplifier. | Neverbrowser-blocked | |
| 3389 | tcp | RDP | Windows Remote Desktop.Never bare — use a VPN or an RD Gateway. This is the single most common ransomware entry point, via credential stuffing and BlueKeep-class bugs. | Never |
http://host:port/ and times it. A connection that is established proves a socket is open; an instant refusal usually means nothing is listening; anything else is honestly reported as “can't tell”. Each attempt gives up after 2.5s.nc -vz example.com 443
nmap -Pn -p 443 example.com
telnet example.com 443
curl -v --max-time 5 telnet://example.com:443
This page cannot answer that, and neither can any other page — from your browser. Opening a TCP connection to an arbitrary host and port is not something JavaScript is allowed to do. Every “open port checker” that gives you a green tick is running the scan on their server. Which is fine, as long as you know what you are agreeing to: they learn which host and port you were worried about, and the answer they give you is about the route from their data centre — not from the internet as your users see it.
What to do instead
Run the check from outside your own network. Copy an nmap or nc line from the card above and run it from a machine that is not behind the same router — a phone on mobile data with a terminal app, a cheap VPS, a colleague's laptop. Running it from inside the LAN tests the LAN, not the internet, and will happily say “open” while the world sees nothing.
Then check the thing that is actually blocking it, in this order: the service is bound to0.0.0.0 and not 127.0.0.1 · the host firewall (ufw, firewalld, Windows Defender Firewall) · the cloud security group or the router's port-forward rule · and finally your ISP, which commonly blocks 25, 80 and 445 on residential lines whatever you configure.
What a browser genuinely can verify
One thing: that an HTTPS service answers. If what you actually want to know is “is my site up and how fast is it”, the latency test measures real round trips to a CORS-open URL. If the name doesn't resolve, or resolves somewhere unexpected, that is a DNS problem, not a port problem — and it is the more common cause of “my port is closed” than an actual firewall.
An IP address finds the machine; a port picks which program on it gets the traffic. TCP sets up a connection first — a handshake, ordered delivery, retransmission — which is why the web, email and SSH use it. UDP just sends the packet with no handshake and no guarantee it arrives, which is why DNS, video calls and games use it: late data is worse than lost data.
That difference is why a UDP port is so much harder to test. TCP either completes a handshake or it doesn't, so a tool can tell you. A UDP service that has nothing to say to an unexpected packet stays silent — and silence looks identical to a firewall dropping it.
The three ranges
0–1023Assigned by IANA to core services. On Unix, binding one needs root (or CAP_NET_BIND_SERVICE).1024–49151Registered by vendors for their applications. Any user can bind these — which is why every dev server lives here.49152–65535Never assigned. The OS hands these out as the SOURCE port of your outgoing connections. (Linux actually uses 32768–60999 by default.)Closed is not the same as filtered
Closed means the host answered: the packet arrived, nothing is listening, and you got an immediate refusal (a TCP RST). Filtered means nothing answered at all — a firewall dropped your packet in silence, so you wait for a timeout and learn nothing. The difference matters: closed proves the host is reachable and the port is free; filtered tells you only that something between you and it is discarding traffic.nmap reports the two separately. A browser cannot distinguish them, which is why this page reports a timeout as “can't tell” rather than guessing.
The one habit worth keeping
Bind services to 127.0.0.1 instead of 0.0.0.0 unless something outside the machine genuinely needs them, and reach them over SSH or a VPN. Every database on the never-expose list above ships with that advice, and the leaks all begin the same way: a default bind address, a cloud instance with a public IP, and a scanner that found it within the hour.
The blocked-port list this page uses is the WHATWG Fetch Standard's “bad port” table — the ports every browser refuses to connect to (Chrome calls it ERR_UNSAFE_PORT). Local probing is additionally gated by Chrome's Local Network Access permission, which replaced Private Network Access and ships in Chrome 142.
FAQ
Is LDAP on port 389 encrypted?
Only if StartTLS is negotiated AND the client insists on it. A simple bind that skips the upgrade puts a domain credential on the wire in readable form, and clients that merely prefer encryption will do exactly that. LDAPS on 636 removes the choice.
What is anonymous bind and why does it matter?
An LDAP connection with no credentials. Where the directory permits it, anyone who can reach port 389 can enumerate users and groups — the username list that makes password spraying possible. Disable it.
Should port 389 ever face the internet?
No. It exposes the directory that defines your identity system, in clear text, and is a known DDoS amplification vector. Directory access from outside belongs behind a VPN or a purpose-built federation endpoint.