查看域名绑定的IP
本文由PUSDN强力驱动 - https://www.pusdn.com
windows中是自带的,不用安装,直接在cmd窗口直接使用
Linux中需要安装:
yum -y install bind-utils
nslookup pusdn.com
debian系
apt-get install dnsutils
centos系
yum install bind-utils
二、或者使用dig
命令
dig 是一个 Linux 下用来 DNS 查询信息的工具,全称是Domain Information Groper,与 nslookup 类似,但比 nslookup 功能更强大。Windows 下只有 nslookup,如果也想用到 dig 命令,就只能自己动手安装了。
dig 作为 bind 的一部分,官方网站如下:
http://www.bind9.net/download
Linux下安装
yum install bind-utils -y
查找yahoo.com的A记录:(此处一定是域而不是主机,如我公司为xinpindao.com)
dig yahoo.com A +noall +answer
查找yahoo.com MX记录的列表:
dig yahoo.com MX +noall +answer
查找yahoo.com的权威DNS:
dig yahoo.com NS +noall +answer
查询上面所有的记录:
dig yahoo.com ANY +noall +answer
下面是 dig 的一些比较常用的命令:
# dig 最基本的用法
dig @server qianlong.com
# 用 dig 查看 zone 数据传输
dig @server qianlong.com AXFR
# 用 dig 查看 zone 数据的增量传输
dig @server qianlong.com IXFR=N
# 用 dig 查看反向解析
dig -x 124.42.102.203 @server
# 查找一个域的授权 dns 服务器
dig qianlong.com +nssearch
# 从根服务器开始追踪一个域名的解析过程
dig qianlong.com +trace
# 查看你使用的是哪个 F root dns server
dig +norec @F.ROOT-SERVERS.NET HOSTNAME.BIND CHAOS TXT
# 查看 bind 的版本号
dig @bind_dns_server CHAOS TXT version.bind
当我们需要一个快速回答时,+short选项是你最好的朋友:
dig www.isc.org +short
204.152.184.88
Windows下可以使用自带的nslookup或者直接下载dig.exe放到system目录
还没有评论,来说两句吧...