开发者

How to implement your own WHOIS server?

How would you get the WHOIS information to provide in the first place?

Note that I'm not actually intending to do this; I'm just interested in how it would work!开发者_运维问答


Simply implement the whois protocol https://www.rfc-editor.org/rfc/rfc3912

You get a query, you look it up in your database and you send your answer. That's it. Have a look at the example:

   open TCP   ---- (SYN) ------------------------------>
              <---- (SYN+ACK) -------------------------
   send query ---- "Smith<CR><LF>" -------------------->
   get answer <---- "Info about Smith<CR><LF>" ---------
              <---- "More info about Smith<CR><LF>" ----
   close      <---- (FIN) ------------------------------
              ----- (FIN) ----------------------------->

How to build your own database, it depends on what information you want to provide.


This is, as far as i know, a very big ask.

DNS information and the DNS database is large and frequently updated. As such, only the "big providers" (peering companies, google, verizon, etc...) have arrangements to share that data.

There are a number of paid DNS query services out there. I can't remember them off the top of my head, but one of them charged something like $1000 for five million lookups.

Alternatively you've got http://whois.domaintools.com or any number of similar web pages.

The limiting factor is that mass querying the whois database will result in a blocked IP. So you're stuck. Either build a distributed system of servers querying and parsing whois lookups all day, or pay for it.

The investment in a 'real' DNS system would likely start on the order of $50k.

At least "IMO" I could be way off on that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