Skip to main content

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:
Preset policies available:
  • kids-safe - Safe browsing with ad blocking
  • gaming-optimized - Low-latency DNS for gaming
  • iot-restricted - Restricted DNS for IoT devices
  • guest-network - Standard DNS for guests

5. Auto-Benchmarking (scheduler/)

Automatically test and switch to the best DNS:
Features:
  • 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:
Supported VPN types:
  • WireGuard
  • OpenVPN
  • sing-box

7. Multi-WAN Support (multiwan/)

Route DNS through specific WAN interfaces:
Features:
  • Per-WAN DNS configuration
  • Automatic failover
  • Health checking with latency monitoring
  • Priority-based selection

8. Transparent Proxy (firewall/)

Intercept all DNS traffic for redirection:
Supports:
  • iptables backend
  • nftables backend
  • Client exclusion list

9. Metrics (metrics/)

Collect and export DNS query statistics:
Features:
  • Query record collection
  • Top domains/clients tracking
  • Per-server statistics
  • Prometheus exposition format

10. Logging (logging/)

Structured DNS query logging:
Features:
  • 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

  1. Backup existing configuration:
  1. Install new version
  2. Run migration helper:
  1. Verify configuration:

License

MIT License - See LICENSE file for details.