ali*_*noi 4 networking linux dns home-networking ip
为了以低成本调整流量,我想知道特定域的地址范围,例如google.com
.
第一个选项是对一系列接近 的 IP 进行反向 DNS 查找dig google.com +short
。问题很明显:很容易错过一些东西。而且,这样扫描是不是有点不礼貌?
第二个选项是监视从名称服务器返回的 DNS 查询。名称服务器的 IP 不太可能改变,这很好。但是,我不知道如何教我的路由器 ( Mikrotik RB951G-2HnD ) 从 DNS 响应中提取 IP。
最后,事实证明,在某些情况下(即google.com
和vk.com
)子网范围存储在TXT
记录类型中。可以进行单个查询来获取这些:
dig txt google.com +short
Run Code Online (Sandbox Code Playgroud)
然而,并不是每个人都这样做。即使他们这样做了,如果 IP 范围发生变化,我也必须手动重新配置路由器。
问题:获取域的 IP 范围的首选方式是什么?如何保持该范围最新?
您可以尝试在返回的 IP 地址之一上使用 whois,至少对于像 Google 这样的 \xc2\xbbbig 玩家\xc2\xab 来说,他们拥有自己的服务器场,因此注册了自己的地址范围(不使用某些第三方的空间)。
\n\n$ dig google.com +short\n173.194.113.131\n173.194.113.137\n173.194.113.136\n[\xe2\x80\xa6]\n$ whois 173.194.113.131\n\n\n#\n# ARIN WHOIS data and services are subject to the Terms of Use\n# available at: https://www.arin.net/whois_tou.html\n#\n\n\n#\n# The following results may also be obtained via:\n# http://whois.arin.net/rest/nets;q=173.194.113.131?showDetails=true&showARIN=false&ext=netref2\n#\n\nNetRange: 173.194.0.0 - 173.194.255.255\nCIDR: 173.194.0.0/16\nOriginAS: AS15169\nNetName: GOOGLE\nNetHandle: NET-173-194-0-0-1\nParent: NET-173-0-0-0-0\nNetType: Direct Allocation\nRegDate: 2009-08-17\nUpdated: 2012-02-24\nRef: http://whois.arin.net/rest/net/NET-173-194-0-0-1\n\n\nOrgName: Google Inc.\nOrgId: GOGL\nAddress: 1600 Amphitheatre Parkway\nCity: Mountain View\nStateProv: CA\nPostalCode: 94043\nCountry: US\nRegDate: 2000-03-30\nUpdated: 2013-08-07\nRef: http://whois.arin.net/rest/org/GOGL\n\nOrgAbuseHandle: ZG39-ARIN\nOrgAbuseName: Google Inc\nOrgAbusePhone: +1-650-253-0000 \nOrgAbuseEmail: arin-contact@google.com\nOrgAbuseRef: http://whois.arin.net/rest/poc/ZG39-ARIN\n\nOrgTechHandle: ZG39-ARIN\nOrgTechName: Google Inc\nOrgTechPhone: +1-650-253-0000 \nOrgTechEmail: arin-contact@google.com\nOrgTechRef: http://whois.arin.net/rest/poc/ZG39-ARIN\n\n\n#\n# ARIN WHOIS data and services are subject to the Terms of Use\n# available at: https://www.arin.net/whois_tou.html\n#\n$\n
Run Code Online (Sandbox Code Playgroud)\n\n因此您想知道的范围是 173.194.0.0/16。
\n 归档时间: |
|
查看次数: |
13413 次 |
最近记录: |