Catch-all DNS zone in cPanel

jmginer

Well-Known Member
Jul 26, 2006
150
4
168
Alicante
cPanel Access Level
Root Administrator
Hello, I want to configure my Named as a catch-all,
This is to redirect domains that do not have a DNS zone to a parking page,
like this: Wildcard DNS zone in bind – ServerOK

Code:
zone "." IN {
        type master;
        file "/var/named/catch-all.zone";
};
I thought about doing it with an include:

Code:
include "/etc/named/catch-all.conf";
But in which file can I add it having the security that cPanel will not overwrite it after an update and that it does not conflict with other configurations?

Thanks!
 
Last edited by a moderator:

jmginer

Well-Known Member
Jul 26, 2006
150
4
168
Alicante
cPanel Access Level
Root Administrator
Hey there! The easiest way would be to just use the WHM >> Add a DNS Zone to create a zone that isn't associated with a specific cPanel account. That zone will just be owned by the root user directly.
Hello, unfortunately that's not an option, since I don't know what the domains are.

The purpose of a DNS catch-all is to have a parking page (A record) for domains that have been created with our DNS and do not yet have a DNS zone created.

Check this link: Wildcard DNS zone in bind – ServerOK
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,491
1,008
313
cPanel Access Level
Root Administrator
I guess I don't understand why creating a zone wouldn't work? In the link you provided, you still have to create the zone file, and I was able to create a zone with "catch-all.zone" with no issues on a test machine. Can you try that?
 

jmginer

Well-Known Member
Jul 26, 2006
150
4
168
Alicante
cPanel Access Level
Root Administrator
I don't disagree, but that was the domain provided in the instructions you sent, and I just confirmed that creating it worked properly. Were you not able to create that zone?
You know what is a catch-all dns zone?
Please, re-read my first post.

It's possible to create a catch-all dns zone in cPanel?

Thanks!