What's new

How to use forward-zone in Unbound?

For details see This is the full documentation of unbound.conf and covers everything !!!

Go down page until you see 'Forward Zone Options'
Examples are in /opt/share/unbound/configs/doc/example.conf.in

Here are two random simple examples (made up to demonstrate how it works):

Example 1 ######################################################################
forward-zone:
name: "lloydsbank.co.uk"
forward-addr: 208.67.222.222@53
forward-first: yes
forward-tcp-upstream: no
forward-tls-upstream: no
forward-no-cache: no

This makes unbound lookup the DNS Address for "lloydsbank.co.uk" from 208.67.222.222 using port 53.

Example 2 ######################################################################
forward-zone:
name: "."
forward-addr: 9.9.9.9@53
forward-first: no
forward-tcp-upstream: no
forward-tls-upstream: no
forward-no-cache: no

This makes unbound lookup the DNS Address for "." (the 'default/catch-all' for anything not defined in another forward-zone) from 9.9.9.9 using port 53.

These two examples mean that your standard default DNS provider is '9.9.9.9' BUT whenever you lookup "lloydsbank.co.uk" it will perform the lookup from 208.67.222.22 using port 53.

Multiple forward-zones can be defined in the unbound.conf file, whichever matches the lookup first operates, "." is the default/catch-all.

forward-first
defines if unbound uses the forward-addr first or whether it trys to lookup in the unbound cache first.

forward-no-cache defines if the lookup is cached by unbound or whether the lookup is performed EVERYTIME, you might use this if the lookup is likely to change and the cached value is likely to be wrong.

I will not explain the other settings as the documentation at https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html explains it fully.

Hope this helps.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Back
Top