Virtualmin custom dynip

Virtualmin has this nice feature where you can enable dynamic host and virtualhost updates so when your ip changes virtualmin updates the ips in the virtualhosts definitions. Without this feature your sites would not work anymore if your ip changes and you would have to update the ips manually.

The problem with this feature is that it only supports the DynDNS service and not everyone is using this service to update their host when their ip changes.

I'm using my own dynamic dns service and the good news is that this service is using the same protocol as DynDNS so virtualmin needs little change in order to support it.

All I had to do was add a way of specifying the hostname and port of the dynip update server.

Here's the patch for virtualmin ( tested with 3.75 and 3.76 ) :

[download id="22"]

10 thoughts on “Virtualmin custom dynip

      1. thanks a lot but it results in:

        patch unexpectedly ends in middle of line
        patch: **** Only garbage was found in the patch input.

        1. check the contents of the .diff file.
          It if doesn’t look like a unified diff then you didn’t download the right file.
          Don’t use wget to download it. Save it from your browser then transfer it with scp/sftp/ftp where you need it.

      1. don’t wait for the ip to change.
        Simulate a change by changing the ip in /etc/webmin/virtual-server/dynip.dyndns\ compatible
        then run the script manually ( /etc/webmin/virtual-server/ ) while looking at your dynamic dns server logs to catch any errors on the server side.
        You should be able to find the problem this way.

        1. There was a small bug in the patch that prevented it from updating the ip.
          I have fixed that a long time ago but forgot to update the patch on this site. Now it’s updated. Please download again and try it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.