Custom DNS Timestamp

Hi,

I need to use a custom DNS template for all new virtual domains created and would like to add a time stamp for the serial number. Is there a way I can use a variable that will include minutes and seconds?

Thnx in advance

Hi,

Are you trying to get a serial number like:

2014012500

Best Regards, Peter Knowles TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com

Yes, at the moment I use:

${CURRENT_YEAR}${CURRENT_MONTH}${CURRENT_DAY}

It would be great to be able to add hour minute and second, or a random set of digits at the end (as long as that is within the soa guidelines)

Kevin

Hi,

Login to “Virtualmin” then navigate to:

  1. “Webmin > Servers > BIND DNS Server > Module Config > Zone file options”

  2. Change the “Serial number style” to “Date based”.

  3. Click “Save”.

*** If you’ve edited the way SOA serial numbers are created somewhere else, remove these custom settings. ***

The next time you make an adjustment to DNS, the new settings will take place.

If you want these changes to take effect immediately, simply disable DNS for a domain from Virtualmin, then re-enable it.

*** remember that you’ll need to re-create any custom DNS entries if you have any ***

Best Regards, Peter Knowles TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com

Hi Peter,

Thank you, however I am using the custom DNS option in virtualmin server template (first box in BIND DNS section), so cannot use the default settings. This is due to using vanity nameservers.

Kevin

If this is only about creation of new zones, you could just use a fixed “01” or “00” as last part of the serial number. That’s what new zones start out with - the current date, and a fixed value for the last part. They don’t use the current time of the day for that.

For each subsequent change, the date is updated (resetting the last part to 0), and if multiple changes are made on the same date, the last part is incremented, independent of time. Webmin/Virtualmin do this automatically if you use their functions.

Thank you, in the end I removed the custom soa record and used Virtualmins default setting. I then set Webmin to use date format.

Thank you for your input.