![]() |
|
Guide Own Nameservers on CyberPanel (PowerDNS): The 4 Steps the Panel Skips (Tested) - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CyberPanel (https://adminsforum.com/Forum-cyberpanel) +---- Forum: CyberPanel Guides & Tutorials (https://adminsforum.com/Forum-cyberpanel-guides-tutorials) +----- Forum: CyberPanel Domains, DNS & SSL Guides (https://adminsforum.com/Forum-cyberpanel-domains-dns-ssl-guides) +----- Thread: Guide Own Nameservers on CyberPanel (PowerDNS): The 4 Steps the Panel Skips (Tested) (/Thread-guide-own-nameservers-on-cyberpanel-powerdns-the-4-steps-the-panel-skips-tested) |
Own Nameservers on CyberPanel (PowerDNS): The 4 Steps the Panel Skips (Tested) - JAY - 10-28-2026 Own Nameservers on CyberPanel (PowerDNS): The 4 Steps the Panel Skips (Tested) CyberPanel comes with PowerDNS, so your server can answer DNS for your domains with your own Code: ns1Code: ns2Before you start: own nameservers mean that if this one server is down, your domains don't resolve at all, and email to them bounces after a while. Both "ns1" and "ns2" point to the same server here, which is what most single-server setups do; most registries accept that (a few, like .de, check for two different servers), but it's not real redundancy. Cloudflare or your registrar's DNS is the safer default. Do this if you need it: reseller branding, a panel that should manage DNS itself, or learning. What you need
Step 1: Open port 53 in the firewall PowerDNS was already running and listening on Code: 0.0.0.0:53CyberPanel's Firewall page lists DNS on port 53: But the real firewall, firewalld, had no rule for 53, and a query from a second server got Code: no servers could be reachedPowerDNS listens, but firewalld has no rule for 53: The panel's list and firewalld didn't match (firewalld also allowed ports the page didn't show). Check what's really open with Code: firewall-cmd --list-allCode: firewall-cmd --permanent --add-service=dns
firewall-cmd --reloadAfter that the external query answered. Step 2: Create the nameserver names (Create Nameserver) DNS > Create Nameserver: a domain, two names and the server IP for each. Create Nameserver, filled in: Trap: "Domain Name" must be a DNS zone that already exists on the server. We first entered Code: cyber.adminslab.comCode: Domains matching query does not existCode: adminslab.comAll this page does is add two A records ( Code: ns1...Code: ns2...The result: two A records in that zone: It doesn't register anything at your registrar and it doesn't add NS records to any domain. Step 3: Make the names resolve on the internet (glue) The rest of the world has to find Code: ns1Code: ns2
Step 4: Default Nameservers, and the NS records it didn't add DNS > Default Nameservers: enter ns1 and ns2. CyberPanel saves them in Code: /home/cyberpanel/defaultNameserversDefault Nameservers: Then we created a new zone in DNS > Create DNS Zone. It got exactly one record, an SOA, and no NS records and no A record: Code: dns-lab.adminslab.com SOA ns1.dns-lab.adminslab.com hostmaster.dns-lab.adminslab.com 1 10800 3600 1209600 3600Code: adminslab.comCode: ns1...Code: ns2...Second trap: type the TTL. The TTL box shows "3600", but that's only a grey hint, the field is empty. Click Add NS Record like that and nothing happens: no record, no error. The browser's request came back with Code: 'ttl'Code: 3600NS records added by hand (with the TTL typed in): (The SOA record isn't in this list; it's on the SOA tab. Its first field was Code: ns1.<zone>Step 5: Point the domain to your nameservers At the registrar of the domain you're moving, set the nameservers to Code: ns1...Code: ns2...Code: pdns-labCode: ns1.cyber.adminslab.comCode: ns2.cyber.adminslab.comStep 6: Test it from outside Ask public resolvers, not the server itself: Code: dig +short NS pdns-lab.adminslab.com @1.1.1.1
dig +short pdns-lab.adminslab.com @8.8.8.8
dig pdns-lab.adminslab.com @YOUR-SERVER-IP +norec
dig google.com @YOUR-SERVER-IP
After the move: deleted websites leave their DNS records behind When CyberPanel creates a website and the server does DNS for it, it adds an A record, an MX record and an SPF TXT record for it. When you delete the website, they stay. We had deleted three test sites; all nine records were still in the zone, and PowerDNS still answered them: Websites deleted, DNS records still there: With your own nameservers that's live DNS: a deleted site's name still points to your server, and its old SPF record still says your server may send mail for it. After you delete a website, remove its records in Add/Delete Records, or delete the whole zone in DNS > Delete Zone if the domain is gone. Checklist
More CyberPanel guides
|