leng - a fast DNS server with adblocking, built for self-hosting - eviltoast

A few months ago I went on a quest for a DNS server and was dissatisfied with current maintained projects. They were either good at adblocking (Blocky, grimd…) or good at specifying custom DNS (CoreDNS…).

So I forked grimd and embarked on rewriting a good chunk of it for it to address my needs - the result is leng.

  • it is fast
  • it is small
  • it is easy
  • you can specify blocklists and it will fetch them for you
  • you can specify custom DNS records with proper zone file syntax (SRV records, etc)
  • it supports DNS-over-HTTPS so you can stay private
  • it is well-documented
  • can be deployed on systemd, docker, or Nix

I have been running it as my nameserver in a Nomad cluster since! I plan to keep maintaining and improving it, so feel free to give it a try if it also fulfils your needs

  • jherazob@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Tangential partial offtopic aside: Unless i’m misunderstanding, you’re setting this up behind your home router and allowing it on your various devices using a VPN. Am i right? Any details, or even better, guides, on how to replicate this setup? I guess the DNS records on Leng are to be able to call services inside your home LAN by name instead of IPs, which is a nice quality of life upgrade.

    • Nico@r.dcotta.euOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      What you described is correct! How to replicate this will depend heavily on your setup.

      In my specific scenario, I make the containers of all my apps use leng as my DNS server. If you use plain docker see here, if you use docker compose you can do:

      version: 2
      services:
       application:
        dns: [10.10.0.0] # address of leng server here!
      

      Personally, I use Nomad, so I specify that in the job file of each service.

      Then I use wireguard as my VPN and (in my personal devices) I set the DNS field to the address of the leng server. If you would like more details I can document this approach better in leng’s docs :). But like I said, the best way to do this won’t be the same if you don’t use docker or wireguard.

      If you are interested in Nomad and calling services by name instead of IP, you can see this tangentially related blog post of mine as well