Share via


Find the LDAP protocal port number

Question

Tuesday, March 24, 2015 10:47 AM

Hi,

Is there any command to find the LDAP port number on Domain Controller?

I have run the netstat -anb. But this return multiple ports.

Is there any way to change the LDAP port number and to find the changed port number.

Does LDAP port number stored in register or at some other location?

I would like to know exactly on which ldap ports is my domain controller listening. But The output of netstat commands does not mention it specifically.

Thanks

Sandeep Gupta

All replies (4)

Tuesday, March 24, 2015 11:24 AM ✅Answered | 5 votes

Hi,

1. List of domain controllers

nltest /dclist:Domain Name 

  1. How to check LDAP server & its Priority & Port in your Domain

Open Command Prompt - Start - CMD - Right click and say Run as Administration
Enter Administrator passwrd and you'll get Command Prompt
Type - nslookup & Press Enter
You'll be at nslookup prompt, Like this :- >
At nslookup prompt type -> set type=all
You'll be back on nslookup prompt again, then execute below command to find LDAP server & its priority & port number
 _ldap._tcp.dc._msdcs.domainname.com

Please mark as answer if this resolves your issue


Wednesday, March 25, 2015 5:48 AM ✅Answered

Hi,
 
Reference anandsarath’s suggestion, use NSLOOKUP on DC to find the port number used by LDAP.

I am wondering why you want to change the LDAP port number. It is nor recommend. There are default port numbers on DCs for communication/replication/authentication /etc. Reference:
https://technet.microsoft.com/en-us/library/dd772723(v=ws.10).aspx

you may try to use AD LDS to modify. Reference:
Modify the Communication Ports Used by an AD LDS Instance
https://technet.microsoft.com/en-us/library/cc794917(v=ws.10).aspx

Best Regards,
Eve Wang

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].


Monday, January 11, 2016 8:34 PM | 1 vote

This worked great, just to be clearer, you need to supply the domain name.

e.g.

 _ldap._tcp.dc._msdcs.{domainname.com}

Senior C# Consultant


Thursday, January 9, 2020 8:46 AM

Hi, thanks a lot.
These procedures helped me with that I needed.