|
| 1 | +--- |
| 2 | +title: Configure DPS DoH on Chrome (Not confirmed) |
| 3 | +--- |
| 4 | + |
| 5 | +### Import DPS auto assigned certificate authority |
| 6 | + |
| 7 | +Chrome relies on the **operating system trust store**, so the DPS CA must be imported at the OS level. |
| 8 | + |
| 9 | +**Linux (Ubuntu / Debian-based):** |
| 10 | + |
| 11 | +* Copy the [CA file][4] to the system certificates directory |
| 12 | + |
| 13 | + ```bash |
| 14 | + sudo cp ca.crt /usr/local/share/ca-certificates/dps-ca.crt |
| 15 | + ``` |
| 16 | +* Update the system trust store |
| 17 | + |
| 18 | + ```bash |
| 19 | + sudo update-ca-certificates |
| 20 | + ``` |
| 21 | +* Restart Google Chrome |
| 22 | + |
| 23 | +**macOS:** |
| 24 | + |
| 25 | +* Open **Keychain Access** |
| 26 | +* Select **System** keychain |
| 27 | +* Drag and drop `ca.crt` into the certificates list |
| 28 | +* Double-click the imported certificate |
| 29 | +* Expand **Trust** |
| 30 | +* Set **When using this certificate** to **Always Trust** |
| 31 | +* Close the window and authenticate |
| 32 | +* Restart Google Chrome |
| 33 | + |
| 34 | +**Windows:** |
| 35 | + |
| 36 | +* Double-click `ca.crt` |
| 37 | +* Click **Install Certificate** |
| 38 | +* Choose **Local Machine** |
| 39 | +* Select **Place all certificates in the following store** |
| 40 | +* Choose **Trusted Root Certification Authorities** |
| 41 | +* Finish the wizard |
| 42 | +* Restart Google Chrome |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +### Configure DPS as the Browser DoH |
| 47 | + |
| 48 | +* Access `chrome://settings/security` |
| 49 | +* Scroll down to `Advanced` |
| 50 | +* Find `Use secure DNS` |
| 51 | +* Enable the `Use secure DNS` toggle |
| 52 | +* Select `With Custom` |
| 53 | +* Put `https://localhost:8443/dns-query` in the provider input |
| 54 | +* The secure DNS section must indicate that a **custom provider is in use** |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +### Disable RFC-1918 restrictions on the Browser |
| 59 | + |
| 60 | +We need to disable RFC-1918 restrictions on the browser to make it able to accept private IPs for hostnames resolved via DoH. |
| 61 | +The [RFC-1918][3] defines what are private and public IPs, and browsers restrict their use in DoH responses because this is |
| 62 | +not considered a typical production use case. |
| 63 | + |
| 64 | +Chrome blocks private IP resolution via DoH by default as a security measure. |
| 65 | + |
| 66 | +* Access `chrome://flags` |
| 67 | +* Search for `Insecure Private Network Requests` |
| 68 | +* Set **Block insecure private network requests** to **Disabled** |
| 69 | +* Restart Google Chrome |
| 70 | + |
| 71 | +## Additional Considerations |
| 72 | +In my tests, some real domains like `.dev` won't work depending on the combination |
| 73 | +of private ip + default port (80, 443), the browser will not accept to solve, so evict them, **.com** seems to work |
| 74 | +normally; |
| 75 | + |
| 76 | +You can track which names are being solved by accessing `chrome://net-internals/#dns` |
| 77 | + |
| 78 | +[2]: https://en.wikipedia.org/wiki/DNS_over_HTTPS |
| 79 | +[3]: https://datatracker.ietf.org/doc/html/rfc1918 |
| 80 | +[4]: https://raw.githubusercontent.com/mageddo/dns-proxy-server/607af35d2fc985a8ad9b6cb4b7953f6e87335d97/doh/ca.crt |
0 commit comments