Skip to content

DNS Infrastructure

Comprehensive documentation of MDHosting Ltd's DNS infrastructure, zone management procedures, and PowerDNS migration planning.

Overview

MDHosting operates authoritative DNS servers providing name resolution services for all hosted domains. DNS is a critical component of the infrastructure, handling domain-to-IP mapping for websites and email services.

Current DNS Infrastructure: - Nameservers: ns1.mdhosting.co.uk, ns2.mdhosting.co.uk - DNS Software: cPanel DNS (BIND-based) - Servers: CX22 instances at Hetzner Germany - Architecture: Master-Slave configuration - Managed Zones: ~30 client domains + MDHosting infrastructure - Future Platform: PowerDNS (migration planned with ApisCP)

Key Features: - Redundancy: Dual nameserver setup for high availability - Geographic Distribution: Both servers in Hetzner Germany (same datacenter) - Automated Management: Zone creation via cPanel/WHM integration - DNSSEC Ready: PowerDNS migration will enable DNSSEC support

Current DNS Architecture

DNS Server Configuration

graph TB
    subgraph "Current DNS Infrastructure - cPanel/BIND"
        NS1[ns1.mdhosting.co.uk<br/>CX22 - Primary DNS<br/>4GB RAM, 2 vCPU<br/>Hetzner Germany]
        NS2[ns2.mdhosting.co.uk<br/>CX22 - Secondary DNS<br/>4GB RAM, 2 vCPU<br/>Hetzner Germany]

        EU1[eu1.cp<br/>CPX31 Hosting Server<br/>Zone Master Source]
    end

    subgraph "DNS Clients"
        CLIENT[Client Resolvers<br/>Worldwide]
    end

    CLIENT -->|Query ns1| NS1
    CLIENT -->|Query ns2| NS2

    EU1 -.->|cPanel DNS Cluster| NS1
    EU1 -.->|cPanel DNS Cluster| NS2

    NS1 <-->|Synchronisation| NS2

    classDef dns fill:#3498db,stroke:#2c3e50,stroke-width:2px,color:#fff
    classDef source fill:#f39c12,stroke:#2c3e50,stroke-width:2px,color:#fff
    classDef client fill:#95a5a6,stroke:#2c3e50,stroke-width:2px,color:#fff

    class NS1,NS2 dns
    class EU1 source
    class CLIENT client

DNS Query Distribution: - Most resolvers query ns1 (primary) - ns2 provides fallback and load distribution - Both nameservers serve identical zone data

DNS Server Specifications

ns1.mdhosting.co.uk: - Server Type: Hetzner CX22 - Location: Hetzner Germany - CPU: 2 vCPU (AMD EPYC) - RAM: 4 GB - Storage: 40 GB NVMe SSD - Bandwidth: 20 TB/month - IPv4: [NS1_IP_ADDRESS] - Operating System: AlmaLinux 8 - DNS Software: cPanel DNS (BIND) - Cost: £5.50/month (€6.30)

ns2.mdhosting.co.uk: - Server Type: Hetzner CX22 - Location: Hetzner Germany - CPU: 2 vCPU (AMD EPYC) - RAM: 4 GB - Storage: 40 GB NVMe SSD - Bandwidth: 20 TB/month - IPv4: [NS2_IP_ADDRESS] - Operating System: AlmaLinux 8 - DNS Software: cPanel DNS (BIND) - Cost: £5.50/month (€6.30)

Combined DNS Infrastructure Cost: £11/month (€12.60)

cPanel DNS Cluster Configuration

DNS Cluster Overview: - Master: eu1.cp (hosting server) - Slaves: ns1, ns2 (dedicated DNS servers) - Synchronization Method: cPanel DNS Cluster (via HTTPS API) - Update Propagation: Near-instant (within seconds)

How it Works: 1. DNS zone created/modified on eu1.cp (via cPanel/WHM) 2. cPanel DNS cluster automatically pushes update to ns1 and ns2 3. Changes take effect immediately on both nameservers 4. Client resolvers honour TTL for cache expiry

Configuration Path (WHM): - WHM → Clusters → DNS Cluster - Configured nodes: ns1.mdhosting.co.uk, ns2.mdhosting.co.uk - Authentication: cPanel API tokens - Synchronization: Automatic

