DNS-MNS Passwall Integration Guide
This guide covers the seamless integration between DNS-MNS and Passwall/Passwall2 proxy on OpenWrt routers, available in DNS-MNS v6.5.0.Overview
Passwall is a popular OpenWrt package that provides transparent proxy/VPN functionality with support for Shadowsocks, V2Ray, XRay, Trojan, and other protocols. DNS-MNS integrates with Passwall to provide optimized DNS resolution while Passwall handles proxy traffic.Key Features
- Auto-Detection - Automatically detects Passwall/Passwall2 installation
- Three Integration Modes - Cooperative, Integrated, and Override
- Smart DNS Sync - Synchronizes DNS-MNS optimized servers with Passwall
- Gaming Optimization - DNS recommendations based on Passwall’s proxy mode
- Backup & Restore - Safely backup and restore configurations
- UCI Integration - Native OpenWrt UCI configuration management
Architecture
Integration Modes
Cooperative Mode (Recommended)
In cooperative mode, DNS-MNS and Passwall work independently:- DNS-MNS handles DNS resolution with optimized servers
- Passwall handles proxy/VPN traffic routing
- Best for most users who want optimal performance
- DNS-MNS runs on port 5353 (or custom port)
- dnsmasq uses DNS-MNS as upstream DNS
- Passwall routes proxy traffic through its configured servers
- DNS queries and proxy traffic are handled separately
Integrated Mode
In integrated mode, DNS-MNS routes upstream queries through Passwall’s proxy:- Use case when DNS is blocked and needs to go through proxy tunnel
- Benefit bypasses DNS blocking in heavily restricted networks
- Trade-off may add slight latency
- DNS-MNS routes DNS queries through Passwall’s SOCKS proxy
- DNS queries go through the proxy tunnel
- Helps bypass DNS blocking and poisoning
Override Mode
In override mode, DNS-MNS takes over Passwall’s DNS configuration:- Use case when you want complete DNS control
- Benefit unified DNS management
- Trade-off Passwall’s built-in DNS is disabled
- Passwall’s DNS configuration is disabled
- DNS-MNS becomes the primary DNS handler
- All DNS queries go through DNS-MNS
Prerequisites
- OpenWrt 19.07+ with Passwall or Passwall2 installed
- DNS-MNS v6.5.0+ installed on router
- Passwall configured with at least one working proxy node
Installation
Step 1: Install DNS-MNS
Follow the OpenWrt Installation Guide to install DNS-MNS on your router.Step 2: Verify Passwall Installation
Step 3: Configure Integration
CLI Commands
Check Status
- Passwall variant (Passwall/Passwall2)
- Installation and running status
- DNS mode and filter mode
- Integration mode
- Recommendations
Configure Integration
Sync DNS Settings
Gaming Optimization
- Passwall’s current proxy mode
- Network conditions
- Gaming requirements
Restore Configuration
Interactive Menu
Access Passwall integration through the interactive menu:- Check Status - Show detailed Passwall integration status
- Configure Integration - Set up integration mode
- Gaming Optimization - Optimize DNS for gaming
- Sync DNS Settings - Sync with Passwall
- Restore Configuration - Restore original settings
Gaming with Passwall
Optimal Setup for Gaming
-
Configure Passwall in Game Mode (if available)
-
Use DNS-MNS Cooperative Mode
-
Apply Gaming DNS
Recommended DNS for Gaming
| Passwall Mode | Primary DNS | Secondary DNS | Notes |
|---|---|---|---|
| Game Mode | 10.202.10.10 | 178.22.122.100 | Direct DNS for low latency |
| Global Proxy | 1.1.1.1 | 8.8.8.8 | International DNS through proxy |
| GFW List | 178.22.122.100 | 1.1.1.1 | Mixed approach |
Troubleshooting
Passwall Not Detected
DNS Not Working After Configuration
Restore Original Configuration
Check Logs
Advanced Configuration
Custom DNS Servers
JSON Output
All commands support JSON output for scripting:Integration with Auto-Benchmarking
Enable auto-benchmarking to automatically update Passwall DNS:FAQ
Q: Which integration mode should I use?
A: For most users, Cooperative Mode is recommended:- Best performance
- DNS and proxy handled separately
- Lowest latency for gaming
- DNS is being blocked/poisoned
- You’re in a heavily restricted network
- You need DNS through proxy tunnel