Giter Site home page Giter Site logo

davidvicenteranz / docker-dns-over-https Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ventz/docker-dns-over-https

0.0 1.0 0.0 7 KB

Docker Hub ventz/dns-over-https - DNS (tcp+udp 53) to CloudFlare and Google's HTTPS APIs

Home Page: https://hub.docker.com/r/ventz/dns-over-https/

Shell 4.11% Perl 87.06% Dockerfile 8.82%

docker-dns-over-https's Introduction

What is "DNS over HTTPS"

Last Updated: 2-22-2020

A very small (268 MB) and lightweight DNS server which responds to standard DNS (see supported resource records) queries on the front-end via tcp+udp 53, and it looks them up via HTTPS on the back-end, using one of two choices:

1.) Cloud Flare's HTTPS DNS API: https://developers.cloudflare.com/1.1.1.1/dns-over-https/json-format/

or

2.) Google's HTTPS DNS API: https://developers.google.com/speed/public-dns/docs/dns-over-https

It then responds to the query via standard DNS responses, which makes it viable for using things like dig/host, and even pointing your system's /etc/resolv.conf

How to run the "DNS over HTTPS":

You have two choices for the backend:

1.) (default) CloudFlare

docker run -it -d \
    --restart=always \
    -p 53:53/udp \
    -p 53:53 \
ventz/dns-over-https

or

2.) Google

docker run -it -d \
    --restart=always \
    -p 53:53/udp \
    -p 53:53 \
ventz/dns-over-https google

How to run the "DNS over HTTPS" with IPv6 support?

You can add '6' as a second parameter after the now required backend provider input:

1.) CloudFlare IPv6 Support:

docker run -it -d \
    --restart=always \
    -p 53:53/udp \
    -p 53:53 \
ventz/dns-over-https cloudflare 6

or

2.) Google IPv6 Support:

docker run -it -d \
    --restart=always \
    -p 53:53/udp \
    -p 53:53 \
ventz/dns-over-https google 6

How to use it?

After you run the service (see above: "DNS over HTTPS"), you can manually test:

dig cnn.com @DOCKER-CONTAINER-IP-ADDRESS

or

dig -x 207.241.224.2 @DOCKER-CONTAINER-IP-ADDRESS

Or, you can even point your /etc/resolv.conf to:

nameserver DOCKER-CONTAINER-IP-ADDRESS

Supported Resource Record Types:

  • A
  • AAAA
  • CNAME
  • PTR
  • NS
  • SRV
  • TXT
  • SPF

It is extremely easy to add additional resource records.

If you need to add a new one, first find the value for it: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4

Once you have the type and value, find the line in entrypoint.pl that looks like this:

elsif($qtype == 99) { $qtype = 'SPF'; }

and simply add another one for your new resource record.

For example, to add LOC (which is # 29), you would add:

elsif($qtype == 29) { $qtype = 'LOC'; }

Look up type you want and the value number (ex:

Help/Questions/Comments:

For help or more info, please open a GitHub issue

docker-dns-over-https's People

Contributors

ventz avatar

Watchers

James Cloos 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.