DNS Zone Structure

Standard Zone Configuration (Example: clientdomain.com):

$TTL 14400
@       IN      SOA     ns1.mdhosting.co.uk. admin.mdhosting.co.uk. (
                        2026010901 ; Serial (YYYYMMDDNN)
                        86400      ; Refresh (24 hours)
                        7200       ; Retry (2 hours)
                        3600000    ; Expire (1000 hours)
                        86400 )    ; Minimum TTL (24 hours)

; Nameserver Records
@       IN      NS      ns1.mdhosting.co.uk.
@       IN      NS      ns2.mdhosting.co.uk.

; A Records
@       IN      A       [EU1_IP_ADDRESS]
www     IN      A       [EU1_IP_ADDRESS]
mail    IN      A       [EU1_IP_ADDRESS]
ftp     IN      A       [EU1_IP_ADDRESS]

; CNAME Records
webmail IN      CNAME   clientdomain.com.
cpanel  IN      CNAME   clientdomain.com.

; MX Records
@       IN      MX      0 mail.clientdomain.com.

; TXT Records (SPF, DKIM, DMARC)
@       IN      TXT     "v=spf1 a mx ip4:[EU1_IP_ADDRESS] ~all"
default._domainkey IN TXT "v=DKIM1; k=rsa; p=[DKIM_PUBLIC_KEY]"
_dmarc  IN      TXT     "v=DMARC1; p=none; rua=mailto:admin@clientdomain.com"

Common Record Types: - SOA: Start of Authority (zone metadata) - NS: Nameserver records (ns1, ns2) - A: IPv4 address records - AAAA: IPv6 address records (future) - CNAME: Canonical name aliases - MX: Mail exchange records - TXT: Text records (SPF, DKIM, DMARC, verification) - SRV: Service records (rarely used)

DNS Management Procedures

Creating a New DNS Zone

Via WHM (Automatic with Account Creation):

When creating a new cPanel account, DNS zone is created automatically with default records.

  1. Log in to WHM at https://eu1.mdhosting.co.uk:2087
  2. Navigate to Account Functions → Create a New Account
  3. Enter domain name (e.g., newdomain.com)
  4. Complete account creation
  5. DNS zone automatically:
  6. Created on eu1.cp
  7. Synced to ns1 and ns2
  8. Populated with default records (A, MX, TXT)

Manual DNS Zone Creation:

  1. Log in to WHM
  2. Navigate to DNS Functions → Add a DNS Zone
  3. Enter domain name: newdomain.com
  4. Enter IP address: [EU1_IP_ADDRESS]
  5. Click Add Zone
  6. Zone syncs automatically to ns1 and ns2

Editing DNS Records

Via cPanel (Client Access):

  1. Log in to cPanel (account holder)
  2. Navigate to Domains → Zone Editor
  3. Select domain to edit
  4. Add Record:
  5. Click Add Record (A, CNAME, MX, TXT)
  6. Enter record details
  7. Click Add Record
  8. Edit Record:
  9. Click Edit next to existing record
  10. Modify values
  11. Click Edit Record
  12. Delete Record:
  13. Click Delete next to record
  14. Confirm deletion

Via WHM (Administrator Access):

  1. Log in to WHM
  2. Navigate to DNS Functions → Edit DNS Zone
  3. Select domain from dropdown
  4. Edit zone file directly or use graphical editor
  5. Save changes
  6. Changes sync automatically to ns1 and ns2

Important DNS Records to Configure:

SPF Record (Email Authentication):

Type: TXT
Name: @ (or domain.com)
Value: v=spf1 a mx ip4:[EU1_IP_ADDRESS] ~all
TTL: 14400

DKIM Record (Email Signing): - Enable via cPanel → Email → Email Deliverability - DKIM record automatically added to DNS zone - Verify DNS propagation after enabling

DMARC Record (Email Policy):

Type: TXT
Name: _dmarc
Value: v=DMARC1; p=none; rua=mailto:admin@clientdomain.com
TTL: 14400

DNS Propagation

Propagation Timeline: - Zone Creation: Immediate on ns1/ns2 - Record Updates: Immediate on ns1/ns2 - Client Cache Expiry: Varies by TTL (typically 4-24 hours) - Global Propagation: 4-48 hours (depends on resolver TTL caching)

