Skip to main content
Glama
vespo92

OPNSense MCP Server

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
NameRequiredDescriptionDefault
domainYesDomain 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}`);
      }
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vespo92/OPNSenseMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server