当我知道它们存在时,为什么dns_get_record不会显示CNAME? [英] Why wouldn't dns_get_record show CNAMEs when I KNOW they exist?

查看:152
本文介绍了当我知道它们存在时,为什么dns_get_record不会显示CNAME?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在玩PHP中的DNS记录查找,并且遇到了一些令人困惑的事情。我已经查看了两个不同的域,每个域使用不同的主机和不同的权威名称服务器。我知道的这两个域都有CNAMES。



我已经使用这个在线工具查找了DNS记录: http://network-tools.com/
我也使用PHP的dns_get_record查找了它们。 A,NS,SOA,MX等都回来了。但没有CNAMES。我得到虚假/空数组。



在这两种情况下,我可以登录这些域的DNS控制,并查看CNAMES。



为什么世界会发生这种情况?目标是允许在将客户端的域更改为我公司的名称服务器之前查找并保存所有DNS记录(以便我们不会意外地从外部托管电子邮件设置)。像pop.domain.com这样的CNAMES在这里将是非常关键的,但是我找不到的查询会承认它们存在。



真正的问题当然是PHP函数不归还他们,因为那真的是我需要的。



但是这让我很困惑,我在别处找不到。特别是因为我正在看着他们在我可以添加和删除DNS记录的地方。在这里说:



pop.domain.com CNAME pop.secureserver.net 0 900



(PHP版本5.2.6
Linux 2.6.9-67.0.15.plus.c4smp)

解决方案

我想我想出了为什么我相信这跟这个线程的区域转移有关是否可以找到给定域名的所有DNS子域?



我期望的是相同的功能 的CNAME查找为A,NS,MX - 。 (几乎不现实的期望...)

  dns_get_record(domain.com,DNS_CNAME,$ authns_cname,$ addtl_cname); 

我希望得到一个填充有为domain.com设置的所有CNAMES的数组。这不是怎么回事




  • 我可以获取www.domain.com的单个CNAME
    条目,如果那是
    我传入的域名,并有一个CNAME。

  • 我可以获取
    返回单个CNAME条目
    * .domain.com如果是域名
    我传入,并有一个CNAME。

  • 不能返回
    字面上所有的CNAME记录,以便保存domain.com,通配符搜索或
    的所有CNAMES /子域/第三级域
    的记录。



我想我只需要对这个问题进行短语(第15个排列找到有希望的答案)。我认为这两个名称服务器(Dreamhost和我公司的)都被保护了。虽然在我看来,与其他DNS记录相比,我看起来并不是非常敏感的信息。


I'm playing with DNS record lookup in PHP and am running into something confusing. I've looked up 2 different domains each using different hosts and different authoritative name servers. Both of these domains I know for certain have CNAMES.

I've looked up DNS records using this online tool: http://network-tools.com/ I've also looked them up using PHP's dns_get_record. A, NS, SOA, MX, etc. all come back. But no CNAMES. I get false/empty array.

In both cases I can log into the DNS control for these domains and see the CNAMES.

Why in the world would this be happening? The goal is to allow lookup and saving of all of the DNS records at the time prior to changing a client's domains to my company's nameservers (so that we don't accidentally externally hosted e-mail settings). CNAMES like pop.domain.com are going to be reasonably critical here, but no lookup I can find will admit they exist.

The real problem is of course the PHP function not returning them, since that's really where I need it.

But it confuses me that I can't find them elsewhere. Especially because I'm looking right at them in the place where I can add and remove DNS records. Says right here:

pop.domain.com CNAME pop.secureserver.net 0 900

(PHP Version 5.2.6 Linux 2.6.9-67.0.15.plus.c4smp)

解决方案

I think I've figured out why. I believe this has to do with "Zone Transfers" per this thread Is it possible to find all DNS subdomains for a given domain name?.

What I expect is the same functionality from the CNAME lookup as A, NS, MX--EVERYTHING ELSE. (Hardly an unrealistic expectation...)

dns_get_record("domain.com", DNS_CNAME, $authns_cname, $addtl_cname);

I expect to get back an array populated with all the CNAMES set up for domain.com. That's not what happens.

  • I can get back the single CNAME entry for "www.domain.com" if that is the domain I pass in and there is a CNAME for it.
  • I can get back the single CNAME entry for "*.domain.com" if that is the domain I pass in and there is a CNAME for it.
  • I cannot get back literally all the CNAME records in order to save a record of all the CNAMES/subdomains/third level domains for domain.com, wildcard search or not.

I suppose I just had to phrase the question right (15th permutation found that promising answer). I assume both name servers (Dreamhost and my company's) are "protected" against this. Though it seems to me not to be terribly sensitive information in comparison to the rest of the DNS records.

这篇关于当我知道它们存在时,为什么dns_get_record不会显示CNAME?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