[精讚] [會員登入]
775

[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

你可能感興趣的文章

鍵盤上特殊符號及按鍵的英文及中文讀法 鍵盤上特殊符號及按鍵的英文及中文要怎麼讀?

[Gitlab] 本地端和遠端,如何修改branch名稱? 修改本地端和遠端的BRANCH名稱,有點麻煩。

網頁的結構化--為網頁加入自己的搜尋 網頁有原生的搜尋引擎,想把這個引擎交給搜尋引擎顯示。

[手機] HTC 10 evo的指紋辨識 HTC 10 evo上面的指紋辨識,原來這麼方便

[GITLAB] 解決git使用http/https clone或pull時在大小達1G時的斷線問題 git clone大專案時出現RPC failed; curl 18 transfer closed with outstanding read data remaining的錯誤,如何解決?

Chrome的遠端桌面(遠桌)使用 Chrome 具有遠端桌面(遠桌),可以輕易的讓你連到或被連到遠端電腦

隨機好文

[札記] 2016.7~12月札記 札記,只是札記

世紀帝國征服者新版本--被遺忘的帝國 世紀帝國征服者新版本--被遺忘的帝國 世紀二代的征服者是精典遊戲中的精典,aofe更好玩...

APACHE的記錄檔格式 LogFormat 語法 在APACHE中有定義一些記錄的語法模版 在 /etc/httpd/conf/httpd.conf 中: LogForm

[CodeIgniter 3] 資料庫的使用方法整理2/2 CI3 承襲 CI2,有很多的builder class可以用,依各人的使用習慣,有人喜歡一堆sql字串,有人喜歡用helper

讓radio box 或checkbox 好按 在行動裝置下,radio box及checkbox變得很難按得到