Unbound adblocking enable & disable using API - curl command ?

Started by gspannu, Today at 10:37:08 AM

Previous topic - Next topic
Help needed....

Does anyone know as to how to use the API to enable & disable Unbound Blocklists using an API?

I have Unbound setup with a few blocklists and combination of source nets; so most of the time Unbound Blocklists can keep running.

However, there are times when other family members use laptops/machines (that are a part of the blocklists) but just need Ad-Unblocking for a short duration. Expecting them to login into the GUI in OPNsense to disable this is a bridge too far.


Q: Is there a global API (or some mechanism without having to log into OPNsense GUI) to temporarily disable all blocklists and then enable them later.

Q: Is there a quick way to do this via a simple curl command that can execute a preformed API call?  I can then create a shortcut on these machines that can be used to turn on/off Unbound blocking.

I have tried reading into the API docs, but unable to figure it out...

May I suggest considering to use AdGuard Home instead for DNS blocking? There are nice mobile apps that let you disable filtering with a single tap - for 1 minute, 5 minutes, 1 hour ... etc.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Patrick M. Hausen on Today at 12:44:44 PMThere are nice mobile apps that let you disable filtering with a single tap - for 1 minute, 5 minutes, 1 hour ... etc.
To be honest : People should really avoid needing such a feature!

Is it really that hard to simply check your Pi-Hole Query Log (or the same in AdGuard) and figure out what is being blocked and solve the issue once and for all ?!
Nothing personal by the way. Talking about people in general!

And in the worst case you even have the option to use some kind of DoH/DoT feature in Mozilla Firefox for example to check if your adblocker is the issue at all :)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)