this post was submitted on 15 Sep 2024
14 points (88.9% liked)

Selfhosted

40246 readers
904 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
 

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:

  • 'resolvectl status' shows the ip of my dns server
  • i can ping the ip of the dns server (that will run other stuff like nextcloud soon as well)
  • i can use nslookup to resovle server.local to the correct ip address (even after changing the entry, so its not the cache in my laptop)

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

What am i missing?

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

top 11 comments
sorted by: hot top controversial new old
[–] catloaf@lemm.ee 8 points 2 months ago (2 children)

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.

[–] maxwellfire@lemmy.world 6 points 2 months ago (1 children)

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 1 points 2 months ago (1 children)

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

[–] BearOfaTime@lemm.ee 2 points 2 months ago

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

[–] Darkassassin07@lemmy.ca 3 points 2 months ago (1 children)

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 2 points 2 months ago (1 children)

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 2 points 2 months ago (1 children)

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

[–] WbrJr@lemmy.ml 1 points 1 month ago (1 children)

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 1 points 1 month ago

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.