Ọmụmaatụ iwu onye ọbịa bara uru maka ịchọ nyocha DNS


Iwu ndị ọbịa bụ ihe dị ntakịrị ma dị mfe iji CLI maka ịme nyocha DNS nke na-atụgharị aha ngalaba gaa na adreesị IP yana ọzọ. Enwere ike iji ya depụta na nyochaa ụdị ndekọ DNS dị iche iche dị ka NS na MX, nwalee ma kwado ihe nkesa ISP DNS na njikọ Ịntanetị, spam na ndekọ blacklisting, nchọpụta na nchọpụta nsogbu nke ihe nkesa DNS n'etiti ndị ọzọ.

N'isiokwu a, anyị ga-amụta ka esi eji iwu nnabata na ihe atụ ole na ole bara uru na Linux iji mee nyocha DNS. N'isiokwu ndị gara aga, anyị gosipụtara iwu 8 Nslookup kachasị eji eme ihe maka ịnwale na nchọpụta nsogbu sava DNS yana ịjụ ajụjụ ndekọ ihe ndekọ DNS kpọmkwem (RR).

Anyị kọwakwara iwu 10 Linux Dig (Domain Information Groper) iji jụọ ozi DNS, ọ na-arụ ọrụ karịa ngwa Nslookup. Ọrụ nnabata ahụ na-arụkwa ọrụ n'otu ụzọ ahụ wee bịa na-ebunye ya na ọtụtụ ma ọ bụrụ na ọ bụghị Linux distros niile.

Na nke ahụ kwuru, ka anyị lelee iwu ndị ọbịa 14 ndị a n'okpuru.

Chọta ngalaba adreesị IP

Nke a bụ iwu nnabata kachasị mfe ị nwere ike ịgba ọsọ, naanị nye ngalaba aha dị ka google.com iji nweta adreesị IP ndị metụtara.

$ host google.com

google.com has address 216.58.201.46
google.com has address 216.58.201.46
google.com has address 216.58.201.46
google.com has IPv6 address 2a00:1450:4009:80b::200e
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.

Chọta ngalaba aha sava

Iji chọpụta ihe nkesa aha ngalaba na-eji nhọrọ -t.

$ host -t ns google.com

google.com name server ns1.google.com.
google.com name server ns2.google.com.
google.com name server ns3.google.com.
google.com name server ns4.google.com.

Chọta ndekọ CNAME ngalaba

Iji chọpụta ngalaba CNAME, gbaa ọsọ.

$ host -t cname mail.google.com

mail.google.com is an alias for googlemail.l.google.com.

Chọta ngalaba MX ndekọ

Iji chọpụta ndekọ MX maka ngalaba.

$ host -n -t mx google.com

ogle.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.

Chọta ngalaba TXT ndekọ

Iji chọpụta ihe ndekọ TXT maka ngalaba.

$ host -t txt google.com

google.com descriptive text "v=spf1 include:_spf.google.com ~all"

Chọta ngalaba SOA ndekọ

Ị nwere ike mee mgbalị onye ọbịa iji gosipụta ndekọ SOA maka mpaghara akọwapụtara, site na aha sava aha niile edepụtara maka mpaghara ahụ nwere ọkọlọtọ -C.

$ host -C google.com

Nameserver 216.239.38.10:
	google.com has SOA record ns1.google.com. dns-admin.google.com. 156142728 900 900 1800 60
Nameserver 216.239.32.10:
	google.com has SOA record ns3.google.com. dns-admin.google.com. 156142728 900 900 1800 60
Nameserver 216.239.34.10:
	google.com has SOA record ns4.google.com. dns-admin.google.com. 156142728 900 900 1800 60
Nameserver 216.239.36.10:
	google.com has SOA record ns2.google.com. dns-admin.google.com. 156142728 900 900 1800 60

Ajụjụ Nkesa Aha Pụrụ Iche

Iji jụọ ihe nkesa aha ngalaba aha.

$ host google.com ns4.google.com

Using domain server:
Name: ns4.google.com
Address: 216.239.38.10#53
Aliases: 

google.com has address 172.217.19.46
google.com has address 172.217.19.46
google.com has address 172.217.19.46
google.com has IPv6 address 2a00:1450:4005:808::200e
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.

Chọta ozi niile nke ndekọ ndekọ na mpaghara

Iji mee ajụjụ ụdị ọ bụla, jiri nhọrọ -a (niile) nke dabara na ịtọ nhọrọ -v.

$ host -a google.com

Trying "google.com"
;; ->>HEADER<

Nweta ozi ngalaba TTL

Iji chọpụta ozi ngalaba TTL.

$ host -v -t a google.com

Trying "google.com"
;; ->>HEADER<

Jiri IPv4 ma ọ bụ IPv6

Nhọrọ -4 ma ọ bụ -6 na-amanye onye ọbịa ka ọ jiri naanị IPv4 ma ọ bụ naanị njem ajụjụ IPV6 n'otu n'otu.

$ host -4 google.com
OR
$ host -6 google.com

Mee ajụjụ ndị na-anaghị emegharị emegharị

Nhọrọ -r na-eme ajụjụ ndị na-adịghị emegharị emegharị, rịba ama na ịtọ nhọrọ a na-ekpochapụ RD (mgbegharị chọrọ), ntakịrị na ajụjụ nke onye ọbịa na-eme.

$ host -rR 5 google.com

google.com has address 216.58.201.46
google.com has address 216.58.201.46
google.com has address 216.58.201.46
google.com has IPv6 address 2a00:1450:4009:80b::200e
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.

Tọọ Nnwale UDP maka nyocha

Site na ndabara ọnụọgụ UDP na-agbalị bụ 1, iji gbanwee ya, jiri ọkọlọtọ -R.

$ host -R 5 google.com

google.com has address 216.58.201.46
google.com has address 216.58.201.46
google.com has address 216.58.201.46
google.com has IPv6 address 2a00:1450:4009:80b::200e
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.

Tọọ oge ajụjụ Chere maka nzaghachi

Iji -W mgba ọkụ, ị nwere ike ịkụziri onye ọbịa ka ọ chere nzaghachi maka oge akọwapụtara n'ime sekọnd ma ọ bụrụ na ejiri ọkọlọtọ -w, ọ na-eme ka onye ọbịa chere ruo mgbe ebighị ebi. maka nzaghachi:

$ host -T -W 10 google.com

google.com has address 216.58.201.46
google.com has address 216.58.201.46
google.com has address 216.58.201.46
google.com has IPv6 address 2a00:1450:4009:80b::200e
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.

Ọ bụ ya! N'isiokwu a, anyị mụtara ka esi eji iwu ndị ọbịa na-eji ihe atụ ole na ole bara uru na Linux. Jiri mpempe nzaghachi dị n'okpuru kesaa anyị echiche ọ bụla gbasara ntuziaka a.