Security/DNS Over HTTPS/Heuristics: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(clean intro more)
(Fix enterprise link)
 
(3 intermediate revisions by 3 users not shown)
Line 3: Line 3:
'''High-level overview:''' https://support.mozilla.org/en-US/kb/configuring-networks-disable-dns-over-https
'''High-level overview:''' https://support.mozilla.org/en-US/kb/configuring-networks-disable-dns-over-https


'''Implementation:''' https://searchfox.org/mozilla-central/source/browser/components/doh/DoHHeuristics.jsm<br />
'''Implementation:''' https://searchfox.org/firefox-main/source/toolkit/components/doh/DoHHeuristics.sys.mjs
[https://searchfox.org/mozilla-central/source/browser/components/doh/DoHController.jsm DoHController.jsm] is responsible for running them at startup and upon network changes, and taking action to disable or enable DoH based on the outcome.
 
[https://searchfox.org/firefox-main/source/toolkit/components/doh/DoHController.sys.mjs DoHController.jsm] is responsible for running them at startup and upon network changes, and taking action to disable or enable DoH based on the outcome.


== Global Canary ==
== Global Canary ==
Line 26: Line 27:


We look at all certs in the cert database and check if any of them are not "built-in". If such certs are present, we disable DoH.
We look at all certs in the cert database and check if any of them are not "built-in". If such certs are present, we disable DoH.
See also:
# https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/security/manager/ssl/nsIX509CertDB.idl#329
# https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/security/manager/ssl/nsIX509Cert.idl#47


== Enterprise Policies ==
== Enterprise Policies ==
Line 32: Line 37:


See also:
See also:
# https://support.mozilla.org/en-US/products/firefox-enterprise/policies-customization-enterprise/policies-overview-enterprise
* https://support.mozilla.org/en-US/products/firefox-enterprise/settings


== Enterprise Roots ==
== Enterprise Roots ==
Line 39: Line 44:


See also:
See also:
# https://support.mozilla.org/en-US/kb/setting-certificate-authorities-firefox
* https://support.mozilla.org/en-US/kb/setting-certificate-authorities-firefox


== ZScaler Canary Domain ==
== ZScaler Canary Domain ==


Currently, ZScaler has not yet adopted the global canary, and is supported by a separate canary lookup heuristic that operates on `sitereview.zscaler.com`.
Currently, ZScaler has not yet adopted the global canary, and is supported by a separate canary lookup heuristic that operates on `sitereview.zscaler.com`.
== VPN or Proxy ==
If a VPN, proxy or [https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn593632(v=ws.11) NRPT] is detected on Windows, then Firefox will not automatically use DNS over HTTPS.

Latest revision as of 07:08, 14 August 2026

Firefox runs several heuristics on each network to determine whether it's OK to enable DoH on that network. Generally, the heuristics attempt to disable DoH in order to support parental controls and enterprise configurations.

High-level overview: https://support.mozilla.org/en-US/kb/configuring-networks-disable-dns-over-https

Implementation: https://searchfox.org/firefox-main/source/toolkit/components/doh/DoHHeuristics.sys.mjs

DoHController.jsm is responsible for running them at startup and upon network changes, and taking action to disable or enable DoH based on the outcome.

Global Canary

See https://support.mozilla.org/en-US/kb/canary-domain-use-application-dnsnet

Parental Controls Service

nsIParentalControlsService provides an interface to check whether parental controls are enabled on the user account on the OS. If so, we disable DoH.

See also:

  1. Parental Controls Service component
  2. https://developer.apple.com/documentation/devicemanagement/parentalcontrolscontentfilter
  3. https://docs.microsoft.com/en-us/windows/win32/parcon/using-parental-controls-settings-apis

Forced SafeSearch (DNS-based Parental Controls)

As a way to detect DNS-based content filtering, we perform DNS lookups of filtered and unfiltered domains of popular content platforms. If any of the IPs returned for the filtered domains of a given platform are identical to any of the IPs returned for the unfiltered domains, we disable DoH. Currently, Google and YouTube are supported.

Third-party Root Certificates

We look at all certs in the cert database and check if any of them are not "built-in". If such certs are present, we disable DoH.

See also:

  1. https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/security/manager/ssl/nsIX509CertDB.idl#329
  2. https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/security/manager/ssl/nsIX509Cert.idl#47

Enterprise Policies

If enterprise policies are active, we disable DoH unless it is explicitly enabled by the DNSOverHTTPS policy.

See also:

Enterprise Roots

If enterprise root support has been enabled by setting the pref `security.enterprise_roots.enabled` to true, we disable DoH.

See also:

ZScaler Canary Domain

Currently, ZScaler has not yet adopted the global canary, and is supported by a separate canary lookup heuristic that operates on `sitereview.zscaler.com`.

VPN or Proxy

If a VPN, proxy or NRPT is detected on Windows, then Firefox will not automatically use DNS over HTTPS.