January 3

Round-robin DNS for cPanel DNS only:

first, we need to create the custom template:
nano /var/cpanel/zonetemplates/root_standard
content:
; cPanel %cpversion%
; Zone file for %domain%
$TTL %ttl%
@ %nsttl% IN SOA %nameserver%. %rpemail%. (
%serial% ; serial, todays date+todays
3600 ; refresh, seconds
1800 ; retry, seconds
1209600 ; expire, seconds
86400 ) ; minimum, seconds

%domain%. %nsttl% IN NS %nameserver%.
%domain%. %nsttl% IN NS %nameserver2%.
%domain%. %nsttl% IN NS %nameserver3%.
%domain%. %nsttl% IN NS %nameserver4%.

%nameserverentry%. IN A %nameservera%
%nameserverentry2%. IN A %nameservera2%
%nameserverentry3%. IN A %nameservera3%
%nameserverentry4%. IN A %nameservera4%

%domain%. IN A 2.2.2.2
%domain%. IN A 3.3.3.3

www IN CNAME %domain%.

Then we can add the new domain from the command line:
whmapi1 adddns domain='test3.com' ip='1.1.1.1'


Copyright 2021. All rights reserved.

Posted 3 January 2022 by admin in category "simple memo

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.