Unbound

async OPNsenseClient.get_unbound_blocklist()

Return Unbound DNS blocklist configuration.

Returns:

A UUID-keyed mapping of extended DNSBL rows,

or the regular DNSBL settings under legacy on older firmware. A missing endpoint (404) returns an empty mapping. With errors disabled, a denied or failed read, undecodable JSON, or a wrongly shaped inventory returns None. With errors enabled, decoded payloads use the existing normalization rules, and the mapped OPNsenseError propagates for request or decoding failures, including a legacy endpoint’s 404.

Return type:

dict[str, Any] | None

async OPNsenseClient.enable_unbound_blocklist(uuid=None)

Enable Unbound DNS blocklist filtering.

Parameters:

uuid (str | None, optional) – UUID of an extended DNSBL entry. Omit when enabling the legacy regular DNSBL setting.

Returns:

True when the operation succeeds. Otherwise, False. Transport

errors raise OPNsenseError when throw_errors is enabled.

Return type:

bool

async OPNsenseClient.disable_unbound_blocklist(uuid=None)

Disable Unbound DNS blocklist filtering.

Parameters:

uuid (str | None, optional) – UUID of an extended DNSBL entry. Omit when disabling the legacy regular DNSBL setting.

Returns:

True when the operation succeeds; otherwise, False. Transport

errors raise OPNsenseError when throw_errors is enabled.

Return type:

bool