Giter Site home page Giter Site logo

win-dns-doh-posh's Introduction

Win-DNS-DoH-PoSh

This repository contains a set of PowerShell scripts to configure Windows 11 DNS over HTTPS (DoH) for NextDNS, Quad9 and (potentially) other providers. There is also a script to reset DNS settings to the default (unencrypted) state, which can sometimes be necessary when authenticating on a captive portal (e.g., Deutsche Bahn's WiFiOnIce) or when local name resolution is required (e.g., when accessing fritz.box).

Scripts

Enable-NextDNSDoh.ps1

This script configures NextDNS as secure DNS provider in Windows 11.

Enable-Quad9DNSDoh.ps1

This script configures Quad9 as secure DNS provider in Windows 11.

Reset-DnsToDhcp.ps1

This script resets DNS servers to what is configured via DHCP.

Implementation Notes

PowerShell and NetSh Fail to Enable Encrytion

The relevant PowerShell cmdlets for working with DoH can be found on many websites, including Microsoft's documentation. What all sources fail to mention is that PowerShell (or netsh, for that matter), is not enough. An additional registry value needs to be set manually that no command-line tool currently takes care of. Without that value, DoH encryption remains disabled, as can be verified in the Settings UI.

The missing registry value to actually enable DNS-over-HTTS encryption for IPv4:

Registry path:  HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\{INTERFACE-ID}\DohInterfaceSettings\Doh\{IP-ADDRESS}
Registry value: DohFlags
Value type:     QWORD
Data:           1

The missing registry value to actually enable DNS-over-HTTS encryption for IPv6:

Registry path:  HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\{INTERFACE-ID}\DohInterfaceSettings\Doh6\{IP-ADDRESS}
Registry value: DohFlags
Value type:     QWORD
Data:           1

win-dns-doh-posh's People

Contributors

helgeklein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.