Unbound

async OPNsenseClient.get_unbound_blocklist()

Return Unbound DNS blocklist configuration.

Returns:

A UUID-keyed mapping of DNSBL rows from

search_dnsbl. For legacy firmware, a mapping with legacy set to the regular DNSBL settings. Returns an empty mapping when the endpoint is unavailable or its decoded payload has no usable rows. With errors disabled, malformed JSON follows the shared error policy and returns None; with errors enabled, the mapped OPNsenseError propagates.

Return type:

dict[str, Any]

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