Skip to content

Instantly share code, notes, and snippets.

@niikoo
Forked from linuxr01/README.md
Last active July 1, 2022 17:13
Show Gist options
  • Save niikoo/dca0683029358106196eb90d3f4c8d08 to your computer and use it in GitHub Desktop.
Save niikoo/dca0683029358106196eb90d3f4c8d08 to your computer and use it in GitHub Desktop.
Using AdGuard DNS over HTTPS (DoH) on Windows 11

Why

You may want to use AdGuard's DNS over HTTPS1 service if you

  1. Want to make it harder for your ISP to know what websites you are requesting
  2. Want to block most traditional ads from your web browsing experience across your entire PC
  3. Want to make the web more family friendly (using the AdGuard Family protection server 2)

Setup instructions

  1. Open PowerShell Step 1
  2. Add the primary and secondary AdGuard DNS IPv4 and IPv6 addresses3
    netsh dns add encryption server=94.140.14.14 dohtemplate=https://dns.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=94.140.14.140 dohtemplate=https://dns-unfiltered.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=94.140.14.15 dohtemplate=https://dns-family.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=94.140.15.15 dohtemplate=https://dns.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=94.140.14.141 dohtemplate=https://dns-unfiltered.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=94.140.15.16 dohtemplate=https://dns-family.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=2a10:50c0::ad1:ff dohtemplate=https://dns.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=2a10:50c0::1:ff dohtemplate=https://dns-unfiltered.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=2a10:50c0::ad1:ff dohtemplate=https://dns-family.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=2a10:50c0::bad1:ff dohtemplate=https://dns.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=2a10:50c0::2:ff dohtemplate=https://dns-unfiltered.adguard.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=2a10:50c0::bad2:ff dohtemplate=https://dns-family.adguard.com/dns-query autoupgrade=yes udpfallback=no
    
  3. Verify addition of DNS options (the example below is a partial output) netsh dns show encryption
    Encryption settings for 94.140.15.15
    ----------------------------------------------------------------------
    DNS-over-HTTPS template     : https://dns.adguard.com/dns-query
    Auto-upgrade                : yes
    UDP-fallback                : no
    
    Encryption settings for 94.140.14.14
    ----------------------------------------------------------------------
    DNS-over-HTTPS template     : https://dns.adguard.com/dns-query
    Auto-upgrade                : yes
    UDP-fallback                : no
    
    Encryption settings for 2a10:50c0::ad1:ff
    ----------------------------------------------------------------------
    DNS-over-HTTPS template     : https://dns.adguard.com/dns-query
    Auto-upgrade                : yes
    UDP-fallback                : no
    
    Encryption settings for 2a10:50c0::ad2:ff
    ----------------------------------------------------------------------
    DNS-over-HTTPS template     : https://dns.adguard.com/dns-query
    Auto-upgrade                : yes
    UDP-fallback                : no
    
    • If you don't see the new DNS options, you may need to run PowerShell with administrator priviledges
  4. Open Settings > Network & internet > Wi-Fi > Hardware properties Step 4
  5. Click the "Edit" button in the DNS servers block Step 5
  6. Change the dropdown setting from "Automatic (DHCP)" to "Manual" Step 6
  7. Ensure both IPv4 and IPv6 are toggled on Step 7
  8. Under IPv4, enter 94.140.14.14 for the Preferred DNS, and 94.140.15.15 for the Alternate DNS Step 8
  9. Under IPv6, enter 2a10:50c0::ad1:ff for the Preferred DNS, and 2a10:50c0::ad2:ff for the Alternate DNS Step 9
  10. Ensure all of the DNS encryption dropdowns are set to "Encrypted only (DNS over HTTPS)" Step 10
  11. Click "Save" Step 11

Footnotes

  1. https://en.wikipedia.org/wiki/DNS_over_HTTPS

  2. https://adguard-dns.io/en/welcome.html#:~:text=%22Family%20protection%22%20does%20the%20same%2C%20but%20also%20blocks%20websites%20with%20adult%20content%20and%20enforces%20%22Safe%20search%22%20option%20in%20browsers%20that%20provide%20it.

  3. https://adguard-dns.io/en/public-dns.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment