unblock_domain
Remove a domain from the DNS blocklist on OPNSense firewalls using the MCP server, enabling access to previously restricted sites.
Instructions
Remove a domain from the DNS blocklist
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain to unblock |
Implementation Reference
- The handler function that executes the unblock_domain tool logic: finds the DNS blocklist entry for the given domain, deletes it using the OPNSense API, and applies the changes.async unblockDomain(domain: string): Promise<void> { try { // Find the entry const blocklist = await this.list(); const entry = blocklist.find(item => item.host === domain); if (!entry || !entry.uuid) { throw new Error(`Domain ${domain} not found in blocklist`); } // Delete the entry await this.client.delUnboundHost(entry.uuid); // Apply changes await this.applyChanges(); } catch (error: any) { console.error('Failed to unblock domain:', error); throw new Error(`Failed to unblock domain: ${error.message}`); } }