A Ruby tool that compares DNS records in a BIND format file with actual DNS lookups to ensure your DNS records are correctly configured and propagated.
- Supports A, CNAME, MX, TXT, SRV, and NS record types
- Parallel DNS lookups for faster processing
- Case-sensitive or case-insensitive matching options
- Strict or loose TXT record validation
- DNS cache control (fresh lookups or use system cache)
- Detailed diagnostic information for resolving DNS issues
Simply clone the repository and ensure you have Ruby installed:
git clone https://github.com/sanjay/dns-validator.git
cd dns-validator
chmod +x dns-validator.rb
Basic usage:
./dns-validator.rb -f your_bind_file.txt
-f, --file FILE
: BIND zone file to check-v, --verbose
: Show detailed output-d, --domain DOMAIN
: Override the domain name-c, --case-sensitive
: Enable case-sensitive matching for DNS names--use-cache
: Use local DNS cache (default is to bypass cache)--loose-txt
: Allow extra TXT records in DNS not present in BIND file-h, --help
: Show help message-V, --version
: Show version information
Check DNS records with verbose output:
./dns-validator.rb -f your_bind_file.txt -v
Allow extra TXT records in DNS:
./dns-validator.rb -f your_bind_file.txt --loose-txt
- Ruby 2.5 or higher
- Standard Ruby libraries: resolv, optparse, thread, timeout
GNU GPLv3 License - see LICENSE file for details