"리눅스 nslookup"의 두 판 사이의 차이

52번째 줄: 52번째 줄:
Authoritative answers can be found from:
Authoritative answers can be found from:


john@ubuntu:~$ nslookup naver.com ns2.naver.com
john@ubuntu:~$ nslookup naver.com ns1.naver.com
Server: ns2.naver.com
Server: ns1.naver.com
Address: 125.209.249.6#53
Address: 125.209.248.6#53


Name: naver.com
Address: 125.209.222.141
Name: naver.com
Name: naver.com
Address: 210.89.164.90
Address: 210.89.164.90
Name: naver.com
Address: 210.89.160.88
Name: naver.com
Name: naver.com
Address: 125.209.222.142
Address: 125.209.222.142
Name: naver.com
Address: 125.209.222.141
Name: naver.com
Address: 210.89.160.88
</source>
</source>



2019년 2월 25일 (월) 19:35 판

1 개요

리눅스 nslookup
/usr/bin/nslookup
  • 도메인 네임서버의 정보를 쿼리하기 위해 사용

2 실행 예시

2.1 구글 퍼블릭 DNS

[root@zetawiki ~]# nslookup
> exit
[root@zetawiki ~]# nslookup 8.8.8.8
Server:		210.220.163.82
Address:	210.220.163.82#53

Non-authoritative answer:
8.8.8.8.in-addr.arpa	name = google-public-dns-a.google.com.

Authoritative answers can be found from:

2.2 네이버

john@ubuntu:~$ nslookup naver.com
Server:		127.0.0.53
Address:	127.0.0.53#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
→ Server: 127.0.0.53 은 내 시스템의 DNS를 가리킴.
→ "Non-authoritative answer:"는 naver 의 DNS가 아닌 내 시스템의 DNS를 통해 정보를 획득 했기 때문임

2.2.1 내 시스템의 DNS가 아닌 네이버 DNS를 통해 직접 확인

john@ubuntu:~$ nslookup -type=ns naver.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
naver.com	nameserver = ns2.naver.com.
naver.com	nameserver = ns1.naver.com.

Authoritative answers can be found from:

john@ubuntu:~$ nslookup naver.com ns1.naver.com
Server:		ns1.naver.com
Address:	125.209.248.6#53

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.3 내 시스템의 DNS 정보 확인

Ubuntu 18.04 에서 아래와 같이 확인 가능

john@ubuntu:~$ cat /etc/resolv.conf 
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}