OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Unbound: Bulk add host-entries (overrides)
« previous next »
  • Print
Pages: [1]

Author Topic: Unbound: Bulk add host-entries (overrides)  (Read 2205 times)

nykaer

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Unbound: Bulk add host-entries (overrides)
« on: April 23, 2021, 04:48:21 pm »
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
Logged

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 6923
  • Karma: 583
    • View Profile
Re: Unbound: Bulk add host-entries (overrides)
« Reply #1 on: April 23, 2021, 05:24:25 pm »
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.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

nykaer

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Unbound: Bulk add host-entries (overrides)
« Reply #2 on: April 23, 2021, 06:13:39 pm »
That would work just fine..  Sold.

Thank you for the solution.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Unbound: Bulk add host-entries (overrides)
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2