if you add rr via control-client, how to make them stick?

Hello,

as stated here

https://nlnetlabs.nl/documentation/unbound/unbound-control/

You can add resource records and zones like this to unbound:

sudo unbound-control local_data canon3.hanscees.con A 192.168.0.63

This works fine. But how can I make sure these data do not disappear after a reboot?

Should I thus:

1- add them to the config file (to make them stick forever)

2- add them via control-client to the server? (to make them available without a reload)

Thanx

Hello,

as stated here

https://nlnetlabs.nl/documentation/unbound/unbound-control/

You can add resource records and zones like this to unbound:

sudo unbound-control local_data canon3.hanscees.con A 192.168.0.63

This works fine. But how can I make sure these data do not disappear after a reboot?

Should I thus:

1- add them to the config file (to make them stick forever)

https://nlnetlabs.nl/documentation/unbound/unbound.conf/

local-data: “”
Configure local data, which is served in reply to queries for it.
The query has to match exactly unless you configure the local-zone
as redirect. If not matched exactly, the local-zone type deter-
mines further processing. If local-data is configured that is not
a subdomain of a local-zone, a transparent local-zone is config-
ured. For record types such as TXT, use single quotes, as in
local-data: ‘example. TXT “text”’.

If you need more complicated authoritative data, with referrals,
wildcards, CNAME/DNAME support, or DNSSEC authoritative service,
setup a stub-zone for it as detailed in the stub zone section
below.

Yes. Unbound-control is only dealing with runtime data and it would be lost upon a simple restart, so you need to write it in your config file if you want it to stick upon the next restart.