I am currently adding dmarc records to all domains on our servers and have been following the suggestion in Update all zones with dmarc record

Now this seems to write the correct record to the dns

Now I know this is an old post but as im running thru adding dmarc records to my servers i noticed that the serialize bump

Code:
# find /var/named/*.db -mtime -1 -exec perl -pi -e 'if (/^\s+(\d{10})\s+;\s+serial/i) { my $i = $1+1; s/$1/$i/;}' '{}' \;
doesn't appear to work when running in a cluster because the moment i restart named and run a synchronize all records to all servers run the old dns from the other servers in the cluster overwrites the changes

has the serialize function changed or am i missing a step or something?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
doesn't appear to work when running in a cluster because the moment i restart named and run a synchronize all records to all servers run the old dns from the other servers in the cluster overwrites the changes
Hello @Steve Kemp,

It's likely the serial is not actually updated upon running that command. You can run the following command before/after that script is executed to see if the serial actually changes:

Code:
grep Serial /var/named/domain.tld.db
If it doesn't update, one workaround is to simply update the serial by changing the default TTL for all zones via WHM Home » DNS Functions » Set Zone Time To Live (TTL). Then, use the option one more time to change the TTL back to the original value. This has the effect of updating the serials for all zones.

Note that it's a good idea to backup your zones before making this type of change:

Code:
cp -a /var/named /var/named-backup
Thank you.