local DNS server does not work as expected
from WbrJr@lemmy.ml to selfhosted@lemmy.world on 15 Sep 2024 16:26
https://lemmy.ml/post/20329744

So I am working on my home server. I installed docker and use a dnsmasq container as my dns server to resolve local ip adresses.

Laptop and server are both linux (ubuntu LTS 24.4)

What works:

what does not work:

What am i missing?

Thanks a lot already! BTW: ZFS is crazy nice :D

#selfhosted

threaded - newest

maxwellfire@lemmy.world on 15 Sep 2024 17:21 next collapse

Isn’t .local a mdns auto configured domain? Usually I think you are supposed to choose a different domain for your local DNS zone. But that’s probably not the source of the problem?

WbrJr@lemmy.ml on 15 Sep 2024 20:08 collapse

Changing the domain does not change the problem sadly. I thought .local is a safe one to use

BearOfaTime@lemm.ee on 15 Sep 2024 21:02 collapse

There was a post recently about “.LAN” recently being added to the DNS spec

catloaf@lemm.ee on 15 Sep 2024 17:26 next collapse

First, don’t use .local, as it’s used by mDNS. You should use .internal or a domain you own. I recommend changing before you get any more committed to your environment.

I’m not really following your post, because you’re not specifying whether each point is on the server or laptop.

Personally, I dislike Ubuntu on the server because of how it runs stuff like systemd-resolvd, which as you’ve experienced, gets in the way of standard operation.

darklamer@lemmy.dbzer0.com on 15 Sep 2024 21:16 next collapse
possiblylinux127@lemmy.zip on 15 Sep 2024 21:21 collapse

Just use .lan

Darkassassin07@lemmy.ca on 15 Sep 2024 17:52 collapse

what does not work:

  • i can not ping server.local (- for testing i have to stop the systemd-resolved.service to run the dnsmasq server, or else there are port collisions, but that should not be the problem i guess. I am happy to hear your solution :))
  • i can also not use ssh to log in to server.local, ip address works

Have you added “server.local” as a DNS record in your dnsmasq container, pointing to your servers LAN IP? Sounds like dnsmasq isn’t resolving that name, which would lead to both of these ‘failures’.

WbrJr@lemmy.ml on 15 Sep 2024 20:08 collapse

So in the dnsmasq.config file is this entry: ‘address=/server.local/192.168.178.10’ and using nslookup it resolves it correctly

maxwellfire@lemmy.world on 16 Sep 03:45 collapse

Does it resolve correctly from the laptop or the server. What about resolvectl query server.local on the laptop?

WbrJr@lemmy.ml on 21 Sep 19:09 collapse

When I am on the server, it can even ping the domain. On my laptop, it can only resolve the domain to the correct ip

maxwellfire@lemmy.world on 22 Sep 21:39 collapse

Could you post the specific output of the commands that don’t work? It’s almost impossible to help with just ‘It doesn’t work’. Like when ping fails, what’s the error message. Is it a timeout or a resolution failure. What does the resolvectl command I shared show on the laptop. If you enable logging on the DNS server, do you see the requests coming in when you run the commands that don’t work.