?
Solved

Script Required to delete duplicate DNS records

Posted on 2008-06-25
5
Medium Priority
?
2,381 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 71

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 71

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 71

Accepted Solution

by:
Chris Dent earned 375 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

Need protection from advanced malware attacks?

Look no further than WatchGuard's Total Security Suite, providing defense in depth against today's most headlining attacks like Petya 2.0 and WannaCry. Keep your organization out of the news with protection from known and unknown threats.

Question has a verified solution.

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

Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Suggested Courses

764 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