Measure QPS on BIND9


BIND9 DNS engine was installed on Ubuntu server, the goal is to measure the QPS by enabling the statistics.
Installing the BIND9 command: sudo apt install bind9 bind9utils bind9-doc bind9-host
Locate the named.stats file on your server using the following command:
locate named.stats , the file was in : “/var/cache/bind/named.stats”, add the following command to named.config.options which can be found in: /etc/bind/named.conf.options, open the file using nano command.

listen-on port 53 { any; };
allow-query { any ; // or localhost; 192.168.1.0/24;};
forwarders { 8.8.8.8; };
recursion yes;
listen-on-v6 { any; };
statistics-file “/var/cache/bind/named.stats”;

Enable rndc command, using rndc-config, add the following configurations to named.config which can be found in the following directory: /etc/bind/named.conf.

include “/etc/bind/rndc.key”;
controls {
        inet 127.0.0.1 allow {
localhost; } keys { “rndc-key”;
};
};

run the command Rndc stats, and then open the output using: cat /var/cache/bind/named.stats.

using the output you can calculate the number of queries the server received during specific time.


Did you find this article useful?



  • Enabling DNSSEC on an external zone

    Domain Name System Security Extensions (DNSSEC) is used to strengthen DNS protocol security.It controls the integrity of all DNS answers and ensures t...

  • Utilizing ioc2rpz.net as open source RPZ

    ioc2rpz community is a portal which provides open source DNS Firewall / RPZ feeds. The DNS Firewall feeds are based on publicly available threat intel...

  • Enable Guardian for nonsupported interfaces

    Broadcom interface is not supported by default, only intel interfaces are supported for the Guardian service. this workaround only for POC: 1. login...

  • Cascaded DNS

    EDNS: Port 53 is reserved for DNS usage, DNS uses both UDP and TCP for message transport.Conventional message exchanges are short, and thus well suit...

  • NXDomain Redirection

    What is NXDOMAIN Redirection? NXDOMAIN redirection provides the ability for a recursive server to replace an NXDOMAIN response to a query with a conf...