Skip to content

Commit 82d0ad0

Browse files
authored
DNS Over HTTPS Docs (#676)
1 parent 1a93e6f commit 82d0ad0

File tree

4 files changed

+155
-1
lines changed

4 files changed

+155
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: DNS Over HTTPS
3+
---
4+
5+
DPS supports [DNS over HTTPS][2].
6+
When using DPS, the main benefit is that you can configure the DNS server directly in the browser, so you don’t need to change the system’s default DNS to access hostnames in your browser.
7+
8+
### Enabling
9+
Set `server.doh.port` for a free port, then doH will be enabled. See the [configs reference][1] for details.
10+
11+
```bash
12+
$ docker run --rm -p 8443:8443 -e DPS_SERVER__DOH__PORT=8443 defreitas/dns-proxy-server:5.8.2-snapshot
13+
```
14+
15+
```bash
16+
$ curl -k https://localhost:8443/health
17+
ok
18+
```
19+
20+
### Using DoH on the Browser
21+
* Startup DPS with DoH enabled
22+
* Import DPS auto assigned certificate authority
23+
* Configure DPS as the Browser DoH
24+
* Disable [RFC-1918][3] restrictions on the Browser
25+
* You are done!
26+
27+
Configuring browsers
28+
29+
{{%children style="li" %}}
30+
31+
32+
[1]: {{%relref "3-configuration/_index.md" %}}#doh-server
33+
[2]: https://en.wikipedia.org/wiki/DNS_over_HTTPS
34+
[3]: https://datatracker.ietf.org/doc/html/rfc1918
35+
[4]: https://raw.githubusercontent.com/mageddo/dns-proxy-server/607af35d2fc985a8ad9b6cb4b7953f6e87335d97/doh/ca.crt
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Configure DPS DoH on Firefox
3+
---
4+
5+
## Step by Step for Firefox
6+
7+
### Import DPS auto assigned certificate authority
8+
* Access `about:preferences#privacy`
9+
* Scroll Down to `Certificates`
10+
* Click on `View Certificates`
11+
* Go to `Authorities` Tab
12+
* Click on `Import...`, import [ca.crt][4] file, click on checkboxes to trust and confirm.
13+
14+
### Configure DPS as the Browser DoH
15+
* Access `about:preferences#privacy`
16+
* Scroll down to `DNS over HTTPS`
17+
* Tick `Increased Protection` radio button
18+
* Choose `Custom` on `Custom Provider` Combo Box
19+
* Put `https://localhost:8443/dns-query` on the input which appear below
20+
* `Status: Active Provider: localhost` must appear below `DNS over HTTPS` title
21+
22+
### Disable RFC-1918 restrictions on the Browser
23+
We need to disable RFC-1918 on the browser to make browser able to accept private IPs for hostnames solved on DoH server.
24+
The [RFC-1918][3] defines what are private, public IPs, when and where they should be used. For this reason, Browsers
25+
won't accept to resolve private IPs from hostnames solved using DoH because it probably is not a production usecase,
26+
the environment which DoH was thought to be used.
27+
28+
* Access `about:config`
29+
* Find `network.trr.allow-rfc1918` and change it to **true**
30+
31+
## Additional Considerations
32+
In my tests, some real domains like `.dev` won't work depending on the combination
33+
of private ip + default port (80, 443), the browser will not accept to solve, so evict them, **.com** seems to work
34+
normally;
35+
36+
You can track which names are being solved by accessing `about:networking#dns`
37+
38+
[2]: https://en.wikipedia.org/wiki/DNS_over_HTTPS
39+
[3]: https://datatracker.ietf.org/doc/html/rfc1918
40+
[4]: https://raw.githubusercontent.com/mageddo/dns-proxy-server/607af35d2fc985a8ad9b6cb4b7953f6e87335d97/doh/ca.crt

docs/content/2-features/solver-docker/_index.en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ weight: 2
66
## Features
77

88
{{%children style="li" %}}
9-

0 commit comments

Comments
 (0)