TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.27k stars 418 forks source link

DHCP server not showing any leases #605

Closed Node815 closed 1 year ago

Node815 commented 1 year ago

I have a Fresh Tomato firmware router and have the DHCP server disabled there and have enabled the DHCP service on the DNS server. Yesterday, my leases were coming in and I saw both reserved and dynamic leases, tonight, there were none, so I discovered that the DHCP server was enabled somehow in the Tomato Router, so I disabled that, and rebooted a few devices including the router to see if I could push them back to the DNS server, No such luck, they could not grab a DHCP lease.

I installed the server yesterday using the script. Is there a way to query the DHCP server to see if it is down in this case via command line? I do not see a way otherwise to check other than rebooting the server box itself to see if it resolves the issue and I would rather not do that as most of my home network infrastructure is based there.

This is Version 11.0.3 that I am using by the way.

ShreyasZare commented 1 year ago

Thanks for asking. There is no command line for the DNS server. All options are available via the HTTP API and the web GUI. You can check the DHCP scope's status from the web panel itself.

I would recommend that you check the DNS logs from the web panel to know if there are any issues during DHCP lease allocation.

Node815 commented 1 year ago

Thanks for your reply! I had some more time to look into it this morning, about the time my leases dropped, the log files indicated that it was deleting the leases which would be normal since they were dropping.

I resolved the issue this morning though by running the uninstall script and reinstalling it again which brought up all my devices on the network in the DHCP table. I should note - that the act of uninstalling the program did not remove any stored data as when I went back into the interface, everything was there. I did not need to reset my admin account credentials or static leases.

I suspect a simple reboot of the server in this case may have resolved the issue in lieu of reinstalling the software, with that in mind - to avoid the reboot or the steps I took, is there a CLI option in Linux I can use to restart or stop/start the DNS server? (The server is on Debian 11). Or can this be done via the API calls?

Your API wiki information doesn't show any call I could make to restart things The reason I ask is, if so, I could use that to restart the DNS Server through a HTTP Post, to the server, or via a command line.

ShreyasZare commented 1 year ago

Good to know that its working now after reboot. If you want to just restart the DNS server then use systemctl restart dns command.

Node815 commented 1 year ago

Great! I didn't reboot the server though (the root server it's hosted on), I simply ran the uninstall script and ran it again. With your suggestion to do the systemctl call to restart the DNS server, are you saying then that it will also restart the entire subsystem that your program is running? (DHCP, Blocking, DNS Routing) etc? If so, that's easy enough to do. :)

ShreyasZare commented 1 year ago

Great! I didn't reboot the server though (the root server it's hosted on), I simply ran the uninstall script and ran it again. With your suggestion to do the systemctl call to restart the DNS server, are you saying then that it will also restart the entire subsystem that your program is running? (DHCP, Blocking, DNS Routing) etc? If so, that's easy enough to do. :)

Yes, the DHCP server is part of the DNS server itself. Everything is inside the one daemon process that is running.

Node815 commented 1 year ago

Perfect! I will utilize that if the server does the same thing as yesterday. It's unlikely they will, but good to know!