Summary
I have a old laptop that’s serving me as a Technitium DNS server and Tailscale exit node.
My setup is behind a CGNAT, but the Tailscale make its way around and that’s not an issue. My VPN exit node works flawlessly.
However I also set my router to make my laptop as DNS server, so all my lan network is passing through the Technitium. So, in theory all my local network is using my selfhosted DNS server.
Issue
The issue here is not the server itself, cause it’s working as intended - when I can connect to it.
What’s going on is that my server for once in a while become unreachable from lan. If I try to ping it from another device in local network, it returns that it’s unreachable, but my server still connected to the internet (I can ping Google, for example). So to solve it, I must do one of the below:
- Kick the server from the router, forcing it to reconnect
- Connect to the Tailscale VPN and ping it from the Tailscale ip
- Reboot my server
It anoys me because it’s not supposed to the server become unreachable in local randomly!
It’s important to comment that the server isn’t connected through ethernet, but it uses wifi because I can’t put my laptop near the router. The laptop is close enough to not have any wifi interference, however.
What can I do to prevent my server to become unreachable?
My setup
Server
- An old Acer laptop connected to the wifi
- Static IP configured
- SO: Arch Linux (as server, no GUI at all)
Router
D-Link DIR-842
Thank you in advance
I had an issue running Arch on a Surface Pro 3 a while back where Wifi would drop after some hours - I couldn’t ping or SSH in but the device itself could reach the internet.
I found a post mentioning Wifi power saving mode and disabled it, and it fixed the issue for me. I’ll look and see if I can’t find it, and update here if it looks relevant to you.
Also, I would definitely try with your laptop wired instead of wireless if you can.
I’ll definitely take a look at this power saving mode! Thank you!
Also, I would definitely try with your laptop wired instead of wireless if you can.
It’s kinda hard at my setup, cause the router is not close to anywhere I can put my laptop… But I’m looking for some SBC like Raspberry Pi or something to make it connected wired to the router
Try switching to openwrt firmware on the router.
D-Link stock firmware tends to be rather buggy in my experiences.
Power saving features sounds like a strong possibility.
I’ve seen a problem like this where it was related to the client switching between 2.4ghz and 5ghz and the router switching channels rather frequently.
Try writing a keep alive job. Every ten seconds ping Google.
The router is not mine… I’ll not change the firmware cause the router is borrowed from the ISP and I must give it back if I change my ISP
I’m trying the power saving mode and hoping that is the issue!
Another guy suggested ping the router from the server for once in a while as well and I think it must “remember” the router about the existence of the server
Might be a DHCP lease expiry issue.
I also suspected about DHCP, but at the router it says it’s connected and reachable…
I really don’t know if it’s DHCP or if the server did not renewed the connection somehow
The router says it’s reachable? Weird. I wonder if it’s a bug in the router then. Any firmware update available? You have tried just rebooting the router, right?
You could also script a reconnection on the laptop to happen every six hours or something.
Yeah… I can even ping the server from the router firmware! It’s really weird!
Yes, I rebooted and looked for firmware update, but nothing
You could also script a reconnection on the laptop to happen every six hours or something.
I’m trying other alternatives first, such as ping the gateway every hour and disabling power saving mode on the laptop
Random idea, continuously ping the router from the laptop so it doesn’t “forget” that the laptop exists on the WLAN?
(I know you mention the laptop can still reach out when you try, but maybe the trick is to keep having traffic to-from the laptop continuously)
Well, I may try this… Maybe set a systemd timer to ping the router for once in a while…
But I’ll wait to check if disabling saving mode do the job. If it doens’t I’ll try the ping workaround