Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
-
No low-effort posts. This is subjective and will largely be determined by the community member reports.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
Okay. It's going to be a little harder to diagnose it since the problem isn't immediately visible, but you've got all the Linux toolset there, so that's helpful.
Is the DNS server you're trying to use from the LAN machines running on the OpenWrt machine, or off somewhere on the Internet?
EDIT: Or on the LAN, I guess.
EDIT2: Oh, you answered that elsewhere.
Have you tried doing a DNS lookup from the router (pinging a host by name, say) when you were having the problems?
If so and it didn't work, that'd suggest that the problem is the upstream DNS server. If that's the problem, as IsoKiero suggests, you might set the OpenWrt box to use a different DNS server.
If so, and it worked, that'd suggest that the issue is the OpenWrt host's DNS server serving names. It sounds like OpenWrt uses dnsmasq by default.
If not...that'd probably be what I'd try next time the issue comes up.
Yes this works when I'm having issues. I guess I'll try looking in to my routers DNS next time i have issues. For now it's working again (I still haven't chanhed anything)
Okay, gotcha. In that case, my guess is that the most-likely issue is with the DNS daemon that OpenWRT is using, which is most-likely dnsmasq.
You could confirm that your DNS configuration on the LAN hosts is actually using OpenWRT as the DNS server if you wanted
I could walk through that, if you're not sure. But from a test-when-it's-happening situation, I'd probably:
Install
digon the Mint box, if it's not already installed. That's a DNS diagnostic program that doesn't use your system resolving mechanism, talks directly to DNS, so it cuts out any other factors. It'll be in the bind9-dnsutils package.Install
digon the OpenWRT box.Confirm that you can successfully run it on both the OpenWrt box and your laptop when there are no problems (your router's LAN address probably being something like 192.168.1.1):
Confirm that you can successfully run it on both the OpenWrt box and your laptop when there are no problems using whatever outside DNS server you have the OpenWrt box set to use (assuming 1.1.1.1 here):
Next time you have problems, repeat the above. If both the
digon your OpenWrt box and on your laptop using the OpenWrt DNS server now fail, then it's probably pretty safe to say that it's the DNS server on the OpenWrt box at fault. If just the one on your laptop fails, then it's going to be a communication issue between your LAN box and the OpenWrt DNS server.Assuming that the problem is the OpenWrt DNS server, and assuming that it's dnsmasq, to troubleshoot further, I might try looking at its logs, or installing
tcpdumpon the OpenWrt box and running that, something like$ tcpdump -nvvv -i any udp port domain. That should let you see both the incoming DNS queries going to the OpenWrt DNS server as well as the queries that it is sending upstream (the-nwill preventtcpdumpfrom itself sending DNS queries to look up IP addresses, which would generate more noise, the-vvvto show all possible information about the packets, and the-i anyto show all packets on all interfaces). That'll let you see whether it's getting flooded with DNS queries and to see what queries it's sending to the upstream DNS server out on the Internet.That won't alone solve your problem, but it'd be the next step I'd try to narrow down what's going on.