最常用的 几个 nslookup 命令
查询 IP 地址:
可以使用如下命令查看有多少个A记录及对应的IP地址。
[root@iZwz9bryvndk026nx3zcxxZ ~]# nslookup 199604.com
Server: 100.100.2.136
Address: 100.100.2.136#53
Non-authoritative answer:
Name: 199604.com
Address: 47.106.219.211
查询特定类型的 DNS 记录:
[root@iZwz9bryvndk026nx3zcxxZ ~]# nslookup -query=MX 199604.com
Server: 100.100.2.136
Address: 100.100.2.136#53
Non-authoritative answer:
199604.com mail exchanger = 10 mxbiz2.qq.com.
199604.com mail exchanger = 5 mxbiz1.qq.com.
Authoritative answers can be found from:
通过检查NS 记录,您可以看到哪个是特定域的权威服务器
[root@iZwz9bryvndk026nx3zcxxZ ~]# nslookup -type=ns 199604.com
Server: 100.100.2.136
Address: 100.100.2.136#53
Non-authoritative answer:
199604.com nameserver = f1g1ns1.dnspod.net.
199604.com nameserver = f1g1ns2.dnspod.net.
Authoritative answers can be found from:
此查找的范围很大。
[root@iZwz9bryvndk026nx3zcxxZ ~]# nslookup -type=any 199604.com
Server: 100.100.2.136
Address: 100.100.2.136#53
199604.com hinfo = "RFC8482"
使用特定的 DNS 服务器:
[root@iZwz9bryvndk026nx3zcxxZ ~]# nslookup 199604.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: 199604.com
Address: 47.106.219.217
反向查询 IP 地址:
[root@iZwz9bryvndk026nx3zcxxZ ~]# nslookup 8.8.8.8
8.8.8.8.in-addr.arpa name = dns.google.
Authoritative answers can be found from:
[root@iZwz9bryvndk026nx3zcxxZ ~]#
[root@iZwz9bryvndk026nx3zcxxZ ~]# nslookup 47.106.219.217
** server can't find 217.219.106.47.in-addr.arpa.: NXDOMAIN
查询 SOA 记录:
通过这个,您可以看到权限的开始并获取有关该区域的信息。
[root@iZwz9bryvndk026nx3zcxxZ ~]# nslookup -type=SOA 199604.com
Server: 100.100.2.136
Address: 100.100.2.136#53
Non-authoritative answer:
199604.com
origin = f1g1ns1.dnspod.net
mail addr = freednsadmin.dnspod.com
serial = 1727712027
refresh = 3600
retry = 180
expire = 1209600
minimum = 180
Authoritative answers can be found from:
启用调试模式:
[root@iZwz9bryvndk026nx3zcxxZ ~]# nslookup -debug 199604.com
Server: 100.100.2.136
Address: 100.100.2.136#53
------------
QUESTIONS:
199604.com, type = A, class = IN
ANSWERS:
-> 199604.com
internet address = 47.106.219.217
ttl = 10
AUTHORITY RECORDS:
ADDITIONAL RECORDS:
------------
Non-authoritative answer:
Name: 199604.com
Address: 47.106.219.217
------------
QUESTIONS:
199604.com, type = AAAA, class = IN
ANSWERS:
AUTHORITY RECORDS:
-> 199604.com
origin = f1g1ns1.dnspod.net
mail addr = freednsadmin.dnspod.com
serial = 1727712027
refresh = 3600
retry = 180
expire = 1209600
minimum = 180
ttl = 5
ADDITIONAL RECORDS:
------------