![nslookup 명령어 사용방법](/images/posts/nslookup.jpg)
준비물
1. Windows - 명령 프롬프트
2. Mac OS - terminal
nslookup 기본 명령어
1. 도메인 ip 조회
$ nslookup naver.com
$ nslookup naver.com
Server: 168.126.63.1
Address: 168.126.63.1#53
Non-authoritative answer:
Name: naver.com
Address: 125.209.222.141
Name: naver.com
Address: 210.89.164.90
Name: naver.com
Address: 210.89.160.88
Name: naver.com
Address: 125.209.222.142
2. 도메인 NS(Name Server) 레코드 조회
$ nslookup -type=ns naver.com
$ nslookup -type=ns naver.com
Server: 168.126.63.1
Address: 168.126.63.1#53
Non-authoritative answer:
naver.com nameserver = ns2.naver.com.
naver.com nameserver = ns1.naver.com.
Authoritative answers can be found from:
ns1.naver.com internet address = 125.209.248.6
ns2.naver.com internet address = 125.209.249.6
3. MX(Mail Record) 레코드 조회
nslookup -query=mx naver.com
$ nslookup -query=mx naver.com
Server: 168.126.63.1
Address: 168.126.63.1#53
Non-authoritative answer:
naver.com mail exchanger = 10 mx3.naver.com.
naver.com mail exchanger = 10 mx1.naver.com.
naver.com mail exchanger = 10 mx2.naver.com.
Authoritative answers can be found from:
naver.com nameserver = ns2.naver.com.
naver.com nameserver = ns1.naver.com.
mx1.naver.com internet address = 125.209.238.100
mx3.naver.com internet address = 125.209.222.14
ns1.naver.com internet address = 125.209.248.6
ns2.naver.com internet address = 125.209.249.6
3. CNAME 조회
nslookup -q=cname mail.solarmora.com
$ nslookup -q=cname mail.solarmora.com
Server: 168.126.63.1
Address: 168.126.63.1#53
Non-authoritative answer:
mail.solarmora.com canonical name = ghs.googlehosted.com.
Authoritative answers can be found from:
solarmora.com nameserver = ns-cloud-b3.googledomains.com.
solarmora.com nameserver = ns-cloud-b4.googledomains.com.
solarmora.com nameserver = ns-cloud-b1.googledomains.com.
solarmora.com nameserver = ns-cloud-b2.googledomains.com.
ns-cloud-b1.googledomains.com internet address = 216.239.32.107
ns-cloud-b2.googledomains.com internet address = 216.239.34.107
ns-cloud-b3.googledomains.com internet address = 216.239.36.107
ns-cloud-b4.googledomains.com internet address = 216.239.38.107
ns-cloud-b1.googledomains.com has AAAA address 2001:4860:4802:32::6b
ns-cloud-b2.googledomains.com has AAAA address 2001:4860:4802:34::6b
ns-cloud-b3.googledomains.com has AAAA address 2001:4860:4802:36::6b
ns-cloud-b4.googledomains.com has AAAA address 2001:4860:4802:38::6b
4. TXT 레코드 조회
$ nslookup
> set type=txt
> naver.com
※ set type 관련 참고자료 (바로가기)
$ nslookup
> set type=txt
> naver.com
> Server: 168.126.63.1
> Address: 168.126.63.1#53
Non-authoritative answer:
naver.com text="google-site-verification=fK9dDFcEOeNM2Wr3xzNAN-XLcerfAGpOABdSYiqw4_s"
naver.com text="google-site-verification=TX2ZPeYhsJwJ-zQKOLMgqsTx4R5mAlBy2CjxIcl2Xgc"
naver.com text="v=spf1 include:_spfblocka.naver.com include:_spfblockb.naver.com include:_spfblockc.naver.com include:_spfblockd.naver.com include:_spfblocke.naver.com include:_spfblockf.naver.com include:spf.worksmobile.com ~all"
Authoritative answers can be found from:
naver.com nameserver = ns2.naver.com.
naver.com nameserver = ns1.naver.com.
ns1.naver.com internet address = 125.209.248.6
ns2.naver.com internet address = 125.209.249.6
…귀찮으면 그냥 사이트를 이용하는게 낫다.
https://toolbox.googleapps.com/apps/dig/