dig (Domain Information Groper) Kullanımı

Bu yazımızda Windows’ta ki nslookup’ın Linux’da ki karşılığı olan dig’in kullanımını anlatmaya çalışacağız.

Dig, sistem adminleri tarafından standart olarak kabul edilmiş, komut bazlı olarak çalışan bir DNS sorguları gerçekleştirmemize yarayan bir uygulamadır.

A Kayıtlarını Sorgulamak

A kayıtlarını sorgulamak için aşağıda ki komutları kullanabilirsiniz;

dig mutkus.com

; <<>> DiG 9.11.5-P4-5-Debian <<>> mutkus.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19528
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; MBZ: 0x0005, udp: 4000
;; QUESTION SECTION:
;mutkus.com.			IN	A

;; ANSWER SECTION:
mutkus.com.		5	IN	A	104.28.7.2
mutkus.com.		5	IN	A	104.28.6.2

Eğer bu kadar detaylı bir çıktı istemiyorsanız +short parametresini kullanabilirsiniz.

dig mutkus.com +short
104.28.6.2
104.28.7.2

MX Kayıtlarının Sorgulanması

MX kayıtları içinde dig websitesi MX şablonunu kullanabilirsiniz. A kayıtlarında olduğu gibi eğer kısa bir sonuç görmek istiyorsanız sonuna +short parametresini ekleyebilirsiniz.

dig mutkus.com mx

; <<>> DiG 9.11.5-P4-5-Debian <<>> mutkus.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10273
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 7

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; MBZ: 0x0005, udp: 4000
;; QUESTION SECTION:
;mutkus.com.			IN	MX

;; ANSWER SECTION:
mutkus.com.		5	IN	MX	0 mx.yandex.net.

;; ADDITIONAL SECTION:
mx.yandex.net.		5	IN	A	93.158.134.89
mx.yandex.net.		5	IN	A	87.250.250.89
mx.yandex.net.		5	IN	A	213.180.204.89
mx.yandex.net.		5	IN	A	213.180.193.89
mx.yandex.net.		5	IN	A	77.88.21.89
mx.yandex.net.		5	IN	AAAA	2a02:6b8::89

SOA Kayıtlarını Görüntelemek

ig mutkus.com soa

; <<>> DiG 9.11.5-P4-5-Debian <<>> mutkus.com soa
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25603
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; MBZ: 0x0005, udp: 4000
;; QUESTION SECTION:
;mutkus.com.			IN	SOA

;; ANSWER SECTION:
mutkus.com.		5	IN	SOA	cody.ns.cloudflare.com. dns.cloudflare.com. 2030698172 10000 2400 604800 3600

;; ADDITIONAL SECTION:
cody.ns.cloudflare.com.	5	IN	A	173.245.59.107
cody.ns.cloudflare.com.	5	IN	AAAA	2400:cb00:2049:1::adf5:3b6b

TTL Sorgusu Gerçekleştirmek

dig mutkus.com ttl

; <<>> DiG 9.11.5-P4-5-Debian <<>> mutkus.com ttl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12754
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; MBZ: 0x0005, udp: 4000
;; QUESTION SECTION:
;mutkus.com.			IN	A

;; ANSWER SECTION:
mutkus.com.		5	IN	A	104.28.7.2
mutkus.com.		5	IN	A	104.28.6.2

Tüm Kayıtları Sorgulamak

dig microsoft.com any +noall +answer

; <<>> DiG 9.11.5-P4-5-Debian <<>> microsoft.com any +noall +answer
;; global options: +cmd
microsoft.com.		3599	IN	A	40.112.72.205
microsoft.com.		3599	IN	A	40.113.200.201
microsoft.com.		3599	IN	A	104.215.148.63
microsoft.com.		3599	IN	A	13.77.161.179
microsoft.com.		3599	IN	A	40.76.4.15
microsoft.com.		86399	IN	NS	ns1.msft.net.
microsoft.com.		86399	IN	NS	ns2.msft.net.
microsoft.com.		86399	IN	NS	ns3.msft.net.
microsoft.com.		86399	IN	NS	ns4.msft.net.
microsoft.com.		3599	IN	SOA	ns1.msft.net. msnhst.microsoft.com. 2019052214 7200 600 2419200 3600
microsoft.com.		3599	IN	MX	10 microsoft-com.mail.protection.outlook.com.
microsoft.com.		1799	IN	TXT	"docusign=d5a3737c-c23c-4bd0-9095-d2ff621f2840"
microsoft.com.		1799	IN	TXT	"google-site-verification=8-zFCaUXhhPcvN29EVw2RvtASDCaDPQ02L1HJ8Om8I0"
microsoft.com.		1799	IN	TXT	"adobe-sign-verification=c1fea9b4cdd4df0d5778517f29e0934"
microsoft.com.		1799	IN	TXT	"google-site-verification=yUE_SrjKKb4FHH1H04VWidfwstTGeS1FLx3Mcsnijjs"
microsoft.com.		1799	IN	TXT	"google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8"
microsoft.com.		1799	IN	TXT	"atlassian-domain-verification=jbey7I2+3Wyl+PZ0QUCC6fCz2Gu5KO7GQPcy/0c4za7ebQxar/qqujJH4kZLVQHZ"
microsoft.com.		1799	IN	TXT	"FbUF6DbkE+Aw1/wi9xgDi8KVrIIZus5v8L6tbIQZkGrQ/rVQKJi8CjQbBtWtE64ey4NJJwj5J65PIggVYNabdQ=="
microsoft.com.		1799	IN	TXT	"facebook-domain-verification=bcas5uzlvu0s3mrw139a00os3o66wr"
microsoft.com.		1799	IN	TXT	"facebook-domain-verification=gx5s19fp3o8aczby6a22clfhzm03as"
microsoft.com.		1799	IN	TXT	"v=spf1 include:_spf-a.microsoft.com include:_spf-b.microsoft.com include:_spf-c.microsoft.com include:_spf-ssg-a.microsoft.com include:spf-a.hotmail.com ip4:147.243.128.24 ip4:147.243.128.26 ip4:147.243.1.153 ip4:147.243.1.47 ip4:147.243.1.48 -all"
microsoft.com.		1799	IN	TXT	"docusign=52998482-393d-46f7-95d4-15ac6509bfdd"
microsoft.com.		1799	IN	TXT	"facebook-domain-verification=m54hfzczreqq2z1pf99y2p0kpwwpkv"
microsoft.com.		1799	IN	TXT	"adobe-idp-site-verification=8aa35c528af5d72beb19b1bd3ed9b86d87ea7f24b2ba3c99ffcd00c27e9d809c"

Ters DNS Sorgusu Yapmak

dig -x 40.112.72.205 

; <<>> DiG 9.11.5-P4-5-Debian <<>> -x 40.112.72.205
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 24087
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; MBZ: 0x0005, udp: 4000
;; QUESTION SECTION:
;205.72.112.40.in-addr.arpa.	IN	PTR

;; AUTHORITY SECTION:
72.112.40.in-addr.arpa.	5	IN	SOA	prd1.azuredns-cloud.net. msnhst.microsoft.com. 1 900 300 604800 3600

Bir Cevap Yazın

This site uses Akismet to reduce spam. Learn how your comment data is processed.