傳統 DNS 查詢和回應會透過 UDP 或 TCP 傳送,而不會經過加密。這很容易遭到竊聽和假冒,包括 DNS 式網際網路篩選。遞迴解析器對用戶端的回應最容易遭受多餘或惡意變更,而遞迴解析器與權威名稱伺服器之間的通訊通常會整合額外的防護措施。
為解決這些問題,Google 公用 DNS 會透過 RFC 7858 指定,透過傳輸層安全標準 (TLS) 加密的 TCP 連線提供 DNS 解析服務。DNS-over-TLS 可提升用戶端和解析器之間的隱私和安全性。這可補強 DNSSEC,並保護 DNSSEC 驗證的結果,避免在用戶端上受到修改或假冒。
運作方式
用戶端系統可以搭配兩種設定檔使用 DNS-over-TLS:採用「嚴格」或「機會式」隱私保護。使用嚴格隱私權設定檔時,使用者必須為 DNS-over-TLS 服務設定 DNS 伺服器名稱 (RFC 8310 中的驗證網域名稱),且用戶端必須能在通訊埠 853 至 DNS 伺服器的通訊埠 853 上建立安全的 TLS 連線。無法建立安全連線會帶來嚴重錯誤,用戶端也不會有 DNS 服務。
使用機會式隱私權設定檔時,使用者可直接設定 DNS 伺服器 IP 位址,或從本機網路取得 (使用 DHCP 或其他方式)。用戶端解析器會嘗試透過通訊埠 853 與指定 DNS 伺服器建立安全連線。建立安全連線之後,就能保障使用者在路徑上被動觀察器查詢時的隱私。因為用戶端不會驗證伺服器的真實性,也不會受到活動中攻擊者保護。如果用戶端無法在通訊埠 853 上建立安全連線,就會改回使用標準 DNS 通訊埠 53 透過 UDP 或 TCP 與 DNS 伺服器進行通訊,而不需要任何安全性或隱私權。使用機會式隱私保護服務是提高隱私保護的逐步部署方式,並希望廣泛採用嚴格的隱私權設定檔。
使用嚴格隱私權設定檔時,虛設常式解析器會透過下列步驟建立 DNS-over-TLS 連線。
虛設常式解析器是以 DNS-over-TLS 解析器名稱 dns.google 設定。
虛設常式解析器會使用本機 DNS 解析器取得 dns.google 的 IP 位址。
虛設常式解析器會透過這些 IP 位址向通訊埠 853 建立 TCP 連線,
虛設常式解析器會與 Google 公用 DNS 解析器啟動 TLS 握手。
Google 公用 DNS 伺服器會將其傳輸層安全標準 (TLS) 憑證和完整的傳輸層安全標準 (TLS) 憑證完整鏈傳回至信任的根憑證。
虛設常式解析器會根據顯示的憑證驗證伺服器的身分。
如果無法驗證身分,DNS 名稱解析會失敗,虛設常式解析器會傳回錯誤。
建立 TLS 連線後,虛設常式解析器會在 Google 公用 DNS 伺服器之間擁有安全的通訊路徑。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-09-04 (世界標準時間)。"],[[["Google Public DNS offers DNS resolution over TLS to enhance privacy and security between clients and resolvers, protecting against eavesdropping and spoofing."],["DNS-over-TLS operates using strict or opportunistic privacy profiles, with strict requiring authenticated connections to a specific server and opportunistic allowing fallback to unencrypted DNS if TLS fails."],["Client systems using DNS-over-TLS establish a secure connection by verifying the server's identity through TLS certificates, ensuring data is exchanged over an encrypted channel."],["Google Public DNS supports standards such as TLS 1.3, TCP Fast Open, and DNS Transport over TCP to provide a high-quality and low-latency service."],["Users can configure DNS-over-TLS on devices running Android 9 or higher and also utilize it with the IPv6-only Google Public DNS64 service, though the latter is not recommended for mobile devices on multiple networks."]]],["DNS-over-TLS encrypts DNS queries and responses, enhancing privacy and security. It operates in two profiles: *strict* and *opportunistic*. Strict requires secure TLS connection verification on port 853, failing if validation fails. Opportunistic attempts secure connection on 853 but falls back to unsecured port 53 if it fails, without validating the server. Clients using strict profile resolve the server name, establish a TLS connection on port 853, and validate the server's certificate. Google Public DNS supports this method and follows related RFC specifications.\n"]]