使用dnscaa工具查詢DNS CAA紀錄

CAA(Certification Authority Authorization)在DNS裡的紀錄, 主要用於設定該網站的SSL憑證為哪個CA發出, 例如Bind Zone檔裡可設定:
example.com. IN CAA 0 issue ";"
example.com. IN CAA 0 issuewild "letsencrypt.org"

表示example.com的SSL憑證是由Let's Encrypt機構所發出

在DNS伺服器設定好CAA紀錄, 但是如何查詢呢? 常用的dig工具用法:
dig example.com type257

不過dig只會回應編碼資料

在Github上有個專案"dnscaa"正好可以解決這個問題, 它是由Golang寫成, 所以我們需要Golang編譯此程式, 這裡我使用Debian Linux Jessie示範

安裝Golang


Debian Linux Jessie的Golang是1.3.3版, 無法順利編譯dnscaa, 所以我們需要用Jessie-Backports來取得較新版的Golang

增加Jessie-Backports
nano /etc/apt/sources.list


加入設定
deb http://ftp.tw.debian.org/debian/ jessie-backports main


更新Sources List
apt-get update


安裝Golang 1.7
apt-get -t jessie-backports install golang


下載dnscaa原始碼


dnscaa還需要Golang dns函式庫, 先在https://github.com/miekg/dns下載
cd /usr/lib/go/src
mkdir -p github.com/miekg
cd github.com/miekg
git clone https://github.com/miekg/dns.git dns


接著下載dnscaa(https://github.com/weppos/dnscaa)
cd /usr/lib/go/src
mkdir -p github.com/weppos
cd github.com/weppos
git clone https://github.com/weppos/dnscaa.git dnscaa


編譯dnscaa


go build cmd/digcaa/digcaa.go

這時/usr/lib/go/src/github.com/weppos/目錄下就會出現編譯好的dnscaa工具

使用dnscaa


./dnscaa example.com

若example.com有正確設定DNS CAA紀錄, 就會顯示其資料
2017-04-28 13:00 發佈
推!
CAA如火如荼展開, dns 服務商目前還沒跟上真是麻煩,
最麻煩的是用了let's encrypt, 他似乎也開始強制要有caa 設定呢

Ryan Lai wrote:
CAA(Certification...(恕刪)
內文搜尋
X
評分
評分
複製連結
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?