Showing posts with label nslookup. Show all posts
Showing posts with label nslookup. Show all posts

Wednesday, March 30, 2016

check host command 'nslookup' on linux

ตรวจสอบไอพีเว็บไซต์ และตรวจสอบไอพีเพื่อหาชื่อ host ด้วยคำสั่ง nslookup

1. nslookup ชื่อเว็บไซต์

nslookup www.ubuntugeek.com
Server: 127.0.1.1
Address: 127.0.1.1#53

Non-authoritative answer:
www.ubuntugeek.com canonical name = ubuntugeek.com.
Name: ubuntugeek.com
Address: 74.126.24.86

* with special DNS
nslookup ad.mydomain.com 172.16.x.xx

2. nslookup ไอพีที่ต้องกาตรวจสอบ

nslookup 74.126.24.86
Server: 127.0.1.1
Address: 127.0.1.1#53

Non-authoritative answer:
86.24.126.74.in-addr.arpa name = 74.126.24.86.static.a2webhosting.com.

Authoritative answers can be found from:
24.126.74.in-addr.arpa nameserver = ns2.a2webhosting.com.
24.126.74.in-addr.arpa nameserver = ns1.a2webhosting.com.

3. dig command 

dig www.ubuntugeek.com

; <<>> DiG 9.9.5-11ubuntu1.2-Ubuntu <<>> www.ubuntugeek.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- 63300="" div="" id:="" noerror="" opcode:="" query="" status:="">
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 5

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.ubuntugeek.com. IN A

;; ANSWER SECTION:
www.ubuntugeek.com. 101 IN CNAME ubuntugeek.com.
ubuntugeek.com. 101 IN A 74.126.24.86

;; AUTHORITY SECTION:
ubuntugeek.com. 172601 IN NS rick.ns.cloudflare.com.
ubuntugeek.com. 172601 IN NS sara.ns.cloudflare.com.

;; ADDITIONAL SECTION:
rick.ns.cloudflare.com. 69808 IN A 173.245.59.139
rick.ns.cloudflare.com. 145901 IN AAAA 2400:cb00:2049:1::adf5:3b8b
sara.ns.cloudflare.com. 23875 IN A 173.245.58.144
sara.ns.cloudflare.com. 136107 IN AAAA 2400:cb00:2049:1::adf5:3a90

;; Query time: 0 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Wed Mar 30 15:57:39 ICT 2016
;; MSG SIZE  rcvd: 217