jmginer

Well-Known Member
Jul 26, 2006
133
3
168
Alicante
cPanel Access Level
Root Administrator
Hello, seems cPanel has removed the "check all" button on the TTL upgrade interface.

It's impossible to go one by one by hand when we have many.

How we can do now?

Thanks!
 

jmginer

Well-Known Member
Jul 26, 2006
133
3
168
Alicante
cPanel Access Level
Root Administrator
@cPanelLauren

Here I have a server 11.68 and I can select the first record, press the key shift of the keyboard and when I select the last record, all the records of the list are selected.

In the new versions, with the checkbox it is no longer possible.

Imagine how frustrating it is to have to edit the TTL of 600 domains by hand, one by one... Do you understand that this is impossible?

Now imagine that you have the TTL of all your domains defined at 300 seconds and that you are receiving DNS attacks... An option to reduce the requests is to increase the TTL, but there are 600 domains... do you understand the problem?

I hope you understand that we need to get back this feature you removed... I guess by mistake.

Thanks!

Screenshot_40.png
 
Last edited:

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,945
753
263
Houston
cPanel Access Level
DataCenter Provider
I understand the frustration and can see the merit in being able to select multiple. I'd again suggest the feature request if you must do this through the UI but there are most certainly simple ways to achieve this using the CLI. For example you could potentially use replace to do this for all zone records in /var/named. I took a couple of minutes to get this together for you:

Make backups of your zone files:
Code:
cp -rpf /var/named /var/named.backup
use replace to change the TTL:

Code:
replace "300" "14400" -- /var/named/*.db
update the serial:

Code:
grep "Serial Number" /var/named/*.db | sed "s/://g" | cut -d/ -f4 | awk {'system("replace "$2" "strftime("%Y%m%d")"00 -- /var/named/"$1)'}
 
  • Like
Reactions: verdon

jmginer

Well-Known Member
Jul 26, 2006
133
3
168
Alicante
cPanel Access Level
Root Administrator
I'm sorry, but your proposal is not acceptable.

That command will break any DNS record that includes the string "300", for example a domain that is as300.net will be renamed to as14400.net

And that is assuming that all domains have the TTL at 300, if each domain has a different TTL...

I can't believe it... You eliminate a functionality and to put it back into operation you ask me to vote for a feature...

And all this, after raising the price of licenses ...

This is totally unacceptable.
 

LucasRolff

Well-Known Member
May 27, 2013
128
74
28
cPanel Access Level
Root Administrator
@jmginer,

You can use /usr/local/cpanel/bin/set_zone_ttl to bulk update TTL for either a list of domains, a user or all domains in your DNS cluster.

If you want to update TTL for all users on a given server, you can do something like:

Code:
for user in $(ls /var/cpanel/users); do /usr/local/cpanel/bin/set_zone_ttl --user $user --newttl 60; done
You can pass --force if you don't want to confirm for every account :)

Edit: I'm more curious why you still have a v68 box around that has a root exploitable exim installation :)
 
Last edited:
  • Like
Reactions: cPanelLauren

jmginer

Well-Known Member
Jul 26, 2006
133
3
168
Alicante
cPanel Access Level
Root Administrator
Thank you very much @LucasRolff !!!!

Obviously I don't have any v68 server in production, but I have a snapshot of a pre-configured template and I was able to restore it just to provide the screenshot of my second response in this thread.