SY0-701 Objective 4.5

Which port should the firewall allow for LDAPS?

A help desk app looks up user accounts in the company directory. A security review finds that these lookups cross the network in plain text, including the password of the app's service account. The team wants to keep using LDAP, but TLS must be in place before any LDAP message is sent. Which port should the firewall allow between the app and the directory server?

  1. A. TCP 389
  2. B. TCP 443
  3. C. TCP 636
  4. D. TCP 22
Show the answer and explanation

Correct answer: C. TCP 636

LDAPS is LDAP over TLS. The client and server build the TLS tunnel first. Only then do any LDAP messages travel, so the bind (login) credentials and the query results are never visible on the wire. LDAPS uses TCP port 636.

The key words in the scenario are “TLS must be in place before any LDAP message is sent.” That rules out plain LDAP on 389, even with StartTLS, because StartTLS begins with a plain-text LDAP request and upgrades later.

Good to know for the exam: in Active Directory, the Global Catalog also has a plain port (3268) and a TLS port (3269). If you see those numbers, the same plain-versus-secure pattern applies.

Why the other options are wrong

  • A. TCP 389: Port 389 is plain LDAP. The connection starts unencrypted. StartTLS can upgrade a connection on 389, but the first LDAP message (the StartTLS request) is still plain text, and that is not LDAPS.
  • B. TCP 443: Port 443 is HTTPS. It protects web traffic, not directory queries from an LDAP client.
  • D. TCP 22: Port 22 is SSH, used for secure remote shells and SFTP. LDAP clients do not use it.
Memory hook

Plain LDAP lives at 389. Add the S and move to 636. Say it as "six-three-six, sealed with TLS."

Exam objective 4.5: Given a scenario, modify enterprise capabilities to enhance security.

Want 400 questions like this?

The Security+ Core Kit has 400 questions in this format, tagged by objective, plus cheat sheets, flashcards and a 4-week plan.

More practice questions

Found a mistake? Report it. The goal is a fix within 48 hours.