• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Changing TTL on domains globally

H

hakkrdan

Guest
Hi -

I was wondering if there was a utility already in existance to change the TTL on all domains hosted by Plesk.

I'd like to do some DNS hackery, and I want to close the window of error by doing this. Once the machine is re-IP'd, I'll go ahead and reset the TTLs to their originals.

Thanks!
-dant
 
Hi -

Er, the reason I ask here, is because I'm not sure how closely Plesk's DB ties into BIND's configuration - if Plesk writes conf files for BIND/named based on values stored in a database.

Sure, I can always run some scripts against /var/named/run-root/var/* and change $TTL, but I was thinking there was a more elegant way.

Thanks!
-dant
 
I am sure that you have figured it out since this is an old post but for those who are trying to find the answer to this, here it is:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

INSERT INTO misc VALUES ('SOA_TTL','300');

quit

This will log you into MySQL as admin and the next command will set the TTL to 300 seconds or five minutes. Note that this will only change the TTLs on new domains. In order to change the TTLs for existing domains, you will need to also run the following from the command line:

mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' | awk '{print "/usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh

I have tested this and it works like a charm!
 
Works like a charm..

Thank you for not making me have to think :)

-Sean
 
Back
Top