Custom TTL for specific DNS entry

4 posts / 0 new
Last post
#1 Tue, 03/21/2017 - 09:32
toreskev

Custom TTL for specific DNS entry

Hi folks!

I have a script running on my server that checks a file for changes to an IP-adress. If that adress changes it removes the current record and adds a new one with the updated IP. However, on that specific entry I want a custom TTL which I've set in the virtualmin panel after the record has been added. Is there a way to change this directly from CLI?

I know it is possible to change for the whole domain, but I don't want that. Only on that one entry.

Thanks!

Tue, 03/21/2017 - 11:22
unborn
unborn's picture

@toreskev

Hi, yes it is..you can change ip or the 'hole lot' if you would feel like it or write another script which wil do it for you automatically..it is totally Independent from virtualmin and have nothing to do with virtualmin. I suggest you to re-write your script from base of usage. You can use it with cli or separate - its up to you. I do use my script to do dyndns for that.. just one entry for subdomain within bind and it works.. I can confirm that.. and it has nothing to do with virtualmin.. its just terminal and cron on another linux.

-happy coding days :)

Configuring/troubleshooting Debian servers is always great fun

Wed, 03/22/2017 - 04:51 (Reply to #2)
toreskev

Well, if you'd bothered to actually read my post, I said that I already do that automatically, and the script does as intended. Messing with bind zonefiles directly is a bad idea, since they get overwritten when doing changes through Virtualmin.

As I said, I'm using the Virtualmin cli commands to do this and was wondering if there was another option I could add to that command when changing the DNS entry.

Wed, 03/22/2017 - 05:22 (Reply to #3)
unborn
unborn's picture

ah sorry, I did not realised that virtualmin offers cli. my bad and my apologies, I've never been using virtualmin cli. Perhaps I should read docs about it ¯_(ツ)_/¯

Configuring/troubleshooting Debian servers is always great fun

Topic locked