Git Product home page Git Product logo

dns-over-https's Introduction

DNS-over-HTTPS

An implementation of RFC 8484 - DNS Queries over HTTPS (DoH). Host your own DoH web service using ASP.NET 7 Runtime that can transform any DNS server to be accessible via the DoH standard protocol.

System Requirements

  • Requires .NET 7 installed. Install Hosting Bundle for running on Microsoft IIS web server.
  • Windows, Linux and macOS supported.

Download

Install Instructions

  • Windows:
  1. Download the doh-aspnetcore.zip zip file.
  2. Edit the appsettings.json file in notepad to set the DNS server of your choice.
  3. Install the DoH app on Windows IIS web server by creating a new website and extracting the doh-aspnetcore.zip zip file into the wwwroot folder of the website.
  4. Configure SSL certificate on IIS for the website so that the service works over HTTPS.

Note: You can also run the DNS-over-HTTPS.exe to directly run the DoH console app with built in web server for quick testing.

  • Linux:
  1. Download and extract doh-aspnetcore.zip zip file to /var/aspnetcore/doh
sudo mkdir -p /var/aspnetcore/doh
cd /var/aspnetcore/doh
sudo wget https://download.technitium.com/doh/doh-aspnetcore.zip
sudo unzip doh-aspnetcore.zip
  1. Edit the appsettings.json file in nano to set the DNS server of your choice.
sudo nano appsettings.json
  1. Install the DoH app as a systemd daemon:
sudo cp systemd.service /etc/systemd/system/doh.service
sudo systemctl enable doh
sudo systemctl start doh
  1. Make sure that the DoH daemon is running without issues by running:
journalctl --unit doh --follow
  1. Configure a reverse proxy using a web server like nginx that does the SSL termination for the DoH service. Install the nginx web server using:
sudo apt-get -y install nginx

Create a config file for your domain name at /etc/nginx/sites-enabled/doh.example.com with the config shown below. Save the certificate and key files to path given as in the config.

server {
    listen 443 ssl;
    server_name doh.example.com;

    ssl_certificate /etc/nginx/ssl/doh-server.crt;
    ssl_certificate_key /etc/nginx/ssl/doh-server.key;

    location / {
        proxy_pass http://127.0.0.1:8053;
    }
}

Reload nginx web server to finish the configuration.

sudo service nginx reload

Note: You can also run dotnet DNS-over-HTTPS.dll command to directly run the DoH console app for quick testing.

The DoH service is available on the /dns-query location on the web site that you are running. If you are running it directly as a console app then your DoH end point URL will be http://localhost:5000/dns-query. For Linux systemd daemon, the DoH end point will be http://localhost:8053/dns-query as per the argument provided in the systemd.service file.

Blog Posts

Configuring DNS-over-TLS and DNS-over-HTTPS with any DNS Server

Support

For support, send an email to [email protected]. For any issues, feedback, or feature request, create an issue on GitHub.

Become A Patron

Make contribution to Technitium by becoming a Patron and help making new software, updates, and features possible.

Become a Patron now!

dns-over-https's People

Contributors

shreyaszare avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dns-over-https's Issues

Compatibility issues

The service does not seem to be working with all DoH utilities. I've installed the service on a Windows Server running IIS.

I can query the service using dig, but other tools like curl, dog do not work. Dog for example reports:
Error [protocol]: Malformed packet: insufficient data

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.