this post was submitted on 11 Aug 2023
20 points (91.7% liked)

Selfhosted

40198 readers
808 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] wgs@lemmy.sdf.org 4 points 1 year ago (1 children)

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 1 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] wgs@lemmy.sdf.org 1 points 1 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.