You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/Setup_Guides/Linux_and_BSD/FreeBSD_(Encrypted).md
+19-34Lines changed: 19 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This article describes how to configure and use FreeBSD's pre-installed "local_unbound" service in order to send encrypted DNS via DNS over TLS to Quad9.
4
4
5
-
This was tested using FreeBSD 13.1, but should work with 12.X as well.
5
+
This was tested using FreeBSD 14.3 and may not work with prior branches (13.x, etc).
6
6
7
7
!!! warning "Firefox, VPNs"
8
8
* **Firefox** is set to use Cloudflare DNS by default in some regions. If you're using Firefox, check that [this is disabled](https://support.mozilla.org/en-US/kb/dns-over-https#w_configure-doh-protection-settings).
@@ -11,23 +11,29 @@ This was tested using FreeBSD 13.1, but should work with 12.X as well.
11
11
!!! warning
12
12
FreeBSD, by default, installs a local instance of Unbound DNS. This is meant to act as a local, caching DNS forwarder for the local machine only, and is not intended to act as a DNS forwarder for other network devices. If you want to run Unbound DNS on FreeBSD for the purposes of running a caching DNS forwarder that will be used by multiple devices on the network, FreeBSD recommends installing the dns/unbound package instead. These instructions are only valid for the "local_unbound" service.
13
13
14
-
## Instructions
14
+
## Prerequisites
15
15
16
-
You will need the sudo command to run the commands below. Alternatively, you can simply use the su command to become the root user and execute these commands directly as the root user, in which case, you'll need to remove "sudo" from all the commands below.
16
+
For simplicity, these instructions require that you are logged in as, or `su`d to the **root** user.
17
17
18
18
* Install the dig command so you can test DNS resolution is working as expected:
19
19
20
20
```
21
21
pkg install bind-tools
22
22
```
23
23
24
+
* Install the standard root/CA store so Unbound can perform TLS validation of the Quad9 certificate.
25
+
26
+
```
27
+
pkg install ca_root_nss
28
+
```
29
+
24
30
* Verify local_unbound is Enabled
25
31
26
32
```
27
-
sudo grep unbound /etc/rc.conf
33
+
grep unbound /etc/rc.conf
28
34
```
29
35
30
-
If the following output is produced, local_unbound is already enabled, and you can skip to the next section:
36
+
If the following output is produced, local_unbound is already enabled, and you can skip to the **Instructions** section:
31
37
32
38
```
33
39
local_unbound_enable="YES"
@@ -48,7 +54,7 @@ reboot
48
54
* Enable local_unbound:
49
55
50
56
```
51
-
sudo local-unbound-setup
57
+
local-unbound-setup
52
58
```
53
59
54
60
The output should similar to this, but may differ slightly:
@@ -65,53 +71,32 @@ Starting local_unbound.
65
71
/etc/resolvconf.conf created
66
72
Original /etc/resolv.conf saved as /var/backups/resolv.conf.20220625.200835
67
73
```
74
+
## Instructions
68
75
69
-
Configuring local_unbound for DNS over TLS to Quad9
76
+
*Configuring local_unbound for DNS over TLS to Quad9
70
77
71
78
This command will back up the default configuration files, download the modified config files from the attachment of this article, and restart the local_unbound service.
These files are configured for our 9.9.9.9 service by default, without IPv6. If you'd like to use the .10 or .11 service instead, and/or enable IPv6, open the `/var/unbound/forward.conf` file and un-comment/comment out the appropriate lines.
84
+
These files are configured for the 9.9.9.9 service by default, without IPv6. If you'd like to use the .10 or .11 service instead, and/or enable IPv6, open the `/var/unbound/forward.conf` file and un-comment/comment out the appropriate lines.
78
85
79
86
## Verify Configuration
80
87
81
-
You'll need two Terminal sessions/windows
82
-
83
-
In the first session, start a packet capture to filter for DNS over TLS traffic:
Refer back to the first session. If you see any output, your system is now using DNS over TLS to send encrypted DNS to Quad9:
88
+
Using the [Quad9 Protocol test](https://docs.quad9.net/FAQs/#protocol-test-confirm-on-which-protocol-quad9-received-your-query), the result should be `dot.`, which indicates your queries are being sent to Quad9 and are encrypted with DNS over TLS:
96
89
97
90
```
98
-
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
99
-
listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes
0 commit comments