Giter Club home page Giter Club logo

your-dns's Introduction

your-dns

A docker-compose file to provide a secure adblocking DNS server

NOTE: if you are interested in a hosted solution, please take a look at nextdns.io. I'm not affiliated with nextdns.io.

NEW: Try using your-dns.run as a DNS-over-TLS server. You can use this domain with "Private DNS" feature in > Android 9 (Pie). This server is set up using the your-dns-run branch of this repo.

Goal

Run a secure DoT (DNS-over-TLS) and DoH (DNS-over-HTTPS) DNS server that can do ad blocking and hide your DNS query from your ISP.

Non Goal

Hide your DNS query from upstream recursive DNS server. Why? Because to me hide my trail from various ISPs (Verizon, ATT, and any other ISPs behind public WiFis) is more important.

Privacy Tradeoffs

We are running a DNS forwarder instead of a DNS resolver. Running a forwarder and connect to upstream DNS over secure connection does hide your DNS queries from your ISP, but it would also leaks your web history (in the form of DNS query) to the upstream DNS.

Your web history is always open to your ISP until ESNI is widely adopted. Even with ESNI, it's still easy for the ISP to learn your web history based on the IP addresses you connected.

The main benefit of running a forwarder that communicate securely with upstream DNS is that your ISP won't be able to manipulate your DNS query results, e.g. hijack the NXDOMAIN response to show ads, force traffic to go through a transparent proxy (with more and more sites offering HTTPS, this is less of a concern) and so on.

There's a trade off you need to make whether the benefit beats the reduced privacy. Personally, making it harder for the ISP to learn my web history is a good enough reason.

All components in this stack

overview of components

  1. Adguard Home: Ad blocking DNS server with native DoT/DoH support.
  2. Pomerium: An identity-aware reverse proxy. This allows me to remote access PiHole's web UI. More importantly, Pomerium is used to get SSL certificate automatically from Let's Encrypt. (reference)
  3. Optional: Autoheal: Auto-restart container that failed health check.
  4. Optional: Ouroboros: Auto-pull latest version of each container.

NOTE: Previously Pihole+CoreDNS was used. That setup was deprecated. If you are still looking for that, take a look at the "pihole" branch.

Prerequisites

  1. Install Docker (how) and docker-compose command (how).
  2. Know how to DNAT from your public IP to the server running the stack. Or alternatively if you have IPv6, allow dport=853 access to your server.

Run the stack

The following instruction will run a list of jobs on docker to DNS-over-TLS service on port 853 and foward your request through PiHole then to Cloudflare DNS.

By default the setup uses Cloudflare's 1.1.1.1 DNS server. You can modify Corefile and specify a different server. A list of DNS-over-TLS name server is available at https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Test+Servers.

  1. Create a network called infra_network. (Why not create the network in the compose file? Because you cannot create the default network in compose file, and can only replace it with external.)
    docker network create --subnet 172.30.0.0/16 infra_network
  1. Rename example.env to .env and update the values in the file. See the comment in that file for instructions.
  2. Rename adguard/conf/AdguardHome.yaml.example to adguard/conf/AdguardHome.yaml.
  3. Update the tls_server_name in pomerium.yaml to match the actual domain name you will use.
  4. docker-compose up -d and you are done :-)

TODO

None

your-dns's People

Contributors

0xflotus avatar rickynotaro avatar yegle avatar zhuangya 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

your-dns's Issues

ARM Compatible images?

Any chance there's plans in the future to have ARM compatible images created and pushed up to Dockerhub?

Document the privacy trade off of using non-ISP upstream DNS

Isnt adding two more parties (hoster and google) to your hole DNS game counterproductive securitywise?

Since my ISP is able to see my dns traffic anyway (until ESNI is a thing) I would rather peer their DNS for probably the best speed and least amount 3rd party involvement

Link to DNAT tutorials?

Its really nice how you link to the docker prerequisites.

Do you think you could link to tutorials for DNAT, or a specific typical example of the goal setup? Is it just "get your router to forward external UDP requests to the particular machine running this behind the NAT"? Or more complicated because of the docker setup?

Can we make installation process more clear?

Good day,

Thanks for amazing work and sharing it with everyone!
I started to follow the guide, but it was not very strait forward 😞Can we please make it a little bit more clear?
Here are some (dumb) question I've stumbled upon:

  • What is DOMAIN_NAME in .env file? Shall I register a real NS domain name to be able to use your-dns?
  • Could your provide example command how to create free certificate from Let's Encrypt and where it is can be found after generation?

Thank you.

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.