Solved

Script Required to delete duplicate DNS records

Posted on 2008-06-25
5
2,362 Views
Last Modified: 2011-01-06
Good Day..

We are having an issue with DNS records being duplicated in Active directory. Domain controllers are running Windows server 2003.
If a user connects in from home over the VPN the following day when they try and connect in the office they are having problems connecting to parts of the network as the dns record discovered using nslookup and other tools does not match the settings on their PC. Looking into the DNS records they have 1 DNS record with their normal IP address and then a second entry with the IP address assigned to the vpn connection.  The vpn connections are created using a Cisco VPN3005 concentrator.

This can happen to a few select people and they will not be able to connect to devices on our network until the "vpn" DNS record is removed.

I was thinking that a script could be run in powershell that will search for multiple instances of that user and then remove the false record.  For example we have a record markc.domain.ds whio normally is assigned an ip address of 192.168.15.114, however after using the vpn connection he also has a record for the ip address 192.168.0.71 and this causes the conflict.

Alternatively if anyone could suggest a settings change to our DNS system that would clear these records that would work just as well.  we are thinking that it would be a setting on the Cisco Concentrator that needs changing.
any and all help welcome


Kind Regards


Robert Dent
0
Comment
Question by:vodyanoi
  • 3
  • 2
5 Comments
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21863576

Hey Robert,

Interesting coincidence on the surname :)

Your situation suggests that DNS entries for your network are updated by your DHCP server. If that is the case the record for the internal network cannot be removed until the lease expires on the internal DNS Server.

Perhaps the easiest way to resolve this in the long run is to set the clients to update DNS directly (anything from Windows 2000 upwards can do that). All you have to do to allow them to update is disable the updates from DHCP.

If this is done a client connecting on the VPN will have permission to Update their existing record rather than making a new one.

HTH

Chris
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 21863588

One more bit I forgot to mention.

In either case you will need to check your Aging / Scavenging settings. That won't help when two records are being created naturally (rather than duplicates because of age).

Chris
0
 

Author Comment

by:vodyanoi
ID: 21914594
thanks Chris

i dont know if this will solve my issue but will look into the suggestion...

Rob Dent
0
 
LVL 70

Accepted Solution

by:
Chris Dent earned 125 total points
ID: 21914605

There is one issue I should have mentioned.

The current record registered in DNS will only allow updates by the DHCP Server. The client will not be able to update correctly until the current record is Scavenged (or manually deleted).

Chris
0
 

Author Closing Comment

by:vodyanoi
ID: 31470475
thanks for the advice you have provided, not sure if we will go down this road but since the complaint hasnt come through since i posted the question it may have solved itself.

Rob Dent
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now