title: bind9 configure reverse dns
body: <p>I have got ip 51.158.89.0/27 and I need to configure reverse dns with bind9.</p>
  
  <p>I configure bind9 like this : </p>
  
  <p>file named.conf : </p>
  
  <pre><code>include "/etc/bind/named.conf.options";
  include "/etc/bind/named.conf.local";
  include "/etc/bind/named.conf.default-zones";
  </code></pre>
  
  <p>files named.conf.options :</p>
  
  <pre><code>options {
  directory "/var/cache/bind";
  allow-query { any; };
  allow-recursion { localnets; };
  allow-query-cache { localnets; };
  allow-transfer{ none; };
  listen-on { any; };
  version none;
  };
  </code></pre>
  
  <p>file named.conf.local : </p>
  
  <pre><code>zone "89.158.51.in-addr.arpa" in{
      type master;
      file "/etc/bind/51.158.89.0-31.db";
     };
  </code></pre>
  
  <p>file 51.158.89.0-31.db : </p>
  
  <pre><code>; BIND reverse data file for local loopback interface
  $ORIGIN 89.158.51.IN-ADDR.ARPA.
  @            IN  SOA   ns1.whoople.fr. infrastructure.whoople.fr. (
                            2019071501 ; serial number
                            2h         ; refresh
                            15m        ; update retry
                            2w         ; expiry
                            3h         ; nx = nxdomain ttl
                            )
              IN      NS      ns1.whoople.fr.
              IN      NS      ns2.whoople.fr.
  22          IN      PTR     mail.universals.email.
  30          IN      PTR     ns1.whoople.fr.
  </code></pre>
  
  <p>In logs we can see zone loaded : </p>
  
  <pre><code>Jul 15 10:57:41 ns1 named[39636]: /etc/bind/51.158.89.0-31.db:5: no TTL specified; using SOA MINTTL instead
  Jul 15 10:57:41 ns1 named[39636]: zone 0/27.89.158.51.in-addr.arpa/IN: loaded serial 2019071501
  Jul 15 10:57:41 ns1 named[39636]: all zones loaded
  </code></pre>
  
  <p>With a customer computer I tried this command </p>
  
  <pre><code>-- #nslookup 51.159.89.22
  ;; Got SERVFAIL reply from 192.168.1.1, trying next server
  ;; Got SERVFAIL reply from fe80::ad5:9dff:fef5:f472, trying next server
  ** server can't find 22.89.158.51.in-addr.arpa: SERVFAIL
  </code></pre>
  
  <p>I can see in server dns in syslog file</p>
  
  <pre><code>Jul 15 10:59:57 ns1 named[39636]: client **.**.**.**#34091 (22.0-27.89.158.51.in-addr.arpa): query (cache) '22.0-27.89.158.51.in-addr.arpa/PTR/IN' denied
  </code></pre>
  
  <p>Do you have an idea?
  Regards,
  Clement</p>