我的服务器有 2 个 ips:xxx73 和 xxx248。我可以使用 Web 浏览器通过这些 ip 访问我的站点。
{现在,从 CentOS 机器(不是我的服务器),使用终端}
如果我:
dig @x.x.x.73 mydomain.com
dig @x.x.x.248 mydomain.com
Run Code Online (Sandbox Code Playgroud)
我得到结果:
Connection timed out; no server could be reached.
Run Code Online (Sandbox Code Playgroud)
有人可以告诉我如何修复它吗?谢谢你。
更多信息:
如果我使用 ssh 登录到我的服务器并执行以下操作:
dig @x.x.x.73 mydomain.com
dig @x.x.x.248 mydomain.com
Run Code Online (Sandbox Code Playgroud)
我可以看到我的区域按预期显示:
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5_7.1 <<>> @x.x.x.73 mydomain.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12757
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: …Run Code Online (Sandbox Code Playgroud) I'm just asking for a possibility of having both ipv4 and ipv6 configurations in one domain.
If I do dig <domain>, inside the ADDITIONAL SECTIONS will display the A and AAAA records.
Are there any drawbacks of referring to both records for that domain?
Updated:
Results of the query:
;; ANSWER SECTION:
example.edu.my. 1142 IN A 202.75.5.xxx
;; AUTHORITY SECTION:
xxx.edu.my. 11626 IN NS dns2.xxx.xxx.xxx.
xxx.edu.my. 11626 IN NS dns1.xxx.xxx.xxx.
;; ADDITIONAL SECTION:
dns2.xxx.xxx.xxx. 1976 IN A 202.75.5.xxx
dns2.xxx.xxx.xxx. …Run Code Online (Sandbox Code Playgroud) 我正在使用安装了 Bind 9 的 Fedora 17,尝试配置 DNS,但我已经解决了一个问题:
现在 ipv4 和 ipv6 映射有效,反向 ipv4 映射也有效,但问题在于反向 ipv6。在我的 named.conf 文件中有这个区域:
zone "3.1.0.0.0.0.0.0.0.0.0.2.ip6.arpa" IN {
type master;
file "reverse6.zone";
};
Run Code Online (Sandbox Code Playgroud)
这是 reverse6.zone 文件:
$TTL 48h
$ORIGIN 3.1.0.0.0.0.0.0.0.0.0.2.ip6.arpa.
@ IN SOA gruppo13.labreti.it. master.gruppo13.labreti.it. (
2013032511
1d
2h
4w
1h
)
IN NS gruppo13.labreti.it.
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN PTR gruppo13.labreti.it.
2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN PTR dns.gruppo13.labreti.it.
8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN PTR www.gruppo13.labreti.it.
3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN PTR mail.gruppo13.labreti.it.
Run Code Online (Sandbox Code Playgroud)
使用 dig 我可以找到一个 ip6 地址,但如果我反过来:
$ dig -x AAAA 2000:0:d::1
Run Code Online (Sandbox Code Playgroud)
我没有得到答案,这是 dig 输出:
; <<>> …Run Code Online (Sandbox Code Playgroud) 我正在使用 dns 来管理我的虚拟主机。为了做到这一点,我使用 host 命令查询我的名称服务器以获取某些值。例如:
> host -t txt mycl1.vz
mycl1.vz.myserver.de descriptive text "1026"
Run Code Online (Sandbox Code Playgroud)
但我只需要1026作为没有喋喋不休的答案。目前我正在使用 sed 将其删除,例如:
| sed -e 's/.*descriptive text "\(.*\)"/\1/'
Run Code Online (Sandbox Code Playgroud)
但这似乎有点“不稳定”,我想知道是否有一些命令可以首先给我简单的输出?
我目前正在试验该dig命令,因为我的新注册域有问题。
当我dig @dns.dns1.de overminded.de在我的一台 Debian 服务器上执行时,我得到以下结果:
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @dns.dns1.de overminded.de
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30506
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;overminded.de. IN A
;; ANSWER SECTION:
overminded.de. 86400 IN A 92.222.252.3
;; Query time: 21 msec
;; SERVER: 2a02:2940:0:a0d1::246#53(2a02:2940:0:a0d1::246)
;; WHEN: …Run Code Online (Sandbox Code Playgroud) 昨天,我的一个域名过期了,所以我的一个网站宕机了。我很清楚 dns 缓存,但我认为我错过了一些东西。
我的网站并没有到处停机(多亏了 dns 缓存)。但是,例如 Google dns 服务器给出的结果与两个服务器不同。怎么来的 ?
我的 DNS 有 .paris 扩展名(巴黎启动)
在我的电脑上,它运行良好。这是 dig 的结果:
dig @8.8.8.8 mydomain.paris
; <<>> DiG 9.8.3-P1 <<>> @8.8.8.8 mydomain.paris
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 189
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;mydomain.paris. IN A
;; ANSWER SECTION:
mydomain.paris. 27 IN A 104.25.219.14
mydomain.paris. 27 IN A 104.25.218.14
;; …Run Code Online (Sandbox Code Playgroud) 我正在尝试将一些信息发送到www2.agenciatributaria.gob.es。我可以从多个主机上执行此操作,但只有一个。
从这里我得到错误Temporary failure in name resolution。但是,从同一主机,我可以通过其默认 DNS 访问许多其他服务器(我可以 ping www.google.es等)。
所以我用 dig 来检查发生了什么。如果我执行dig www2.agenciatributaria.gob.es,则通过 127.0.0.53 上的 DNS 搜索远程主机的 IP,结果是错误的(尽管如此,如果我挖掘www.google.es ,结果是成功的):
; <<>> DiG 9.16.1-Ubuntu <<>> www2.agenciatributaria.gob.es
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 58113
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;www2.agenciatributaria.gob.es. IN A
;; Query …Run Code Online (Sandbox Code Playgroud) 我发现了一篇类似的帖子,但我的用户无法发表评论。
我想知道为什么dig @8.8.8.8 domain.com在几秒钟内多次运行时会打印出不同的“倒计时”,就好像该域以不同的 TTL 缓存在 8.8.8.8 内的不同位置一样。
例如,
dione@saturno:~$ dig serverfault.com @8.8.8.8 +noall +answer
; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> serverfault.com @8.8.8.8 +noall +answer
;; global options: +cmd
serverfault.com. 39 IN A 198.252.206.140
dione@saturno:~$ dig serverfault.com @8.8.8.8 +noall +answer
; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> serverfault.com @8.8.8.8 +noall +answer
;; global options: +cmd
serverfault.com. 288 IN A 198.252.206.140
dione@saturno:~$ dig serverfault.com @8.8.8.8 +noall +answer
; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> serverfault.com @8.8.8.8 +noall +answer
;; global options: +cmd …Run Code Online (Sandbox Code Playgroud) 我最近经历了来自一对机器的 XML-RPC 攻击与 wordpress 攻击,其中 dig -x 返回了一个非常非常奇怪的结果:
;; ANSWER SECTION:
54.249.96.191.in-addr.arpa. 60 IN PTR DEDICATED.SERVER.
Run Code Online (Sandbox Code Playgroud)
我以前从未见过名为 DEDICATED 的 TLD。我从我的家用机器和亚马逊内部得到了相同的结果......
我在 ubuntu 18.04 下,有 DNS 问题,所以我使用dig命令来调试我的 DNS。
事情是,当我挖掘像 的站点redhat.com或我的配置良好的 DNS 时,我总是得到一个FORMERR状态,而且似乎SERVER总是设置为 127.0.0.1:53。
? dig redhat.com
; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> redhat.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: FORMERR, id: 14902
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 0929f0a01195f776 (echoed)
;; QUESTION SECTION:
;redhat.com. IN A
;; Query time: …Run Code Online (Sandbox Code Playgroud) dig ×10
bind ×2
domain-name ×2
ipv6 ×2
cache ×1
fedora ×1
host ×1
linux ×1
networking ×1
ttl ×1