1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Changing TTL on domains globally

Discussion in 'Plesk for Linux - 8.x and Older' started by hakkrdan, Mar 25, 2006.

  1. hakkrdan

    hakkrdan Guest

    0
     
    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
     
  2. hakkrdan

    hakkrdan Guest

    0
     
    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
     
  3. rpawlik

    rpawlik Guest

    0
     
    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!
     
  4. shortcut

    shortcut Guest

    0
     
    Works like a charm..

    Thank you for not making me have to think :)

    -Sean
     
Loading...