{
 "DNS 運作原理與記錄類型#1": {
  "type": "flow",
  "reveal": [
   1,
   2,
   5,
   6,
   6,
   6
  ],
  "nodes": [
   {
    "label": "瀏覽器",
    "sub": "輸入網址"
   },
   {
    "label": "遞迴解析器"
   },
   {
    "label": "根伺服器",
    "sub": "."
   },
   {
    "label": ".com 伺服器"
   },
   {
    "label": "權威伺服器"
   },
   {
    "label": "快取答案",
    "sub": "TTL 內不重問",
    "kind": "end"
   }
  ]
 },
 "DNS 運作原理與記錄類型#2": {
  "type": "table",
  "head": [
   "記錄",
   "用途"
  ],
  "rows": [
   [
    "A",
    "名稱對應 IPv4 位址"
   ],
   [
    "AAAA",
    "名稱對應 IPv6 位址"
   ],
   [
    "CNAME",
    "別名,blog 指向 www"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "widths": [
   1,
   3
  ]
 },
 "DNS 運作原理與記錄類型#3": {
  "type": "table",
  "head": [
   "記錄",
   "用途"
  ],
  "rows": [
   [
    "MX",
    "郵件交換伺服器,有優先序"
   ],
   [
    "TXT",
    "文字記錄(SPF、驗證碼)"
   ],
   [
    "NS",
    "網域的權威伺服器"
   ],
   [
    "SOA",
    "區域起始授權資訊"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "widths": [
   1,
   3
  ]
 },
 "DNS 運作原理與記錄類型#5": {
  "type": "bar",
  "labels": [
   "一般 TTL",
   "換 IP 前"
  ],
  "values": [
   3600,
   300
  ],
  "unit": "秒",
  "reveal": [
   0,
   1,
   2
  ],
  "highlight": 1
 },
 "DNS 運作原理與記錄類型#6": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   2,
   2
  ],
  "cards": [
   {
    "title": "註冊商 / Cloudflare",
    "points": [
     "網頁介面管理記錄",
     "簡單、可靠、有備援"
    ]
   },
   {
    "title": "自己用 BIND",
    "points": [
     "內部網域、公司內網",
     "公開用至少兩台權威伺服器"
    ]
   }
  ]
 },
 "DNS 運作原理與記錄類型#7": {
  "type": "table",
  "head": [
   "指令",
   "用途"
  ],
  "rows": [
   [
    "dig +short example.com A",
    "只顯示答案"
   ],
   [
    "dig @8.8.8.8 example.com",
    "指定向哪台 DNS 查"
   ],
   [
    "dig -x 192.0.2.10",
    "反向解析"
   ],
   [
    "dig +trace example.com",
    "從根逐層追蹤"
   ]
  ],
  "reveal": [
   4,
   4,
   4
  ],
  "widths": [
   3,
   2
  ]
 },
 "用 BIND 架設內網 DNS 伺服器#1": {
  "type": "flow",
  "reveal": [
   1,
   3,
   3,
   3
  ],
  "nodes": [
   {
    "label": "內網電腦"
   },
   {
    "label": "BIND 伺服器",
    "sub": "lab.example.com"
   },
   {
    "label": "上游 DNS",
    "sub": "轉發其他查詢",
    "kind": "end"
   }
  ]
 },
 "用 BIND 架設內網 DNS 伺服器#2": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "nodes": [
   {
    "label": "安裝",
    "sub": "bind9"
   },
   {
    "label": "確認服務",
    "sub": "systemctl status"
   },
   {
    "label": "設定檔目錄",
    "sub": "/etc/bind",
    "kind": "end"
   }
  ]
 },
 "用 BIND 架設內網 DNS 伺服器#3": {
  "type": "table",
  "head": [
   "檔案",
   "用途"
  ],
  "rows": [
   [
    "named.conf.options",
    "全域選項"
   ],
   [
    "named.conf.local",
    "宣告自己的區域"
   ],
   [
    "db.*",
    "區域檔,放記錄"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "widths": [
   3,
   2
  ]
 },
 "用 BIND 架設內網 DNS 伺服器#4": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2
  ],
  "cards": [
   {
    "title": "allow-query / allow-recursion",
    "points": [
     "只讓內網查詢與遞迴",
     "否則成為開放式解析器"
    ]
   },
   {
    "title": "forwarders",
    "points": [
     "設定上游 DNS",
     "forward only 則完全依賴上游"
    ]
   }
  ]
 },
 "用 BIND 架設內網 DNS 伺服器#5": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "nodes": [
   {
    "label": "備份設定",
    "sub": "cp -a"
   },
   {
    "label": "定義 ACL",
    "sub": "internal"
   },
   {
    "label": "options 區塊",
    "sub": "查詢、遞迴、上游",
    "kind": "end"
   }
  ]
 },
 "用 BIND 架設內網 DNS 伺服器#7": {
  "type": "flow",
  "reveal": [
   0,
   1,
   4,
   4,
   4,
   5
  ],
  "nodes": [
   {
    "label": "編輯檔案",
    "sub": "named.conf.local"
   },
   {
    "label": "zone 區塊",
    "sub": "lab.example.com"
   },
   {
    "label": "type primary"
   },
   {
    "label": "file",
    "sub": "區域檔位置"
   },
   {
    "label": "結尾",
    "sub": "};",
    "kind": "end"
   }
  ]
 },
 "測試、反向解析與用戶端設定#1": {
  "type": "table",
  "head": [
   "現象",
   "代表"
  ],
  "rows": [
   [
    "flags 有 aa",
    "此伺服器是區域權威"
   ],
   [
    "有 ra 且有答案",
    "遞迴與轉發正常"
   ],
   [
    "REFUSED",
    "來源 IP 不在允許名單"
   ]
  ],
  "reveal": [
   0,
   2,
   3
  ],
  "widths": [
   2,
   3
  ]
 },
 "測試、反向解析與用戶端設定#2": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "查 web01",
    "sub": "dig @… +short"
   },
   {
    "label": "回答內網 IP",
    "sub": "192.168.1.20"
   },
   {
    "label": "查 www",
    "sub": "完整輸出"
   },
   {
    "label": "flags 有 aa",
    "sub": "權威回答",
    "kind": "end"
   }
  ]
 },
 "測試、反向解析與用戶端設定#3": {
  "type": "flow",
  "reveal": [
   0,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "www",
    "sub": "CNAME"
   },
   {
    "label": "web01",
    "sub": "A 記錄"
   },
   {
    "label": "192.168.1.20",
    "sub": "TTL 3600 秒"
   },
   {
    "label": "外部網域",
    "sub": "轉發與遞迴",
    "kind": "end"
   }
  ]
 },
 "測試、反向解析與用戶端設定#4": {
  "type": "flow",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ],
  "nodes": [
   {
    "label": "反向區域",
    "sub": "網段倒著寫"
   },
   {
    "label": "宣告區域",
    "sub": "named.conf.local"
   },
   {
    "label": "建立區域檔",
    "sub": "$TTL、SOA"
   },
   {
    "label": "NS 記錄"
   },
   {
    "label": "測試",
    "sub": "dig -x",
    "kind": "end"
   }
  ]
 },
 "測試、反向解析與用戶端設定#7": {
  "type": "table",
  "head": [
   "記錄",
   "對應"
  ],
  "rows": [
   [
    "SOA",
    "主要名稱伺服器與管理者信箱"
   ],
   [
    "10  PTR",
    "ns1.lab.example.com."
   ],
   [
    "20  PTR",
    "web01.lab.example.com."
   ],
   [
    "30  PTR",
    "db01.lab.example.com."
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "widths": [
   2,
   4
  ]
 }
}