檢視域名繫結的IP
阿新 • • 發佈:2021-01-07
技術標籤:Linux域名JaneYorkPUSDN破該仔PGZ
本文由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 命令,就只能自己動手安裝了。
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目錄