Checking DNS Propagation:

Via Command Line:

# Query ns1 directly
dig @ns1.mdhosting.co.uk clientdomain.com A

# Query ns2 directly
dig @ns2.mdhosting.co.uk clientdomain.com A

# Query public resolvers
dig @8.8.8.8 clientdomain.com A
dig @1.1.1.1 clientdomain.com A

# Check MX records
dig clientdomain.com MX +short

# Check TXT records (SPF)
dig clientdomain.com TXT +short

# Check nameservers
dig clientdomain.com NS +short

Via Online Tools: - WhatIsMyDNS.net - Global DNS propagation checker - DNSChecker.org - Multi-location DNS checker - MXToolbox.com - MX and email DNS verification

Common Propagation Issues: 1. Old DNS cached: Wait for TTL expiry 2. Nameservers not updated at registrar: Update NS records at domain registrar 3. Zone not syncing: Check cPanel DNS cluster status in WHM 4. Typo in records: Verify record syntax

DNS Zone Transfers (AXFR/IXFR)

Current Configuration: - Zone Transfer Method: cPanel DNS cluster (proprietary, HTTPS-based) - AXFR Support: Not exposed publicly (security) - IXFR Support: Not used in current setup

Future with PowerDNS: - AXFR: Full zone transfer from master to slaves - IXFR: Incremental zone transfer (only changed records) - TSIG: Transaction signatures for secure transfers - NOTIFY: Automatic slave notification on zone changes

DNSSEC Support

Current Status: Not Implemented - cPanel DNS does not have production-ready DNSSEC support - Requires manual BIND configuration (high complexity) - Not practical for multi-domain environment

Future with PowerDNS: - Native DNSSEC support - Automated key management - Key signing key (KSK) and zone signing key (ZSK) generation - DS record management for registrar updates - Automatic key rotation

DNSSEC Benefits: - Protection against DNS cache poisoning - Verification of DNS response authenticity - Enhanced security for email (DANE) - Increased client trust

Implementation Timeline: - Phase 1 (Q2 2026): PowerDNS migration - Phase 2 (Q3 2026): DNSSEC enablement for MDHosting domains - Phase 3 (Q4 2026): DNSSEC enablement for client domains (optional)

DNS Monitoring and Troubleshooting

Monitoring DNS Health

Daily Checks:

# Check DNS service status on ns1
ssh ns1.mdhosting.co.uk
systemctl status named

# Check DNS service status on ns2
ssh ns2.mdhosting.co.uk
systemctl status named

# Query sample domains
dig @ns1.mdhosting.co.uk mdhosting.co.uk A
dig @ns2.mdhosting.co.uk mdhosting.co.uk A

# Check DNS query statistics
rndc stats
cat /var/named/data/named_stats.txt | tail -50

WHM DNS Cluster Monitoring: 1. Log in to WHM on eu1.cp 2. Navigate to Clusters → DNS Cluster 3. Verify both ns1 and ns2 show "Synchronized" 4. Check for sync errors or warnings

DNS Query Monitoring: - Monitor query volume via BIND statistics - Alert on query rate spikes (potential DDoS) - Monitor for SERVFAIL responses - Track zone transfer success/failure

Common DNS Issues

Issue 1: DNS Not Resolving

Symptoms: - Domain not resolving to IP address - "Server not found" errors - Email delivery failures

Troubleshooting:

# Check if nameservers respond
dig @ns1.mdhosting.co.uk clientdomain.com A
dig @ns2.mdhosting.co.uk clientdomain.com A

# Check nameserver delegation
dig clientdomain.com NS +trace

# Check if zone exists
ssh ns1.mdhosting.co.uk
named-checkzone clientdomain.com /var/named/clientdomain.com.db

Resolution: 1. Verify zone exists on ns1/ns2 2. Check nameservers set correctly at registrar 3. Verify DNS sync from cPanel cluster 4. Check for zone file syntax errors

Issue 2: DNS Changes Not Propagating

Symptoms: - DNS changes made but not visible - Old IP addresses still resolving

Troubleshooting:

# Query authoritative nameservers directly
dig @ns1.mdhosting.co.uk clientdomain.com A
dig @ns2.mdhosting.co.uk clientdomain.com A

