目標: Building DNS service, use GOOGLE Cloud DNS, and NameCheap
會用到的幾個連結:
- https://cloud.google.com/dns/
- https://www.namecheap.com/
前置作業:
- 在 NameCheap 買個 Domain
- 確認能登入 GCP Console
Steps:
NameCheap 端
- 買好 Domain (EX: wnlin.org)
- 進 NameCheap Dashboard
- 進 wnlin.org 的管理介面,設定 Custom 的 Nameserver (ns-cloud-d*.googledomains.com)
GCP 端
- 連到 GCP Console -> networking -> dns -> click Create zone
- 設定 Zone 名稱方便管理,DNS Name 則設為 wnlin.org
- 產生完畢後會有基本的 NS, SOA Record, 新增一筆 blog.wnlin.org 等待更新
- 基本上設定到這邊即可,接下來是驗證程序
服務驗證:
- 確認 NS 紀錄
{{{
$ dig NS wnlin.org
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> NS wnlin.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42955
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;wnlin.org. IN NS
;; ANSWER SECTION:
wnlin.org. 21599 IN NS ns-cloud-d1.googledomains.com.
wnlin.org. 21599 IN NS ns-cloud-d2.googledomains.com.
wnlin.org. 21599 IN NS ns-cloud-d3.googledomains.com.
wnlin.org. 21599 IN NS ns-cloud-d4.googledomains.com.
;; Query time: 43 msec
;; SERVER: 169.254.169.254#53(169.254.169.254)
;; WHEN: Fri Dec 11 20:56:07 2015
;; MSG SIZE rcvd: 148
}}}
- 確認 blog.wnlin.org 能正解 IP (104.155.218.212)
{{{
heavenruler@wnlin-wordpress:~$ dig blog.wnlin.org
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> blog.wnlin.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7151
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;blog.wnlin.org. IN A
;; ANSWER SECTION:
blog.wnlin.org. 299 IN A 104.155.218.212
}}}
Done