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 malformed.

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.

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.

Return type:

bool