# Check public resolvers (cached)
dig @8.8.8.8 clientdomain.com A

# Check TTL
dig clientdomain.com A | grep "^clientdomain.com" | awk '{print $2}'

Resolution: 1. Verify changes saved in cPanel/WHM 2. Check cPanel DNS cluster sync status 3. Wait for TTL expiry (typically 4 hours) 4. Flush local DNS cache on client machine 5. Use online DNS checkers to monitor propagation

Issue 3: Email Not Receiving (MX Records)

Symptoms: - Email bounce messages - "No MX record found" errors

Troubleshooting:

# Check MX records
dig clientdomain.com MX +short

# Verify mail server resolves
dig mail.clientdomain.com A +short

# Test SMTP connectivity
telnet mail.clientdomain.com 25

Resolution: 1. Verify MX record exists and points correctly 2. Ensure mail.clientdomain.com A record exists 3. Check SPF record includes mail server 4. Verify firewall allows port 25 5. Test email delivery from external service

Issue 4: DNS Server Down

Symptoms: - All domains not resolving - DNS service not responding - High query failure rate

Immediate Actions:

# SSH to affected server
ssh ns1.mdhosting.co.uk

# Check DNS service
systemctl status named

# Restart if needed
systemctl restart named

# Check logs for errors
journalctl -u named -n 100 --no-pager

# Verify listening on port 53
ss -tulpn | grep :53

Escalation: - If restart fails, check disk space and memory - Review BIND error logs - Check for firewall blocks (CSF) - Failover relies on ns2 (redundancy) - Contact Hetzner if hardware issue

DNS Performance Optimization

Current Performance: - Query Response Time: <20ms (local queries) - Query Response Time: 50-150ms (international queries) - Uptime: 99.9%+ target

Optimization Strategies:

1. TTL Tuning: - Standard TTL: 14400 seconds (4 hours) - Lower TTL before DNS changes: 300 seconds (5 minutes) - Increase TTL for stable zones: 86400 seconds (24 hours)

2. Query Rate Limiting:

# Configure rate limiting in BIND (future)
rate-limit {
    responses-per-second 20;
    window 5;
};

3. Caching: - Recursive queries disabled (authoritative only) - No caching required on authoritative servers

4. Geographic Distribution: - Current: Both servers in Germany - Future consideration: Add anycast DNS or third location (UK/US)

PowerDNS Migration Planning

Migration Overview

Current Platform: cPanel DNS (BIND-based) Target Platform: PowerDNS Authoritative Server Migration Timeline: Q2 2026 (aligned with ApisCP migration) Estimated Duration: 2-3 weeks Risk Level: Medium (comprehensive testing planned)

Why PowerDNS?

Advantages over cPanel DNS: - Native ApisCP Integration: Seamless control panel integration - DNSSEC Support: Production-ready DNSSEC implementation - API-Driven: RESTful API for automation - Modern Features: IXFR, NOTIFY, TSIG, DANE - Better Performance: Optimized for high query volumes - No Licensing Dependency: Eliminates cPanel DNS requirement - Hidden Master Support: Enhanced security architecture

Technical Improvements: - SQL backend (MySQL/MariaDB) for zone storage - Incremental zone transfers (IXFR) reduce bandwidth - TSIG authentication for secure zone transfers - Native DNSSEC key management and signing - Better logging and monitoring capabilities

Planned PowerDNS Architecture

graph TB
    subgraph "Future PowerDNS Infrastructure (Q2 2026)"
        HM[Hidden Master<br/>PowerDNS Authoritative<br/>ApisCP-Integrated<br/>Not Public]

        NS1P[ns1.mdhosting.co.uk<br/>PowerDNS Authoritative<br/>Public Slave<br/>CX22 Server]

        NS2P[ns2.mdhosting.co.uk<br/>PowerDNS Authoritative<br/>Public Slave<br/>CX22 Server]
    end

    subgraph "Management"
        APISCP[ApisCP Control Panel<br/>PowerDNS API Integration]
    end

    subgraph "Clients"
        CLIENT[DNS Resolvers<br/>Worldwide]
    end

    APISCP -->|Zone Management<br/>PowerDNS API| HM

    HM -->|AXFR/IXFR + NOTIFY<br/>TSIG Authenticated| NS1P
    HM -->|AXFR/IXFR + NOTIFY<br/>TSIG Authenticated| NS2P

    CLIENT -->|DNS Queries| NS1P
    CLIENT -->|DNS Queries| NS2P

    NS1P -.->|NOTIFY| HM
    NS2P -.->|NOTIFY| HM

    classDef master fill:#e74c3c,stroke:#2c3e50,stroke-width:2px,color:#fff
    classDef slave fill:#3498db,stroke:#2c3e50,stroke-width:2px,color:#fff
    classDef mgmt fill:#8e44ad,stroke:#2c3e50,stroke-width:2px,color:#fff
    classDef client fill:#95a5a6,stroke:#2c3e50,stroke-width:2px,color:#fff

    class HM master
    class NS1P,NS2P slave
    class APISCP mgmt
    class CLIENT client

