[精讚] [會員登入]
751

[DNS] 使用dig去砍下整個zone (zone transfer)

使用dig去砍下整個zone 的指令

分享此文連結 //n.sfs.tw/15799

分享連結 [DNS] 使用dig去砍下整個zone (zone transfer)@新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
最後編修
2022-04-26 14:54:11 By 張○○
 

自動目錄

如果zone允許zone transfer的話,可以使用dig來砍下整個zone

指令

# dig AXFR example.com. @192.168.0.1

 example.com. 是你要砍下的zone

 192.168.0.1 是你目的的dns

測試

# dig  AXFR example.com. @192.168.0.1

成功案例

; <<>> DiG 9.11.26-RedHat-9.11.26-4.el8_4 <<>> AXFR example.com. @192.168.0.1
;; global options: +cmd
ccsh.example.com.    86400    IN    SOA    example.com. user.example.com. 2022042601 36000 3600 2592000 43200
ccsh.example.com.   86400    IN    TXT    "google-site-verification=JHJQ71uCcMVMbRJv7dKl0n"
ccsh.example.com.    86400    IN    TXT    "MS=10A14B281346B90C2BF3C0C07A"
... 以下略

失敗案例

; <<>> DiG 9.11.26-RedHat-9.11.26-4.el8_4 <<>> AXFR example.com. @192.168.0.1
;; global options: +cmd
; Transfer failed.

 

防止別人zone transfer

bind 預設是默許,在 options加下一行:

options {
 allow-transfer { none; };
}
 

 

參考資料

[1] https://help.dyn.com/use-dig-to-download-zone-data/

 

 

 

END

你可能感興趣的文章

我有六顆硬碟,該設定 RAID5, RAID50 還是 RAID6? 我有六顆硬碟,該設定 RAID5, RAID50 還是 RAID6?

如何開啟 .sqlite 的檔 如何開啟 .sqlite 的檔?

台灣2020(民國109年)節慶國定假日 ics下載 找不到2020的假日檔,沒關係,我自己做一個

Webp 類型的圖檔類型是什麼? 除了常見的jpg、png、gif,還有一個沒見過的webp是什麼?

超強姓名音譯網站 超級強,符合我所有需求

使用GIT和GITHUB 教你如何使用git及github

隨機好文

[jQuery] select 元件的取值及給值 html中的元件select,在jquery中要如何使用?

看懂DSUB DVI HDMI USB等各式影音接頭 看懂DSUB DVI HDMI等各式影音接頭

TFTP Server 安裝及使用 讓設備的網路設定檔或是韌體經由TFTP拷備出來,操作的方法

[CodeIgniter3] 解決無法上傳特定檔案(.sb2)的問題 上傳時出現The filetype you are attempting to upload is not allowed,要怎麼解決?

問問題 問問題其實內涵很深,我悟了很久才懂。 有人問題的目的並不一定是想要得到答案,有時只是純粹想問問題..