Can I create Unbound DoT forwarding rules via API?

Started by B0Ni, Today at 11:16:19 AM

Previous topic - Next topic
OPNsense 26.1.11

I use endpoint "/api/unbound/settings/add_forward" and payload like this:
{
    "dot":  {
                "enabled":  "1",
                "type":  "dot",
                "domain":  "checkip.amazonaws.com",
                "server":  "77.88.8.8",
                "port":  "853",
                "verify":  "common.dot.dns.yandex.net",
                "forward_tcp_upstream":  "0",
                "forward_first":  "0"
            }
}
and always get new ordinary query forwarding rule, instead of DoT forwarding.

Is this how it should be, or am I doing something wrong?

Create one with your browser and check the payload with the browser dev tools.
Hardware:
DEC740

...alredy resolve this
I used wrong endpoint, correct is "/api/unbound/settings/addDot"
API Reference looking absolete.