Hidden Master Architecture: - Hidden Master: Not listed in public NS records - Public Slaves: ns1 and ns2 serve queries - Security: Hidden master not exposed to internet attacks - Flexibility: Change master location without client impact

Migration Phases

Phase 1: Hidden Master Deployment (Week 1)

  1. Deploy PowerDNS on Hidden Master:

    # Install PowerDNS (on hidden master server)
    dnf install pdns pdns-backend-mysql
    
    # Configure MySQL backend
    mysql -e "CREATE DATABASE powerdns;"
    mysql powerdns < /usr/share/doc/pdns/schema.mysql.sql
    
    # Configure PowerDNS
    vim /etc/pdns/pdns.conf
    

  2. Configure PowerDNS Master:

    # /etc/pdns/pdns.conf
    launch=gmysql
    gmysql-host=localhost
    gmysql-user=powerdns
    gmysql-password=[SECURE_PASSWORD]
    gmysql-dbname=powerdns
    
    master=yes
    slave=no
    
    api=yes
    api-key=[SECURE_API_KEY]
    webserver=yes
    webserver-address=127.0.0.1
    webserver-port=8081
    
    default-ttl=14400
    soa-minimum-ttl=3600
    

  3. ApisCP PowerDNS Integration:

  4. Configure ApisCP DNS module for PowerDNS
  5. Set API endpoint and authentication
  6. Test zone creation and updates

Phase 2: Slave Server Configuration (Week 1-2)

  1. Install PowerDNS on ns1 and ns2:

    # On both ns1 and ns2
    dnf install pdns pdns-backend-mysql
    
    # Configure as slave
    vim /etc/pdns/pdns.conf
    

  2. Configure PowerDNS Slaves:

    # /etc/pdns/pdns.conf (ns1 and ns2)
    launch=gmysql
    gmysql-host=localhost
    gmysql-user=powerdns
    gmysql-password=[SECURE_PASSWORD]
    gmysql-dbname=powerdns
    
    master=no
    slave=yes
    slave-cycle-interval=60
    
    webserver=yes
    webserver-address=127.0.0.1
    webserver-port=8081
    

  3. Configure TSIG Keys for Secure Transfers:

    # Generate TSIG key
    pdnsutil generate-tsig-key ns1-key hmac-sha256
    
    # Add to PowerDNS database (master and slaves)
    pdnsutil import-tsig-key ns1-key hmac-sha256 [KEY_VALUE]
    

  4. Configure Zone Transfer ACLs:

  5. Allow zone transfers only from hidden master IP
  6. Require TSIG authentication
  7. Block all other transfer attempts

