Hi there,
I have been looking for a way to configure forward-zone domains in a single text file instead of listing them each individually.
Hypothetical example below:
-------- SNIP ----------
forward-zone:
name: file /etc/domains.txt
forward-addr: 10.0.0.2
--------END -----------
instead of the usual:
------- SNIP -----------
forward-zone:
name: banana.com
forward-addr: 10.0.0.2
forward-zone:
name: banana2.com
forward-addr: 10.0.0.2
forward-zone:
name: banana3.com
forward-addr: 10.0.0.2
--------- END ----------
etc etc...
If such syntax exists I would be greatly thankful, if not.. perhaps you guys have ideas how to implement something like this without a million forward-zone: clauses in the unbound.conf
Thanks
you guys have ideas how to implement something like this without a
million forward-zone: clauses in the unbound.conf
Generate a file (from your data source) and include it in unbound.conf?
-JP
Thanks for the response
Alright so using:
include: "/tmp/domains.txt"
what would the syntax be in the forward-zone: section ?
forward-zone:
name: $include ??
forward-addr: 10.0.0.2
what would the syntax be in the forward-zone: section ?
$ grep include unbound.conf
include "myzones.txt"
$ cat myzones.txt
forward-zone:
name: banana.com
forward-addr: 10.0.0.2
forward-zone:
name: banana2.com
forward-addr: 10.0.0.2
...
-JP
### ## ## ######## ###### ####### ## ## ######## ######## ## ## ### ## ## ## ## ######
## ## ## ## ## ## ## ## ## ## ### ### ## ## ## ## ## ## ### ## ## ## ## ##
## ## ## ## ## ## ## ## ## #### #### ## ## ## ## ## ## #### ## ## ## ##
## ## ## ## ## ###### ###### ## ## ## ### ## ###### ## ######### ## ## ## ## ## ##### ######
######### ## ## ## ## ## ## ## ## ## ## ## ## ## ######### ## #### ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## ##
## ## ### ### ######## ###### ####### ## ## ######## ## ## ## ## ## ## ## ## ## ######
You have answered my question!!