Re: dns cleanup - delete all PTR records refering to a certain hostname

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



roman sommer wrote:
hello everyone,

I am writing a perl script which is (securely) updating A and PTR
records of *nix clients in a Microsoft environment (Microsoft Windows
2003 R2 servers in native mode). I need to know how Windows clients
update their PTR record. As far as I can see I can only query for an
ip address and get a hostname in return. I want to make sure I delete
*all* PTR resource records refering to a specific hostname before
adding the new one. To cut a long story short: "my hostname is
samehost.example.domain.com, delete all my existing PTR records".

If PTR records where registered by hostname it might work, but PTRs are
registered by IP number, not the data it contains. Just like A records,
which can have many records with the same name but different IPs, you can
have many PTRs with the same name, with different hostnames.
It would be unfeasible to lookup an A record by it IP, and it is unfeasible
to lookup a PTR by its hostname.
The problem is when a host leaves its PTR behind when it gets a new IP, it
cannot update the previous PTR because it no longer has the IP and doesn't
know it had it. So, it creates another.

I think the real trick would be having the client remove the record before
it gets disconnected. Laptop users are notorious for this and it is
unenforceable on them.

Two ways to keep the reverse lookup zone clean are; 1, enable scavenging on
the zone which is going to have some outdated PTRs; 2, Make the DHCP server
owner of all records and responsible for all registration so it can remove
old records as the lease expires.


As far as I can see Windows clients don't care about old PTR records
either. Or does it appear like that because they were added manually
for testing purposes?
Your first statement is true, the question can only be answered if you knew
someone was actually doing this.


--
Best regards,
Kevin D. Goodknecht Sr. [MVP]
Hope This Helps
===================================
When responding to posts, please "Reply to Group"
via your newsreader so that others may learn and
benefit from your issue, to respond directly to
me remove the nospam. from my email address.
===================================
http://www.lonestaramerica.com/
http://support.wftx.us/
https://secure.lsaol.com/
===================================
Use Outlook Express?... Get OE_Quotefix:
It will strip signature out and more
http://home.in.tum.de/~jain/software/oe-quotefix/
===================================
Keep a back up of your OE settings and folders
with OEBackup:
http://www.oehelp.com/OEBackup/Default.aspx
===================================


.



Relevant Pages

  • Re: Networking -- use of two Internet connections for one server with round robin DNS -&
    ... -Check that sender IP address has a PTR. ... -Check that HELO resolves in public DNS either to a domain or an A ... use the PTR hostname for anything, as it is long and rambling, though ... I occasionally use telnet to connect to a mail server to verify ...
    (Debian-User)
  • Re: IP ADDRESS
    ... machines in DNS or RDNS, or that you have them all in DNS & RDNS. ... GET THE HOSTNAME FOR THE DEVICE ... LNS = DCOUNT) ... FOR PTR = 1 TO LNS ...
    (comp.databases.pick)
  • Re: DNS PTR Question
    ... DNS Server ... Sendmail Server ... The problem here is assigning the PTR, ... The usual technique is to assign an A record to the hostname you're ...
    (Fedora)
  • Re: dns cleanup - delete all PTR records refering to a certain hostname
    ... Disregard old PTR ... I need to know how Windows clients ... ip address and get a hostname in return. ... It would be unfeasible to lookup an A record by it IP, ...
    (microsoft.public.windows.server.dns)
  • Re: Moving Email inhouse - btopenworld
    ... I'm not sure the first statement is up to date. ... I had a few clients over the ... last few months that run into issues and getting the PTR fixed solved their ... Sorry if this is a dumb question, but I want to make sure all is set ...
    (microsoft.public.windows.server.sbs)