pfsense:dns:force_dns_over_tls
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pfsense:dns:force_dns_over_tls [2021/01/04 19:39] – peter | pfsense:dns:force_dns_over_tls [2022/10/08 09:13] (current) – [Another Example] peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PFSense - DNS - Force DNS over TLS ====== | ====== PFSense - DNS - Force DNS over TLS ====== | ||
+ | |||
+ | DNS requests are normally not encrypted, and therefore visible to your ISP to record, use for research / marketing purposes, or even (in the case of some nefarious actors) manipulate or change. | ||
+ | |||
+ | Running DNS over TLS prevents that, by encrypting your DNS traffic so that it cannot be manipulated or collected. | ||
+ | |||
+ | <WRAP important> | ||
+ | **WARNING: | ||
+ | |||
+ | However this is only for the first query. | ||
+ | |||
+ | Reason for this is that TLS takes longer. | ||
+ | |||
+ | To prevent this increase in latency, switch to standard port 53. | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Navigate to **Services -> DNS Resolver**. | ||
+ | |||
+ | Add the following to the **Custom Options**. | ||
+ | |||
+ | <code bash> | ||
+ | server: | ||
+ | access-control-view: | ||
+ | access-control-view: | ||
+ | access-control-view: | ||
+ | access-control-view: | ||
+ | view: | ||
+ | name: " | ||
+ | view-first: yes | ||
+ | view: | ||
+ | name: " | ||
+ | view-first: yes | ||
+ | include: / | ||
+ | view: | ||
+ | name: " | ||
+ | view-first: yes | ||
+ | forward-addr: | ||
+ | forward-addr: | ||
+ | view: | ||
+ | name: " | ||
+ | view-first: yes | ||
+ | tls-cert-bundle: | ||
+ | forward-tls-upstream: | ||
+ | forward-addr: | ||
+ | forward-addr: | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * to specify **tls-cert-bundle** option that points to the local system' | ||
+ | * allow unbound to forward TLS requests; **forward-tls-upstream: | ||
+ | * specify any number of servers that allow DNS over TLS. | ||
+ | |||
+ | For each server you will need to specify that the connection port using **@**, and you will also need to indicate which is its domain name with **#**. | ||
+ | |||
+ | * Even though it looks like an comment the hashtag name allows for the TLS authentication name to be set for stub-zones and with unbound-control forward control command. | ||
+ | * There should not be any spaces between the @ and # markups. | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Another Example ===== | ||
Navigate to **Services -> DNS Resolver** | Navigate to **Services -> DNS Resolver** | ||
Line 17: | Line 84: | ||
forward-addr: | forward-addr: | ||
forward-addr: | forward-addr: | ||
- | # Below 3 addresses are Quad9 DNS. | + | |
forward-addr: | forward-addr: | ||
forward-addr: | forward-addr: | ||
Line 23: | Line 90: | ||
</ | </ | ||
- | See https:// | + | <WRAP info> |
+ | **NOTE: | ||
+ | |||
+ | It is OK to set the resolver to listen on all interfaces, since the firewall rules on the WAN will prevent Internet hosts from using your resolver anyway. | ||
- | It’s OK to set the resolver to listen on all interfaces, since the firewall rules on the WAN will prevent Internet hosts from using your resolver anyway. | + | </ |
<WRAP important> | <WRAP important> | ||
Line 32: | Line 102: | ||
However this is only for the first query. | However this is only for the first query. | ||
- | Reason for this is that CloudFlare' | + | Reason for this is that CloudFlare' |
To prevent this increase in latency, switch to standard port 53, or to an alternative DNS provider that does not use TLS for example: | To prevent this increase in latency, switch to standard port 53, or to an alternative DNS provider that does not use TLS for example: |
pfsense/dns/force_dns_over_tls.1609789166.txt.gz · Last modified: 2021/01/04 19:39 by peter