ISC Bind 9.5.0 and greater has an experimental web server built in to named that allows you to remotely access BIND 9 statistics data.  To enable the feature, you must compile named against the libxml2 library.  The following is an example of how to configure the experimental stats feature:

$ ./configure --prefix=/export/opt/bind --with-openssl=/usr/local/ssl --with-libxml2

The system configuration for this article was based on a Linux system running Fedora 8, using Bind 9.5.0B3.

Once the experimental feature is configured, then issue the make and make install command to build and install the software. The last step in making the statistics server feature available is to add the following configuration to the named.conf file:

statistics-channels {
        inet 10.1.10.100 port 8080 allow { 192.168.2.13; 192.168.2.15; 10.1.10.2; };
        inet 127.0.0.1   port 8080 allow { 127.0.0.1; };
};

This configuration example will bind the embedded web server to port 8080 to the 10.1.10.100 interface on the server, and it will permit access to 192.168.2.13, 192.168.2.15 and 10.1.10.2 respectively.  The second binds port 8080 to the local loopback and permit only the localhost access to it. Restart the nameserver once the configuaration has been added.

When the nameserver has restarted, you can access the embedded web using your browser or other tools such as curl and/or wget.  The data that is returned by the nameserver is xlm data that is formatted using xsl.  Given this example, you would open your browser and attempt a connection to http://10.1.10.100:8080/.

Remember that if you are using Linux with iptables running, you will likely have to add rules to the iptables script to permit client IPs to access this server on TCP port 8080.The following is ONLY a sample portion of the xml data that is output from the server:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/bind9.xsl"?>
<isc version="1.0">
  <bind>
    <statistics version="2.2">
      <views>
        <view>
          <name>_default</name>
          <zones>
            <zone>
              <name>0.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>0</serial>
            </zone>
            <zone>
              <name>127.IN-ADDR.ARPA/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>0</serial>
            </zone>
            <zone>
              <name>1.0.0.127.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>0</serial>
            </zone>
            <zone>
              <name>254.169.IN-ADDR.ARPA/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>0</serial>
            </zone>
            <zone>
              <name>2.0.192.IN-ADDR.ARPA/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>0</serial>
            </zone>
            <zone>
              <name>0.168.192.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>2010021054</serial>
            </zone>
            <zone>
              <name>1.168.192.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>2010021527</serial>
            </zone>
            <zone>
              <name>2.168.192.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>2010021192</serial>
            </zone>
            <zone>
              <name>254.168.192.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>2010021022</serial>
            </zone>
            <zone>
              <name>3.168.192.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>2010021006</serial>
            </zone>
            <zone>
              <name>4.168.192.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>2010021012</serial>
            </zone>
            <zone>
              <name>5.168.192.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>2010021007</serial>
            </zone>
            <zone>
              <name>6.168.192.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>2010021003</serial>
            </zone>
            <zone>
              <name>7.168.192.in-addr.arpa/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>2010021004</serial>
            </zone>
            <zone>
              <name>255.255.255.255.IN-ADDR.ARPA/IN</name>
              <rdataclass>IN</rdataclass>
              <serial>0</serial>
            </zone>
            <zone>
....