Security scanners and corporate pentests (Qualys, Nessus, Detectify, etc.) often report a finding like: "Nameserver allows unauthorized DNS zone transfer".
It means anyone on the internet can download your complete DNS zone - every subdomain, MX, SRV and TXT record - with a single command. Zone transfers (AXFR) exist only so a secondary nameserver can replicate the zone from the primary; they were never meant to be public.
Check if you are affected (run this from any machine outside your server):
Code: Select all
dig -t AXFR example.com @ns1.example.comWhy the fix belongs in named.conf.options on myVesta
myVesta uses BIND9. The panel writes zone declarations into /etc/bind/named.conf like this:
Code: Select all
zone "example.com" {type master; file "/home/admin/conf/dns/example.com.db";};- one line covers all existing domains and every future domain you add through the panel
- myVesta rewrites named.conf whenever domains are added or removed, but it never touches named.conf.options - the change survives panel operations and updates
1. Back up the current config, just in case:
Code: Select all
cp -a /etc/bind /root/bind-backup-$(date +%F)Code: Select all
options {
...
allow-transfer { none; };
version "hidden"; // optional: hides the BIND version from scanners
};Code: Select all
acl "xfer" { 203.0.113.10; };
options {
...
allow-transfer { "xfer"; };
};3. Validate the config and reload BIND:
Code: Select all
named-checkconf
systemctl reload bind9 # on newer Debian the unit is "named"; "rndc reload" also worksFrom an external machine (not the server itself):
Code: Select all
dig -t AXFR example.com @ns1.example.com
dig -t AXFR example.com @ns2.example.comCode: Select all
; Transfer failed.Code: Select all
dig NS example.com @YOUR.SERVER.IP +short
dig A example.com @YOUR.SERVER.IP +shortCode: Select all
journalctl -u bind9 | grep -i "axfr request denied"