I’m finally starting to install local web apps that my wife/kids would be interested in, and I know it has to be super easy or they’re never going to go near it. Most everything is running on my Synology on different ports, with absolutely nothing exposed to the outside world, and I’d like to run local DNS and proxy so everything is available LAN-only with an easy hostname - plex.local, paperless.local, etc. (If we want remote access I’ll just run Tailscale.) I’m already running PiHole, and I’m assuming if I poke around I can add local names in there, but has anybody else that’s done this have any suggestions for setting things up?

  • z3bra
    link
    fedilink
    English
    41 year ago

    I have setup my own DNS locally with unbound(1). It blackholes domains, but I also use it as a caching + forwarder to my external DNS over TLS (for improved privacy regarding my ISP). I don’t do it, but unbound let’s you add local data manually to provide direct answers without forwarding it:

    local-zone: "local." static
        local-data: "plex.local. 10800 IN A 10.0.0.3"
        local-data: "paperless.local. 10800 IN A 10.0.0.4"
        local-data: "pihole.local. 10800 IN A 10.0.0.53"
        [...]
    

    Then you can either configure it to include a generated list of domains to explicitly NXDOMAIN, or just forward everything to the pihole:

    forward-zone:
        name: "*"
        forward-addr: 10.0.0.53
    
    • @tburkhol@lemmy.world
      link
      fedilink
      English
      1
      edit-2
      1 year ago

      I don’t know about unbound, but bind can be configured to talk with dhcpd and allow clients to set their own hostnames

      In bind.conf allow-update { key "rndc-key"; };

      In dhcpd.conf

      ddns-update-style interim;
      ddns-updates on;
      ddns-domainname "lan.";
      ddns-rev-domainname "in-addr.arpa.";
      key rndc-key {
              algorithm hmac-md5;
              secret "secret";
      };
      

      No messy tables to maintain.

      • z3bra
        link
        fedilink
        English
        11 year ago

        That’s interesting. Unbound doesn’t support that afaik. The local data feature was requested by OP so I just provided a solution for it.