whois 命令的默认 whois 服务器是什么?

whois 命令的默认 whois 服务器是什么?

使用该命令时查询的默认whois服务器是什么whois

我使用一个/etc/whois.conf文件来管理查询命令的服务器whois。文件的内容基于这个超级用户的回答。如果我使用 .com () 答案中列出的服务器whois.verisign-grs.com,则对在 GoDaddy 注册的域名的所有查询都会返回不完整的记录。

但是,如果我注释掉文件中 .com 的条目,那么将返回 GoDaddy 注册域名的完整 whois 记录。

因此我想弄清楚在whois使用默认查找设置时正在查询哪个服务器。

答案1

您可以使用strace调试工具来查找实际使用的内容:

strace --trace=sendmmsg --verbose=all -s 64 -o whois.strace.log whois google.com

whois.strace.log

sendmmsg(3, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\305\300\1\0\0\1\0\0\0\0\0\1\5whois\fverisign-grs\3com\0\0\1\0\1\0\0)\4\260\0\0\0\0\0\0", iov_len=51}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=51}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\375\304\1\0\0\1\0\0\0\0\0\1\5whois\fverisign-grs\3com\0\0\34\0\1\0\0)\4\260\0\0\0\0\0\0", iov_len=51}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=51}], 2, MSG_NOSIGNAL) = 2
sendmmsg(3, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="8\333\1\0\0\1\0\0\0\0\0\1\5whois\vmarkmonitor\3com\0\0\1\0\1\0\0)\4\260\0\0\0\0\0\0", iov_len=50}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=50}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\f\336\1\0\0\1\0\0\0\0\0\1\5whois\vmarkmonitor\3com\0\0\34\0\1\0\0)\4\260\0\0\0\0\0\0", iov_len=50}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=50}], 2, MSG_NOSIGNAL) = 2
+++ exited with 0 +++

答案2

当打开 whois 的手册页时,它有以下描述:

描述 whois 在 RFC 3912 数据库中搜索对象。

此版本的 whois 客户端会尝试猜测正确的服务器以请求指定对象。如果无法猜测,它将连接到 whois.networksolutions.com 获取 NIC 句柄,或连接到 whois.arin.net 获取 IPv4 地址和网络名称。

答案3

man whois

   This version of the whois client tries to guess the right server to ask
   for the specified object. If no guess can be made it  will  connect  to
   whois.networksolutions.com  for  NIC handles or whois.arin.net for IPv4
   addresses and network names.

和:

   If the /etc/whois.conf configuration file exists, it will be  consulted
   to  find  a  server  before applying the normal rules. Each line of the
   file should contain a regular expression  to  be  matched  against  the
   query  text and the whois server to use, separated by white space.  IDN
   domains must use the ACE format.


   WHOIS_SERVER
          This  server  will  be queried if the program cannot guess where
          some kind of objects are located. If the variable does not exist
          then whois.arin.net will be queried.

因此,取决于/etc/whois.confWHOIS_SERVER

  • whois.networksolutions.com 获取 NIC 句柄
  • whois.arin.net 获取 IPv4 地址和网络名称。

答案4

首先,您的本地 whois 客户端正在联系中央注册机构 (IANA) 并询问负责的域名注册商。客户端正在按照层次结构参考向下找到注册商,您可以向其提供所需的信息。来源:https://whois.icann.org/en/dns-and-whois-how-it-works

相关内容