standardvirtualftp ignoring IPv6 records
Hi guys,
my standardvirtualftp
DNS zone template is not expanding %ipv6%
when creating new accounts. This results in missing AAAA and SPF records, even though the template includes them.
What I have done is:
- Verified that IPv6 is correctly set in WHM → Basic WebHost Manager Setup
- Compared with another WHM server (same template), where AAAA and SPF records are created successfully.
- Checked
/usr/local/cpanel/etc/zonetemplates/standardvirtualftp
, and the template is being read (custom CNAME records apply). - Ran
whmapi1 getzonetemplate name=standardvirtualftp
, but WHM 124.0.30 does not recognize this API call. - Checked
/usr/local/cpanel/logs/error_log
, which shows:
[xml-api] Unknown app (“getzonetemplate”) requested for this version (1) of the API.
Here is the file:
; 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 %ip% (this works)
%domain%. IN AAAA %ipv6% (this doesn't work)
;MX record (mail.domain.com) (this works)
%domain%. IN MX 0 mail.%domain%.
; Custom A and AAAA for mail domain
mail IN A %ip% (this works)
mail IN AAAA %ipv6% (this doesn't work)
; mail IN CNAME %maildomain%. (use only if A and AAAA are deleted)
www IN CNAME %domain%.
ftp IN A %ftpip%
ftp IN AAAA %ipv6%
; Custom AAAA records (these don't work)
autodiscover IN AAAA %ipv6%
autoconfig IN AAAA %ipv6%
webdisk IN AAAA %ipv6%
webmail IN AAAA %ipv6%
cpcontacts IN AAAA %ipv6%
cpcalendars IN AAAA %ipv6%
ipv6.%domain%. IN AAAA %ipv6%
; Custom SPF record (this doesn't work)
%domain%. IN TXT "v=spf1 a mx ip4:%ip% ip6:%ipv6% -all"
; Custom DMARC record (this works)
_dmarc IN TXT "v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc@%domain%; adkim=s; aspf=s;"
; Custom DNS records for SMTP relay (these work)
mycustom1 IN CNAME return.domain.com.
mycustom1._domainkey IN CNAME dkim.domain.com.
mycustom2 IN CNAME domain.com.
WHM/cPanel version: 124.0.30
OS: AlmaLinux v9.5.0
It looks like %ipv6%
expansion is broken or ignored in WHM 124.0.30. Has anyone else encountered this? Is there a new way to handle IPv6 in DNS zone templates, or is this a bug?
Help the lad out, please! 😅
-
Hey there! I think there's a few different issues here, but let's start with that API call. Can you let me know where you found that? I know there is a Perl module that cPanel uses named "
getzonetemplate
" but this thread is the only results on Google for "cPanel APIgetzonetemplate
" - we don't have that specific API call listed anywhere in our documentation. That's why the error is "unknown app" in the cPanel logs.I'm still looking into the ipv6 template issue on my end.
0 -
I think I know what's happening with this, but I'm not going to get an official answer until Monday. I'll revisit this then and I'll post back once I have more details.
1 -
Alright, let me tell you what I know, and then you can decide if that is what is expected as an end user and we can go from there!
The first and most important thing, is that from my testing there is no way to get a new cPanel account to use IPv6. This isn't an issue with the template, but it's just the way that cPanel is setup. In order to get a cPanel account to use IPv6 you create the account and then use the "Assign IPv6 Address" interface in WHM to assign that to the account. Once that happens, the records get added to the existing DNS zone.
Once an individual cPanel account has IPv6 enabled, all addons and parked domains under the account will get them automatically from the data in the "standard" zone template, including records that were customized in the zone. Here is a search of an addon domain that I created after enabling IPv6 on the parent account, and you'll see it includes my "custom" entry in the "standard" zone template:
# grep AAAA /var/named/addontest2.com.db
addontest2.com. 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
ipv6 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
custom 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
webmail 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
cpanel 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
autoconfig 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
cpcalendars 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
whm 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
autodiscover 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
cpcontacts 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68da
webdisk 14400 IN AAAA 2620:0:28a4:4040:f816:3eff:fe30:68daSo that leaves me with two thoughts:
1 - does that help your process or understanding at all
and
2 - do you think this should be changed in any way to make things easier?Let me know and we can go from there.
1 -
Aah, I understand now why some records failed to be added automatically from the template upon DNS zone creation, my SPF had mixed IPv4 and IPv6 and failed to be created, makes perfect sense.
To answer you question Rex:
1. Yes, completely
2. Honestly I don't know, if no harm done I don't see why not apply it automatically for those servers that have IPv6 assigned. Still, there could be an obvious reason why this is not the case currently which I'm not aware of, so I'd say simply add an option to also use IPv6 upon DNS zone/account creation and add a setting to automate it for all future accounts.
I didn't even no that there is the setting "Assign IPv6 Address" to be honest.
Thanks for this Rex, like always!0 -
You're very welcome! At this time I don't think they want to make any global changes to the IPv6 behavior, so as long as you're good, I'm good :D
0
Please sign in to leave a comment.
Comments
5 comments