Unbound: Bulk add host-entries (overrides)

Started by nykaer, April 23, 2021, 04:48:21 PM

Previous topic - Next topic
I have quite a few host overrides I need to enter into our OPNsense.

Looked at the API, and I does not include these entries.  I could manually enter them into /var/unbound/cat host_entries.conf.   But according to docs, that will not survive a reboot.

Any ideas, before I spends hours "cURL'ing my way out of the problem??

/Nykaer

Download a configuration (System --> Configuration --> Backups), examine the XML file you get. Populate the XML with your entries, restore config in the UI.

I did that for BIND zone entries, not difficult to script. If you are seriously pondering using curl, it shouldn't be difficult for you.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

That would work just fine..  Sold.

Thank you for the solution.