<div dir="ltr">Hi everyone,<div><br></div><div>I have compiled successfully bind-9.16.1 from its source code (bind-9.16.1.tar.xz) and configured to function as a DNS resolver by following the instructions presented in <a href="http://www.linuxfromscratch.org/blfs/view/svn/server/bind.html">http://www.linuxfromscratch.org/blfs/view/svn/server/bind.html</a>  </div><div>---</div><div>[root@ bind]# named -V<br>BIND 9.16.1 (Stable Release) <id:d497c32><br>running on Linux x86_64 3.8.13-118.20.3.el7uek.x86_64 #2 SMP Fri Feb 23 13:52:32 PST 2018<br>built by make with '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--mandir=/usr/share/man' '--with-libtool' '--disable-static'<br>compiled by GCC 4.8.5 20150623 (Red Hat 4.8.5-16.0.3)<br>compiled with OpenSSL version: OpenSSL 1.0.2k-fips  26 Jan 2017<br>linked to OpenSSL version: OpenSSL 1.0.2k-fips  26 Jan 2017<br>compiled with zlib version: 1.2.7<br>linked to zlib version: 1.2.7<br>threads support is enabled<br><br>default paths:<br>  named configuration:  /etc/named.conf<br>  rndc configuration:   /etc/rndc.conf<br>  DNSSEC root key:      /etc/bind.keys<br>  nsupdate session key: /var/run/named/session.key<br>  named PID file:       /var/run/named/named.pid<br>  named lock file:      /var/run/named/named.lock<br></div><div>---</div><div><br></div><div>the named configuration file that I am using is as follows:</div><div>---</div><div>options {<br>    directory "/etc/named";<br>    pid-file "/var/run/named.pid";<br>    statistics-file "/var/run/named.stats";<br>    allow-query     { any; };<br>    recursion yes;<br>};<br>zone "." {<br>    type hint;<br>    file "root.hints";<br>};<br>zone "0.0.127.in-addr.arpa" {<br>    type master;<br>    file "pz/127.0.0";<br>};<br><br>// Bind 9 now logs by default through syslog (except debug).<br>// These are the default logging rules.<br><br>logging {<br>    category default { default_syslog; default_debug; };<br>    category unmatched { null; };<br>  channel default_syslog {<br>      syslog daemon;                      // send to syslog's daemon<br>                                          // facility<br>      severity info;                      // only send priority info<br>                                          // and higher<br>  };<br>  channel default_debug {<br>      file "named.run"  versions 3;       // write to named.run in<br>                                          // the working directory<br>                                          // Note: stderr is used instead<br>                                          // of "named.run"<br>                                          // if the server is started<br>                                          // with the '-f' option.<br>      severity dynamic;                   // log at the server's<br>      print-time yes;                     // current debug level<br>  };<br>  channel default_stderr {<br>      stderr;                             // writes to stderr<br>      severity info;                      // only send priority info<br>                                          // and higher<br>  };<br>  channel null {<br>      null;                               // toss anything sent to<br>                                        // this channel<br>  };<br>};<br></div><div>---</div><div>The main reason that I am trying to use bind 9.16.1 is using EDNS Client Subnet (ECS) feature to pass the DNS client subnet information to an authoritative DNS or DNS server with geoip-enabled feature. To test this, I run the following command on my server, but the response it not what I expected. However, when I replace 127.0.0.1 with google's resolver (8.8.8.8), it returns the correct answer. </div><div><br></div><div>$ dig +short +subnet=<a href="http://81.169.181.179/24">81.169.181.179/24</a> -t txt <a href="http://whereami.geotest2.XXXXXX.net">whereami.geotest2.XXXXXX.net</a>. @<a href="http://127.0.0.1">127.0.0.1</a><br></div><div><br></div><div>I was wondering is there anything that might be missed during the compile/build process or setting the parameters in the named configuration file? Any help would be appreciated.</div><div><br></div><div>Regards,</div><div>Dawood</div></div>