
vespo92/opnsensemcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
vespo92/opnsensemcp는 https://github.com/vespo92/opnsensemcp.]에서 수입된 MCP 서버 후보입니다
개요
vespo92/opnsensemcp는 https://github.com/vespo92/opnsensemcp.]에서 수입된 MCP 서버 후보입니다
개요(AI 번역)
포괄적인 OPNsense 방화벽 관리를 위한 Model Context Protocol (MCP) 서버. 이 서버는 Claude와 같은 AI 조수가 방화벽 구성을 직접 관리하고, 네트워크 문제를 진단하고, 복잡한 네트워킹 작업을 자동화합니다.
특징
🔥 방화벽 관리
- 방화벽 규칙에 대한 CRUD 작업 완료
- API-created "자동화 규칙"의 Proper 처리
- Inter-VLAN 라우팅 구성
- 배치 규칙 작성 및 관리
- 여러 fallback 방법의 향상된 지속성
NAT 구성 (SSH 기반)
- Outbound NAT 규칙 관리
- NAT 모드 제어 (자동 / 하이브리드 / 수동 / 비활성화)
- Inter-VLAN 트래픽의 예외 규칙 없음
- 자동화 된 DMZ NAT 문제 해결
- 직접 XML 구성 조작
. 네트워크 진단
- 포괄적인 routing 분석
- 납품업자 ID를 가진 ARP 테이블 검사
- 인터페이스 구성 관리
- 네트워크 연결 문제 해결
- 일반적인 문제점을 위한 자동 고침 기능
## ゚️ SSH/CLI 실행
- OPNsense에 직접 명령 실행
- 구성 파일 조작
- API를 통해 시스템 수준의 운영 가능
- 서비스 관리 및 재시작
추가 기능
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
OPNsense MCP Server
A Model Context Protocol (MCP) server for comprehensive OPNsense firewall management. This server enables AI assistants like Claude to directly manage firewall configurations, diagnose network issues, and automate complex networking tasks.
Features
🔥 Firewall Management
- Complete CRUD operations for firewall rules
- Proper handling of API-created “automation rules”
- Inter-VLAN routing configuration
- Batch rule creation and management
- Enhanced persistence with multiple fallback methods
🌐 NAT Configuration (SSH-based)
- Outbound NAT rule management
- NAT mode control (automatic/hybrid/manual/disabled)
- No-NAT exception rules for inter-VLAN traffic
- Automated DMZ NAT issue resolution
- Direct XML configuration manipulation
🔍 Network Diagnostics
- Comprehensive routing analysis
- ARP table inspection with vendor identification
- Interface configuration management
- Network connectivity troubleshooting
- Auto-fix capabilities for common issues
🖥️ SSH/CLI Execution
- Direct command execution on OPNsense
- Configuration file manipulation
- System-level operations not available via API
- Service management and restarts
📊 Additional Capabilities
- VLAN management
- DHCP lease viewing and management
- DNS blocklist configuration
- HAProxy load balancer support
- Configuration backup and restore
- Infrastructure as Code support
Installation
Prerequisites
- Node.js 18+ to run the server (Bun 1.1.39+ to develop on it)
- OPNsense firewall (v24.7+ recommended)
- API credentials for OPNsense
- SSH access (optional, for advanced features)
Quick Start with npm
- Install the package:
npm install -g opnsense-mcp-server
- Create a
.envfile with your credentials:
# Required
OPNSENSE_HOST=https://your-opnsense-host:port
OPNSENSE_API_KEY=your-api-key
OPNSENSE_API_SECRET=your-api-secret
OPNSENSE_VERIFY_SSL=false
# Optional - for SSH features
OPNSENSE_SSH_HOST=your-opnsense-host
OPNSENSE_SSH_USERNAME=root
OPNSENSE_SSH_PASSWORD=your-password
# Or use SSH key
# OPNSENSE_SSH_KEY_PATH=~/.ssh/id_rsa
# Recommended for a new/production router — see "Safety Modes" below
# OPNSENSE_READ_ONLY=true
- Start the MCP server:
opnsense-mcp-server
⚠️ Safety Modes (read this before pointing at a production router)
By default this server can make live, immediate changes to your firewall — add/delete rules, change NAT, restart services, run whitelisted shell commands over SSH. Two environment variables (operator-only — a tool call can never set or override them) add a safety net:
| Variable | Effect |
|---|
설치
npx opnsense-mcp-server설정
{
"mcpServers": {
"opnsense": {
"command": "bun",
"args": ["run", "/path/to/OPNSenseMCP/src/index.ts"],
"env": {
"OPNSENSE_HOST": "https://your-opnsense:port",
"OPNSENSE_API_KEY": "your-key",
"OPNSENSE_API_SECRET": "your-secret",
"OPNSENSE_VERIFY_SSL": "false"
}
}
}
}