본문 바로가기
보안과정/참고

dig/host/nslookup

by Luuii 2017. 11. 28.

사용 시스템 : Centos 5.5 (final)


Name Service Look up CMD

ⓐ nslookup CMD    -> # nslookup www.daum.net

ⓑ host CMD           -> # host www.daum.net

ⓒ dig CMD             -> # dig www.daum.net


 NAME

       dig - DNS lookup utility


 SYNOPSIS

       dig [@server] [-b address] [-c class] [-f filename] [-k filename] [-m] [-p port#]

           [-t type] [-x addr] [-y name:key] [-4] [-6] [name] [type] [class] [queryopt...]


       dig [-h]


       dig [global-queryopt...] [query...]


 DESCRIPTION

       dig (domain information groper)


SIMPLE USAGE

       A typical invocation of dig looks like:


        dig @server name type


       server is the name or IP address of the name server to query. This can be an IPv4

              address in dotted-decimal notation or an IPv6 address in colon-delimited

              notation. When the supplied server argument is a hostname, dig resolves that

              name before querying that name server. If no server argument is provided,

              dig consults /etc/resolv.conf and queries the name servers listed there. The

              reply from the name server that responds is displayed.


       name   is the name of the resource record that is to be looked up.


       type   indicates what type of query is required — ANY, A, MX, SIG, etc.  type can

              be any valid query type. If no type argument is supplied, dig will perform a

              lookup for an A record.



Example - dig 명령어

# dig @168.126.63.1 kornet.net ANY

# dig @168.126.63.1 example.com ANY

# dig @168.126.63.1 google.com ANY

# dig @168.126.63.1 kornet.net MX                    /* kornet.net.    NS        ns.kornet.net */

# dig @168.126.63.1 kornet.net NS                    /* kornet.net.    NS        ns.kornet.net */

# dig @168.126.63.1 www.kornet.net A              /* www. kornet.net A    211.216.50.150 */

# dig @168.126.63.1 211.216.50.150 PTR           /* 150                PTR      ns.kornet.net */

# dig @168.126.63.1 version.bind chaos txt        /* version.bind    txt    "hello"              */



# dig www.google.com -> 이것이 가장 일반적인 방법. 정보 상으로는 가장 자세하게 볼 수 있다.

nslookup 명령어는 어떤 운영체제나 상관없이 들어있다. -> 공통적.



반응형

'보안과정 > 참고' 카테고리의 다른 글

nc(netcat)명령어 사용법  (0) 2017.11.28
xinetd 방식에 대하여  (0) 2017.11.28
setreuid 명령어  (0) 2017.11.28
어셈블리 언어(Assembly)  (0) 2017.11.27
특수 퍼미션  (0) 2017.11.27