unbound

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

README

unbound

Name

unbound - perform recursive queries using libunbound.

Description

Via unbound you can perform recursive queries. Unbound uses DNSSEC by default when resolving and it returns those records (DNSKEY, RRSIG, NSEC and NSEC3) back to the clients. The unbound plugin will remove those records when a client didn't ask for it.

The internal (RR) answer cache of Unbound is disabled, so you may want to use the cache plugin.

Syntax

unbound [FROM]
  • FROM is the base domain to match for the request to be resolved. If not specified the zones from the server block are used.

More features utilized with an expanded syntax:

unbound [FROM] {
    except IGNORED_NAMES...
}
  • FROM as above.
  • IGNORED_NAMES in except is a space-separated list of domains to exclude from resolving.

Metrics

If monitoring is enabled (via the prometheus directive) then the following metric is exported:

  • coredns_unbound_request_duration_seconds{} - duration per query.
  • coredns_unbound_response_rcode_count_total{rcode} - count of RCODEs.

Examples

Resolve queries for all domains:

. {
    unbound
}

Resolve all queries within example.org.

. {
    unbound example.org
}

or

example.org {
    unbound
}

Resolve everything except queries for example.org

. {
    unbound {
        except example.org
    }
}

Bugs

The unbound plugin depends on libunbound(3) which is C library, to compile this you have a dependency on C and cgo. You can't compile CoreDNS completely static. For compilation you also need the libunbound source code installed.

See Also

See https://unbound.net for information on Unbound and unbound.conf(5).

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RequestDuration = prometheus.NewHistogram(prometheus.HistogramOpts{
		Namespace: plugin.Namespace,
		Subsystem: "unbound",
		Name:      "request_duration_seconds",
		Buckets:   plugin.TimeBuckets,
		Help:      "Histogram of the time each request took.",
	})

	RcodeCount = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: plugin.Namespace,
		Subsystem: "unbound",
		Name:      "response_rcode_count_total",
		Help:      "Counter of rcodes made per request.",
	}, []string{"rcode"})
)

Functions

This section is empty.

Types

type Unbound

type Unbound struct {
	Next plugin.Handler
	// contains filtered or unexported fields
}

Unbound is a plugin that resolves requests using libunbound.

func New

func New() *Unbound

New returns a pointer to an initialzed Unbound.

func (*Unbound) Name

func (u *Unbound) Name() string

Name implements the Handler interface.

func (*Unbound) ServeDNS

func (u *Unbound) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

ServeDNS implements the plugin.Handler interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL