SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    352
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Listen to NameServer Change

    Does anyone know how to setup a server to listen for a Domain Name Server change from registrar. For example if someone was to purchase a domain and point it to my server NS1.MyServer.com NS2.myserver.com my server would be ping of this request and from there i can run a php script.


    I know its possible; the last job i worked at the linux admin set it up; which i thought was the coolest technique I would love to learn.
    Sr. Website Developer and Internet Marketing
    www.CarlosJa.com Note: If anyone
    needs to get ahold of me please feel free to email me through
    my site. Apparently i missed quite a few private messages.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    There's no generic API that tells you when someone has pointed their nameservers at your server.

    But there are two ways you can discover that information without anybody notifying ("pinging") you:

    1) If someone's pointed their nameservers to you, and then someone tries to access that domain in any software, it's going to result in your name server getting a DNS query to resolve the domain. Hook into your local nameserver somehow (depends on what DNS daemon you run) and you'll know about new domains you're being queried for. Do your own DNS lookup to find out if you're listed as authoritative for those domains.

    2) Get access to the .COM, .NET, .ORG etc. root zone files. This is harder, since AFAIK it's only given out with permission by the companies that run those registries. If you can get access, you can poll the file for new domains listing your server as their nameserver.

    Your admin had probably done #1. Here's some info about telling BIND (the most common DNS system) to log its queries: http://www.cyberciti.biz/faq/howto-e...erver-logging/

    Once you have that, all you need is a script to watch the logs for domains you haven't seen before.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •