Back to blog

BIND9 + WHMCS troubleshooting: DNS syntax, high-performance cron, and eNom integration

3/2/2026 · 2 min · WHMCS

Share

This incident involved three connected layers in a hosting stack: a critical BIND9 syntax failure, WHMCS cron tuning to remove task overlap, and eNom registrar integration hardening.

Initial error:

missing ';' before 'deny'

From there, I executed a full runbook: diagnosis, remediation, hardening, and acceptance checks.

1) BIND9: syntax failure diagnosis and safe recovery

1.1 Evidence collection

systemctl status bind9 --no-pager
journalctl -u bind9 -n 100 --no-pager

(On some distributions, service unit is named.)

1.2 Mandatory static validation

named-checkconf /etc/bind/named.conf

This provided exact parser position for the missing semicolon in ACL/recursion block.

1.3 Effective fix

Broken pattern:

allow-recursion {
    127.0.0.1
    deny all;
};

Fixed pattern:

allow-recursion {
    127.0.0.1;
    deny all;
};

1.4 Hardening during same change window

acl "trusted" {
    127.0.0.1;
    192.168.0.0/24;
};

options {
    directory "/var/cache/bind";

    allow-query { any; };
    allow-recursion { trusted; };

    dnssec-validation auto;
    listen-on-v6 { any; };
};

1.5 Zero-downtime apply and verification

rndc reload
# or
systemctl reload bind9

systemctl is-active bind9
rndc status

# functional checks
dig @127.0.0.1 example.com A +short
dig @127.0.0.1 example.com NS +short

1.6 Zone-level quality gate

named-checkzone domain.local /etc/bind/zones/domain.local.db
named-checkzone domain2.local /etc/bind/zones/domain2.local.db

2) WHMCS cron: performance tuning without business impact

Previous setting (too frequent in this environment):

* * * * * php -q /home/user/whmcs/crons/cron.php

Observed impact:

Applied setting:

*/5 * * * * /usr/local/bin/php -q /home/user/whmcs/crons/cron.php

Optional anti-overlap hardening with lock:

*/5 * * * * /usr/bin/flock -n /tmp/whmcs-cron.lock /usr/local/bin/php -q /home/user/whmcs/crons/cron.php

Validation:

Admin -> System Health Status

and host checks:

crontab -l
pgrep -af "whmcs/crons/cron.php"

3) eNom integration: secure and predictable domain automation

Activation path in WHMCS:

Configuration -> Products/Services -> Domain Registrars -> eNom

Security-critical requirement: registrar-side source IP whitelist must include WHMCS server egress IP; otherwise API auth fails even with correct credentials.

Set eNom as default registrar:

Configuration -> Domains -> Default Registrar -> eNom

End-to-end test executed:

  1. create domain order
  2. confirm payment
  3. trigger registrar module action
  4. verify registration on eNom side
  5. verify DNS delegation/records on BIND9

Validation commands:

dig test-domain.local NS +short
dig test-domain.local A +short

4) Operational takeaways

  1. A single missing semicolon can take down DNS service integrity.
  2. named-checkconf and named-checkzone are non-negotiable before reload.
  3. WHMCS cron every minute is often counterproductive at scale; 5-minute cadence is usually healthier.
  4. Registrar API requires credentials + IP whitelist + proper environment selection.
  5. Recovery is only complete after end-to-end functional evidence.

5) Final state

This is the type of low-level operational rigor that prevents minor config errors from turning into customer-facing outages.

CC BY-NC

This post is licensed under CC BY-NC.

Comments

Join the discussion below.