0

How tel nsd to use .consule as another service level for checking records.

Here the stub-zone for unbound but how to tell nsd use consul?

Unbound config

stub-zone:
    name: "consul"
    stub-addr: 127.0.0.1@86400

NSD will be thorw an error

nsd.conf:9: at 'stub-zone:': error: syntax error

Sample zone file:

$TTL    86400 ; 24 hours could have been written as 24h or 1d
; $TTL used for all RRs without explicit TTL value
$ORIGIN example.com.
@  1D  IN  SOA ns1.example.com. hostmaster.example.com. (
                  2002022401 ; serial
                  3H ; refresh
                  15 ; retry
                  1w ; expire
                  3h ; nxdomain ttl
                 )
       IN  NS     ns1.example.com. ; in the domain
       IN  NS     ns2.smokeyjoe.com. ; external to domain
www    IN  A      192.168.0.2  ;web server definition
ha-www    IN  CNAME      service-a.consul.  ; using consul
sweb
  • 451
  • 1
  • 9
  • 27
  • 1
    As far as I know stub zone zones are not part of the DNS standards but were a bind specific implementation (later also implemented by others) . Since I think that the design philosophy for NSD is to be fully standards compliant it probably does not support non standards features such as stub zones. – HBruijn Jul 10 '19 at 15:18
  • So i must using bind or bring unbound+nsd to solve such a problem? – sweb Jul 10 '19 at 20:07
  • `s/consule/consul/` :) – Jiri B Mar 25 '21 at 08:01
  • BTW consul DNS is not real DNS, it misses some important function. Anyway, `nsd` is authoritative server, what you want is to link your recursive DNS (`unbound`, `named`, `dnsmasq`...) server with `consul`. Please follow official docs https://learn.hashicorp.com/tutorials/consul/dns-forwarding – Jiri B Mar 25 '21 at 08:03

0 Answers0