0

I want to check whether the DNS is present in the Domain Controller or not? or is there a way to filter out domain controllers without the DNS?

3 Answers3

1

Technically a none dns server shouldnt have port 53 open as a request will goto port 53 but generated on a different port for the source computer. However to avoid systems that are misconfigured, use the nslookup command and specify the query server as the DC host. If it isnt running DNS, then it should fail to respond to your query.

Aalom
  • 19
  • 2
  • Hello Aalom, If I run the command (Get-ADDomainController -Filter * ).HostName | where { (Get-WindowsFeature -ComputerName $_ -Name DNS ) -ne $null} will I get Domain controller without DNS? is that correct? @borcan22 – Sheik Sena Reddy Dec 09 '21 at 07:29
  • Providing syntax and construct is correct i would say most of it looks good, except your doing a going to get results for systems with DNS, your querying for systems with DNS and then saying not equal to a null value, meaning it does return DNS. And you want without DNS then you should use -eq instead. – Aalom Dec 09 '21 at 15:11
  • Yes Correct, I did use eq to filter DC's without DNS. Thanks – Sheik Sena Reddy Dec 10 '21 at 12:06
0

To be sure, you can run wireshark or tcpdump to see what happens within host. Just listen to port 53 and look inside of some packets.

borcan22
  • 11
  • 2
0

We can use powershell script to filter Domain Controller's without DNS

(Get-ADDomainController -Filter * ).HostName | where { (Get-WindowsFeature -ComputerName $_ -Name DNS ) -eq $null}