• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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