[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Is there an easy way to determine manually entered DNS addresses

Posted on 2012-03-21
6
Medium Priority
?
686 Views
Last Modified: 2012-06-27
Over the years we have had different IT persons create manual DNS entries for servers, applications, etc. A lot of these entries are for old server names that no longer exist in active directory or our environment as a whole.

Short of opening up the DNS console and going line by line is there an easy way to determine the manually created DNS entries so that I can find and remove the ones that are no longer needed.
0
Comment
Question by:Joseph Daly
6 Comments
 
LVL 57

Expert Comment

by:Mike Kline
ID: 37746970
I'll have to test your question, won't blow smoke...not sure, but if you haven't cleaned up DNS in a long time have you thought about enabling scavenging on your DNS server and zones?

http://blogs.technet.com/b/networking/archive/2008/03/19/don-t-be-afraid-of-dns-scavenging-just-be-patient.aspx

That is a good first step for cleanup.

Thanks

Mike
0
 
LVL 99

Expert Comment

by:John Hurst
ID: 37746975
No way I know of, since the entries were created over time. You need to review the entries and remove the ones that are not needed. I always make a list first in case I need to go backward. ... Thinkpads_User
0
 
LVL 6

Expert Comment

by:netjgrnaut
ID: 37747182
Thinkpads_user is correct.  Scavenging will (should?) only impact dynamic records, though if static records are created w/a TTL value - it can have unexpected results.  The scavenging process certainly doesn't have any "do what I mean, not what I say" logic in it - e.g. it doesn't know the difference between an old-but-frequently-used entry and the type of cruft you're trying to clean up.

Perhaps more to the point: what is driving this DNS cleanup?  Are forward or reverse responses coming out with conflicting/invalid data?  It's not like there's any great benefit to deleting things you *think* you don't need from DNS per se.

On the other hand, if you've really got a good grasp on what a *clean* zone should look like, I'd recommend provisioning a new *temp* DNS server as the primary with the *clean* zone file.  Then configure your current primary DNS server as a secondary, pointing to the new primary.  This will push the clean zone to the *real* primary.  Finally, reconfigure the *real* primary as... primary - and deprovision the temp DNS server.  All your current secondaries will pull the new *clean* zone data from the *real* primary, once it is again authoritative for the zone.

Hope that helps...
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
LVL 17

Assisted Solution

by:Tony Massa
Tony Massa earned 1000 total points
ID: 37748546
Ease is a relative term, so here's some info.  AD-Integrated DNS zones stores each record in AD, so you can certainly query them with any LDAP-compliant tool, like ADFind.

Here is the ADfind command to find the owner of all DNS records or just one.  If a DNS record is owned by a user (or unresolvable), then it is most likely a static DNS record.

adfind -default -owneronly -resolveSIDs -f objectClass=dnsNode
adfind -default -owneronly -resolveSIDs -f "(&(objectClass=dnsNode)(name=DNS-RECORD-NAME))"

Open in new window


Here, someone is using powershell cmdlets to find DNS security information that may be helpful:
http://social.technet.microsoft.com/Forums/hu/winserverpowershell/thread/04c74ee1-6b5d-484a-a32e-1d974ffe933d

Note: You will want to export the adfind output (for multiple records) to a CSV file.
0
 
LVL 26

Accepted Solution

by:
Leon Fester earned 1000 total points
ID: 37756029
Manually created DNS entries would be static records, as such they won't have timestamp.
Enabling scavening won't cleanup records that don't have a timestamp.

You can export the DNS server zone file from the DNS console.

Open DNS console
Navigate to your forward lookup zones,
Right click the DNS Zone name and click Export.
Save the file as .csv

Open file in excel and sort the .csv file by date and you'll have a list of all static entries.

You can then use Excel's =concatenate function to complete the appropriate DNSCMD command.

dnscmd ServerName /recorddelete ZoneName NodeName RRType RRData
e.g. dnscmd myDC1 /recordelete myDNS.ZoneName myServerName A 10.0.0.1

More info on DNSCMD command
http://technet.microsoft.com/en-us/library/cc756116(v=ws.10).aspx

It's very useful when you've got to manually prune your DNS Database.

P.S. Always backup your DNS zone before deleting records.
0
 
LVL 35

Author Closing Comment

by:Joseph Daly
ID: 37761296
Thanks
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question