Announcing a DNSMasq module

I’ve developed a module (based on the previous module by Neil Fisher) for managing DNSMasq, a popular DNS/DHCP server tool.

Currently still in beta; I haven’t done any localization other than US English. It’s also based only on my Debian installation, as well - I would welcome relevant input from users of other distributions/OSes.

It’s available from my Github Repo. Please try it out and let me know if you encounter any issues.

1 Like

It would help if you put some installation instructions on github at least, there is very little in the way of documentation there. I get that the module is in beta but you may get some users to test it if you gave instruction on what to do at this point

from the webmin module installer it appears that the module is expected to be packed in a wbm file or a RPM file (RHEL types) but no deb file. So I would guess packing it in a wbm file will ease installation and get more possible users
so running this https://github.com/webmin/webmin/blob/master/create-module.pl on your project should create the wbm file required add it to your github project and supply the link to it, I guess it will install with no problems

You’re on an RPM-based system. If you were on a deb-based system, it would offer to install a deb, but not an RPM.

I am using a deb-based system … not RHEL so is there a possible bug there ?

:exploding_head:

I guess so. Maybe it doesn’t detect at all, and just says the same thing for all systems, but in that case it shouldn’t only mention one of them.

Holy cow, it doesn’t actually support installing a deb via that method (but Webmin modules absolutely can and should be packaged in debs for deb-based distros, and you can install them using the Software Packages module). It’s really weird that the module install in Webmin only supports RPM. I’d rather it support both or neither.

1 Like

I would have hoped it would handle deb files as this would make module installation a ‘one stop shop’ rather than having to go to the software packages module to install a deb/rpm. that said you could test the file extension in the install module and perhaps pass it to the software packages module to install

@jimr1 The .wbm.gz file is available under Releases (not sure why I’m not allowed to link to it or even include the URL in my reply), but you’re right. I need to put more in the README.

you mean this link ?
https://github.com/klugerama/webmin-dnsmasq/releases/download/v0.3-beta/dnsmasq.wbm.gz
just to try is out is this the correct link ?

Yes, that’s correct. I tried adding that as a link, and then as just part of my comment, but I’m getting a dialog that says “An error occurred: Sorry you cannot post a link to that host.”, with no other explanation.

I don’t know that is something to do with the forum software I guess as you can see I had no problem posting it, so maybe you have not got enough profile points on the forum yet to post links of this sort

That’s what I was thinking too. Which is weird, since I was able to include a link in the original post.

New users are pretty strictly limited when posting URLs. It’s to prevent spam and malware and such. Once you’ve been around a little while, it’ll begin to trust you more.

I bumped your user level up, so you should be able to post more links without triggering spam filters (everybody has some limits on links, but you probably won’t run into it if you’re just posting one or two links).

now I have this bit


what do I do with it ?

The Git page has some instructions now :+1: but you could also install it like this

as you can see from the results it works well

now I have had a chance to test it I have the following observations

  1. If dnsmasq is not installed, the user is not informed that dnsmasq is not installed and will need to be installed before the module can control it.
  2. pressing the start button you get a blank error page
    where you may expect an error message to be posted, the error in this case (and going to be the one you need to look at) is that port 53 is already in use ( systemd-resolved is running) so maybe by default perhaps the service needs to start on another port othen 53

@jimr1 Thanks for the input! I’ve added instructions for installing either from the downloaded file or directly from Github, as you indicated.

I’ve also improved the installation check - it should now correctly indicate that it can’t locate the executable (if DNSMasq isn’t installed) or the config file (if it isn’t in the default location, /etc/dnsmasq.conf).

Finally, there are now 2 more items under the “DNS settings” tab:

  • “Service Control” - A simple page with buttons to start, stop, restart, reload configs (see the docs for this), and dump logs
  • “View Logs” - Show the log file

:+1:
so next stage is (perhaps) how to alert the user that the module has been updated if you are distributing the module from github rather than a deb type repository , meaning if apt update/upgrade is run the module gets updated.
I have done, in the past, a routine that checked a file in the github repository which on change notified the user the is an update (because the file had changed).
in my case the end user had cloned the github repository, so it was a simple git pull to update. WhichI guess is the same mechanism as apt uses.

I’m having fun playing with this what would be a good addition would be able to edit the hosts file
as you can see I am running this domain (locally) :rofl:

@jimr1 Good suggestion. I’ve added this in the latest release.

I’ve also added one more item under the “DNS settings” tab:

  • “Edit script files” - An editing environment (just like the configuration editor) for scripts and files specified in the configuration options dhcp-script, dhcp-luascript, dhcp-boot, and pxe-prompt.