One of my current projects is helping with the removal of a legacy DNS server. I am reviewing Wireshark logs to determine which devices are statically set to utilize the old DNS servers. These devices range from servers and workstations to printers, digital senders and ILO servers. Each device should be logged into, and updated with the new DNS server IP address.
Here is my process:
- Consolidate the Wireshark report. Wireshark generates a detailed report that contains the source and destination for each DNS transaction. Take this report then print it to a TXT file and save it to my local PC. I have written a script to pull out only the relevant information. It then attempts to do a WMI PING. If it get's a positive response, it then queries the NBT name, and system OS. The list is compiled into a CSV file and written to the C drive. (A 1mb file takes about 4 minutes to process).
- Clean-up the servers. My next step was to take all the Windows servers and run a cleanup process. Filtering on the OS, I copied all the
- Repeat... After a few repetitions of exporting the wireshark logs, I found that several of the servers didn't forget. They maintain the old DNS server in their DNS cache as a potential DNS server. That is why I created the last 3 scripts (zipped into DNS_Cleanup.zip). dd.bat while query and display the DNS cache. fd.bat runs a /flushdns command on the server/PC. UD.bat runs the DNSUpdate.vbs command on the server. So if after running dd.bat, I see it is using the old DNS, I hit F3, then HOME and change the DD to UD. If it is using the new DNS, I repeat it with FD just because.
Windows 2003 and XP IP addresses and created a new text file. Then I ran PSEXEC with my update script to touch each machine.
PSEXEC @Serverlist.txt "cscript.exe" "\\mypc\script$\dnsupdate.vbs"
The script updates the DNS server settings on each active NIC for the computer.
Hopefully these help you in your clean-up also!
| Attachment | Size |
|---|---|
| Scan Sniffer File.vbs.txt | 4.65 KB |
| dnsUpdate.vbs.txt | 4.52 KB |
| DNS_Cleanup.zip | 790 bytes |
Comments
Post new comment