OPNsense Forum

English Forums => Development and Code Review => Topic started by: B0Ni on July 29, 2026, 11:16:19 AM

Title: Can I create Unbound DoT forwarding rules via API?
Post by: B0Ni on July 29, 2026, 11:16:19 AM
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?
Title: Re: Can I create Unbound DoT forwarding rules via API?
Post by: Monviech (Cedrik) on July 29, 2026, 11:22:05 AM
Create one with your browser and check the payload with the browser dev tools.
Title: Re: Can I create Unbound DoT forwarding rules via API?
Post by: B0Ni on July 29, 2026, 11:25:22 AM
...alredy resolve this
I used wrong endpoint, correct is "/api/unbound/settings/addDot"
API Reference looking absolete.