Phase 3: Zone Migration (Week 2)

  1. Export Zones from cPanel:

    # Export all zones from cPanel
    for zone in $(cat /etc/trueuserdomains | cut -d: -f1); do
        dig @ns1.mdhosting.co.uk $zone AXFR > /tmp/zones/$zone.zone
    done
    

  2. Import Zones to PowerDNS:

    # Import zones to PowerDNS master
    for zonefile in /tmp/zones/*.zone; do
        zone=$(basename $zonefile .zone)
        pdnsutil load-zone $zone $zonefile
    done
    

  3. Verify Zone Data:

    # Check zone loaded correctly
    pdnsutil list-all-zones
    
    # Query PowerDNS directly
    dig @[HIDDEN_MASTER_IP] clientdomain.com A
    
    # Verify SOA records correct
    pdnsutil check-zone clientdomain.com
    

  4. Test Zone Transfers:

    # Trigger zone transfer to slaves
    pdnsutil increase-serial clientdomain.com
    
    # Verify on ns1
    dig @ns1.mdhosting.co.uk clientdomain.com A
    
    # Verify on ns2
    dig @ns2.mdhosting.co.uk clientdomain.com A
    

Phase 4: Parallel Operation (Week 2-3)

  1. Run Dual DNS (cPanel + PowerDNS):
  2. cPanel DNS remains authoritative (ns1/ns2 still using BIND)
  3. PowerDNS operates in parallel (different test domains)
  4. Monitor both systems for comparison

  5. Testing Checklist:

  6. All zones present in PowerDNS
  7. Records match cPanel DNS exactly
  8. Zone transfers working (master → slaves)
  9. NOTIFY triggers immediate slave updates
  10. ApisCP zone management functional
  11. TTL values preserved
  12. SOA serial numbers incrementing correctly
  13. TSIG authentication working

  14. Performance Testing:

  15. Query response time comparison
  16. Zone transfer speed (AXFR vs IXFR)
  17. Load testing (simulate high query rate)

Phase 5: Cutover (Week 3)

  1. Final Preparation:
  2. Lower TTL on all zones (4 hours → 5 minutes)
  3. Wait 24 hours for cache expiry
  4. Schedule maintenance window

  5. Cutover Steps:

    # On ns1 and ns2
    # Stop BIND/cPanel DNS
    systemctl stop named
    
    # Start PowerDNS
    systemctl start pdns
    systemctl enable pdns
    
    # Verify PowerDNS responding
    dig @ns1.mdhosting.co.uk mdhosting.co.uk A
    dig @ns2.mdhosting.co.uk mdhosting.co.uk A
    

  6. Verification:

  7. Query all critical domains
  8. Check email delivery (MX records)
  9. Monitor query logs for errors
  10. Check cPanel/ApisCP zone management

  11. Rollback Plan (if needed):

    # If issues arise, rollback to cPanel DNS
    systemctl stop pdns
    systemctl start named
    

  12. Post-Cutover:

  13. Monitor for 48-72 hours
  14. Restore TTL to normal (5 minutes → 4 hours)
  15. Decommission cPanel DNS cluster
  16. Update internal documentation

Phase 6: DNSSEC Enablement (Future - Q3 2026)

  1. Enable DNSSEC for MDHosting Domains:

    # Enable DNSSEC for zone
    pdnsutil secure-zone mdhosting.co.uk
    
    # Generate keys (KSK and ZSK)
    pdnsutil add-zone-key mdhosting.co.uk ksk active
    pdnsutil add-zone-key mdhosting.co.uk zsk active
    
    # Get DS records for registrar
    pdnsutil show-zone mdhosting.co.uk
    

  2. Update Registrar DS Records:

  3. Log in to domain registrar (internet.bs)
  4. Add DS records from PowerDNS
  5. Wait for DS propagation (24-48 hours)

  6. Verify DNSSEC:

    # Check DNSSEC validation
    dig mdhosting.co.uk +dnssec
    
    # Verify chain of trust
    delv mdhosting.co.uk
    

  7. Client Domain DNSSEC (Optional):

  8. Offer DNSSEC as premium feature
  9. Client requests DNSSEC enablement
  10. Provide DS records for their registrar
  11. Enable monitoring for DNSSEC validation failures

Migration Risks and Mitigation

Risk 1: DNS Resolution Failures - Likelihood: Low - Impact: High (complete service outage) - Mitigation: - Comprehensive pre-cutover testing - Parallel operation phase (validate before cutover) - Immediate rollback plan prepared - Maintenance window during low-traffic period

Risk 2: Zone Data Loss/Corruption - Likelihood: Low - Impact: High - Mitigation: - Multiple backups of zone files before migration - Automated zone comparison scripts - Manual verification of critical domains - Retain cPanel DNS configuration for 30 days post-migration

Risk 3: Email Delivery Disruption - Likelihood: Medium - Impact: Medium - Mitigation: - Verify MX records in PowerDNS match cPanel - Test email send/receive before cutover - Monitor email queue during/after migration - Lower TTL before cutover to reduce cache issues

Risk 4: Performance Degradation - Likelihood: Low - Impact: Medium - Mitigation: - Performance testing during parallel phase - Monitor query response times - Tune PowerDNS configuration if needed - CX22 servers adequate for query volume

Risk 5: Client Management Interface Issues - Likelihood: Medium - Impact: Medium - Mitigation: - Test ApisCP DNS management thoroughly - Document new procedures for clients - Provide fallback WHM access if needed - Staff training on PowerDNS/ApisCP integration

Post-Migration Benefits

Operational Improvements: - Reduced cPanel licensing dependency (DNS decoupled) - Modern API for automation and integration - Better monitoring and logging capabilities - DNSSEC support for enhanced security

Security Improvements: - Hidden master architecture (reduced attack surface) - TSIG authentication for zone transfers - DNSSEC protection against cache poisoning - Better access control and audit logging

Cost Benefits: - No additional costs (same CX22 servers) - Potential savings from reduced cPanel license tier - Reduced operational overhead (simpler architecture)

Performance Benefits: - Faster zone transfers (IXFR vs AXFR) - Optimized query handling - Better support for high query volumes - Lower latency with tuned configuration

DNS Best Practices

Zone Management

1. Always Use TTL Wisely: - Stable Records: 86400 seconds (24 hours) - Standard Records: 14400 seconds (4 hours) - Pre-Change: 300 seconds (5 minutes) - set 24 hours before planned change

2. Maintain SOA Serial Numbers: - Always increment when making changes - Use YYYYMMDDNN format (e.g., 2026010901) - Automated in cPanel/PowerDNS

3. Verify Changes: - Query authoritative nameservers directly after changes - Use online propagation checkers - Test from multiple locations

4. Backup Zones: - Export zones monthly - Store backups securely - Test restore procedures quarterly

Email DNS Configuration

Essential Email Records:

1. MX Record:

clientdomain.com. MX 0 mail.clientdomain.com.
mail.clientdomain.com. A [EU1_IP]

2. SPF Record:

clientdomain.com. TXT "v=spf1 a mx ip4:[EU1_IP] ~all"

3. DKIM Record:

default._domainkey.clientdomain.com. TXT "v=DKIM1; k=rsa; p=[PUBLIC_KEY]"

4. DMARC Record:

_dmarc.clientdomain.com. TXT "v=DMARC1; p=none; rua=mailto:admin@clientdomain.com"

Testing Email DNS:

# Check MX records
dig clientdomain.com MX +short

# Check SPF
dig clientdomain.com TXT | grep spf

# Check DKIM
dig default._domainkey.clientdomain.com TXT +short

# Check DMARC
dig _dmarc.clientdomain.com TXT +short

# Test email authentication
# Send test email and check headers

Security Best Practices

1. Restrict Zone Transfers: - Only allow zone transfers to known slaves - Use TSIG authentication (PowerDNS) - Monitor zone transfer attempts - Block unauthorized AXFR queries

2. Rate Limiting: - Implement query rate limiting to prevent abuse - Monitor for DDoS attacks (high query volume) - Use Fail2Ban for repeated abusive queries

3. Regular Audits: - Review DNS logs weekly - Check for unauthorized zone modifications - Monitor for suspicious query patterns - Verify nameserver delegation at registrars

4. Access Control: - Limit WHM/ApisCP access to authorized staff - Use API tokens instead of root passwords - Enable two-factor authentication - Audit API access logs

Additional Resources

Internal Documentation: - Network Architecture - Complete network diagrams and DNS flow - Client Onboarding - DNS configuration for new clients - ApisCP Migration - PowerDNS migration details - Server Maintenance - DNS server maintenance procedures

External Resources: - PowerDNS Documentation - Official PowerDNS guides - BIND Documentation - Current DNS software (cPanel DNS) - DNSSEC Guide - DNSSEC implementation guide - DNS RFC 1035 - DNS specification

DNS Tools: - dig - DNS query tool - nslookup - DNS lookup utility - WhatIsMyDNS.net - Global DNS propagation checker - DNSChecker.org - Multi-location DNS verification - MXToolbox.com - Email DNS diagnostics

WHM/cPanel: - WHM DNS Functions - DNS zone management - cPanel Zone Editor - Client DNS management


Last updated: January 2026