DNS-MNS OpenWrt Features
This document describes the comprehensive OpenWrt support added to DNS-MNS v6.4.0.Overview
DNS-MNS now includes extensive OpenWrt router support with the following key features:- Hot-reload configuration - Change settings without restart
- Split-horizon DNS - Route domains to different DNS servers
- Per-device policies - Different DNS for different clients
- Auto-benchmarking - Automatically switch to best DNS
- VPN-aware routing - Change DNS based on VPN status
- Multi-WAN support - Route DNS through specific WANs
- Transparent proxy - Intercept all DNS traffic
- Metrics & logging - Comprehensive monitoring
- LuCI web interface - Web-based configuration
- AdGuard integration - Work with AdGuard Home
- mDNS support - Local service discovery
- Notifications - Telegram/Discord alerts
Package Structure
Features
1. Service Management (service/)
- Hot-reload support via SIGHUP signal
- Graceful start/stop with cleanup
- Health check monitoring
- Signal handling for proper shutdown
2. Configuration (config/)
- JSON-based configuration with UCI fallback
- Atomic config writes
- Import/export functionality
- Version tracking
3. Split-Horizon DNS (splitdns/)
Route different domains to different DNS servers:
4. Per-Device Policies (policy/)
Apply different DNS settings based on device:
kids-safe- Safe browsing with ad blockinggaming-optimized- Low-latency DNS for gamingiot-restricted- Restricted DNS for IoT devicesguest-network- Standard DNS for guests
5. Auto-Benchmarking (scheduler/)
Automatically test and switch to the best DNS:
- Configurable benchmark interval
- Automatic failover on failures
- Performance-based switching
- Health checker with configurable threshold
6. VPN Integration (vpn/)
Change DNS based on VPN connection status:
- WireGuard
- OpenVPN
- sing-box
7. Multi-WAN Support (multiwan/)
Route DNS through specific WAN interfaces:
- Per-WAN DNS configuration
- Automatic failover
- Health checking with latency monitoring
- Priority-based selection
8. Transparent Proxy (firewall/)
Intercept all DNS traffic for redirection:
- iptables backend
- nftables backend
- Client exclusion list
9. Metrics (metrics/)
Collect and export DNS query statistics:
- Query record collection
- Top domains/clients tracking
- Per-server statistics
- Prometheus exposition format
10. Logging (logging/)
Structured DNS query logging:
- JSON log format
- Automatic rotation
- IP anonymization
- Configurable log levels
11. AdGuard Integration (adguard/)
Integrate with AdGuard Home:
12. mDNS Support (mdns/)
Local service discovery:
13. Notifications (bot/)
Send alerts via Telegram or Discord:
LuCI Web Interface
The LuCI interface provides web-based configuration:Installation
Package Installation
Manual Installation
Configuration
UCI Configuration
JSON Configuration
API Examples
ubus Integration
CLI Commands
Testing
All packages include comprehensive tests:Troubleshooting
Check Service Status
Test DNS Resolution
Debug Mode
Migration from Older Versions
- Backup existing configuration:
- Install new version
- Run migration helper:
- Verify configuration: