Git Product home page Git Product logo

dnsd's Introduction

dnsd

A custom DNS server for my network. DNS zone files are dynamically downloaded on startup and are continuously monitored for changes. When the DNS zone is changed, the service reloads it.

I primarily use this to give myself a limited form of piHole DNS adblocking, as well as serving my home network services.

This is related to my WireGuard Site to Site VPN project.

How to Configure dnsd

dnsd relies on RFC 1035 zone files. This is a file that looks roughly like this:

$TTL 60
$ORIGIN pele.
@       IN     SOA     oho.pele. [email protected]. (
                       2019040601  ; serial number YYYYMMDDNN
                       28800       ; Refresh
                       7200        ; Retry
                       864000      ; Expire
                       60          ; Minimum DNS TTL
                       )
        IN     NS      oho.pele.
        
oho IN A 10.55.0.1
1.0.55.10.in-addr.arpa. IN PTR oho.pele.

;; apps
prometheus IN CNAME oho.pele.
grafana IN CNAME oho.pele.

Put this file in a publicly available place and then set its URL as a -zone-file in the command line configuration. This file will be monitored every minute for changes (via the proxy of the ETag of the HTTP responses).

If you need to change the DNS forwarding server, set the value of the environment variable FORWARD_SERVER or the command line flag -forward-server.

Installation

Docker

$ docker run --name dnsd -p 53:53/udp -dit --restart always xena/dnsd:v1.0.3 \
  dnsd -zone-url https://xena.greedo.xeserv.us/files/adblock.zone \
       -forward-server 1.1.1.1:53

Testing

$ dig @127.0.0.1 google.com
$ dig @127.0.0.1 oho.pele

Support

If you need help with this, please contact me. This is fairly simplistic software. If you need anything more, I'd suggest using CoreDNS or similar.

If you like this software, please consider donating on Patreon or Ko-Fi. I use this software daily on my personal network to service most of my devices.

Thanks and be well.

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.