Service eligibility and regional restrictions
PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.
Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.
Key Takeaways
- The system dnsmasq can still listen on port 53 while forwarding requests to a local 7874 port with no listener.
- Check the effective dnsmasq configuration, OpenClash processes and the actual 7874 listener; a status page alone does not prove DNS handling works.
- Only when you choose system upstream DNS, back up the configuration and remove the exact broken 7874 entry. Do not clear unrelated upstreams.
- Verify resolution and web access from both the router and a LAN client. Router-only DNS success does not prove the LAN is fully restored.
Define the fault boundary: A listener on 53 does not prove the DNS path is complete
On an OpenWrt, KWRT or other dnsmasq-based router, a client may stay connected to Wi-Fi while name lookups time out. Start with the DNS forwarding path. A common layout sends the client query to dnsmasq on the router, which then forwards it to OpenClash's local DNS port. A listener on port 53 proves only that the first hop can receive a query. If dnsmasq still forwards to port 7874 with no process listening there, the query can still time out.
Separate the two valid operating modes: let OpenClash handle DNS, or let dnsmasq use the system upstream resolver. The first requires OpenClash to start successfully and its configured DNS port to be listening. The second requires a usable system upstream. Do not leave a forced local-port forward in place after OpenClash stops, and do not assume a status page has removed it.
Read-only checks: inspect the forward, processes and listener
The uci show command reports saved dnsmasq UCI values; netstat and ps show current listeners and processes, but these alone do not prove that the running dnsmasq instance loaded the forward. Use the PID listening on port 53 to identify its command line, then find the active generated config from that process's -C/--conf-file argument and check the exact server= entry. If the build uses another runtime-config mechanism, use its supported check; do not make the change below until the active configuration is confirmed.
If the expected OpenClash process is listening on 7874, inspect its DNS settings, process health and active config instead of applying the direct-DNS change. If nothing listens there, consider the limited change in the next section only when both saved UCI and the active generated config for that dnsmasq instance confirm the exact local forward to that port.
Inspect the current DNS path
shuci -q show dhcp.@dnsmasq[0]
netstat -lnp 2>/dev/null | grep -E ':(53|7874)([[:space:]]|$)'
ps w | grep -E '[o]penclash|[c]lash|[m]ihomo'
DNSMASQ_PID='REPLACE_WITH_PID_LISTENING_ON_53'
ps w | awk -v p="$DNSMASQ_PID" '$1 == p { print; found=1 } END { if (!found) exit 1 }'
RUNTIME_CONFIG='REPLACE_WITH_ACTIVE_CONFIG_PATH_FROM_THIS_DNSMASQ_PROCESS'
EXPECTED_FORWARD='REPLACE_WITH_EXACT_SERVER_TARGET#7874'
grep -nF "$EXPECTED_FORWARD" "$RUNTIME_CONFIG"
Conditional recovery: remove only the confirmed broken 7874 forward
Consider the temporary change only after confirming that port 7874 has no expected listener, the saved UCI contains the exact forward, and the active dnsmasq generated config also shows the same server=target#7874 entry. If UCI and runtime config differ, determine when the config was loaded or whether another instance manages it; do not edit based on the saved value alone.
The command commits persistent DHCP/DNS settings and attempts to restart dnsmasq. It prints the backup filename before the restart. Even if the service script returns success, separately inspect the active generated config and verify resolution from a LAN client. A nonzero restart result is reported and returned as the command exit status; a committed setting is not proof that it became active.
Back up, then remove one broken forward
shBROKEN='<BROKEN_DNS_TARGET>#7874'
BACKUP="/root/dhcp.before-openclash-dns-$(date +%Y%m%d-%H%M%S)"
test ! -e "$BACKUP" || exit 1
cp -p /etc/config/dhcp "$BACKUP" || exit 1
printf 'Backup: %s\n' "$BACKUP"
uci set dhcp.@dnsmasq[0].noresolv='0' || exit 1
uci -q del_list dhcp.@dnsmasq[0].server="$BROKEN" || exit 1
uci commit dhcp || exit 1
if /etc/init.d/dnsmasq restart; then
printf 'dnsmasq restart command returned success; verify the active config and LAN DNS separately\n'
else
RESTART_STATUS=$?
printf 'dnsmasq restart failed (exit %s); do not assume the new config is active\n' "$RESTART_STATUS" >&2
exit "$RESTART_STATUS"
fi
Roll back the DHCP/DNS configuration
shBACKUP='/root/dhcp.before-openclash-dns-REPLACE_WITH_PRINTED_TIMESTAMP'
test -f "$BACKUP" || exit 1
cp -p "$BACKUP" /etc/config/dhcp && /etc/init.d/dnsmasq restart
If you still need OpenClash DNS: restore its listener before the forward
If the network relies on OpenClash rules for client DNS, do not treat direct DNS as the final configuration. First confirm from a local console or reliable management connection that OpenClash starts. Check that the expected port gains a listener, then review logs for configuration-read, startup or port-conflict errors. Restore the dnsmasq forward only after the proxy core and DNS service are actually ready.
A running plug-in status, a core process and a DNS listener are different pieces of evidence. A process can run without binding its DNS port, or the port can belong to the wrong instance. Do not switch DNS mode, replace subscriptions and restart networking all at once. If OpenClash cannot start, keep direct resolution as a temporary fallback and diagnose the plug-in log or configuration separately.
Verification must include a router and a LAN client
After a change, query a permitted ordinary domain from the router itself, then renew a LAN client's DNS configuration and query the same domain there. From that client, also open a safe HTTPS site and record whether resolution succeeded, whether a connection was established and which layer failed. A successful DNS query with a failed web connection means you still need to inspect routing, transparent-proxy rules or WAN access; it does not mean the whole network is restored.
Recheck that dnsmasq still listens on 53, that its current forwarding target matches the selected mode, and that stopping OpenClash does not leave a 7874 forward with no listener. For proxy DNS, the expected process must own the target port. For system DNS, confirm that the router has a usable resolver source. Do not publish real network addresses, subscription data or complete router logs during verification.
Completion criteria, limits and rollback
A complete troubleshooting result needs two kinds of evidence: the router's DNS configuration matches the intended path, and a LAN client can resolve names and reach the required website. If only the router shell resolves a name, do not describe the LAN as fixed. OpenWrt variants, dnsmasq instances, OpenClash settings and local networks can use different upstream files and listener addresses. Port 7874 is a condition to verify in the actual configuration, not a universal requirement.
If resolution worsens, router management is lost or upstream DNS is unavailable, restore /etc/config/dhcp from the saved file and restart dnsmasq; use a local management path if needed. Keep the backup until a LAN client passes verification. If OpenClash remains unhealthy, direct DNS only bypasses an unready proxy-DNS forward; it does not prove the plug-in startup problem is solved.
Sources
Frequently Asked Questions
Why can DNS time out while dnsmasq listens on port 53?
Port 53 proves dnsmasq received the query. If it forwards that request to local port 7874 with no process listening, the next hop can still time out. Check the configured forward and its listener together.
Should I delete every dnsmasq server entry?
Not as a general fix. Only if you chose system upstream DNS and confirmed a specific broken 7874 forward, remove that exact value. Keep other upstream settings and back up the configuration first.
How do I know OpenClash is handling DNS?
Beyond the plug-in status, confirm that the core process, configured DNS port and actual listener agree. If the expected service is not listening, do not force dnsmasq to forward there.
Does router-side name resolution mean every Wi-Fi client is back online?
No. Check DNS settings, resolution and web access on at least one LAN client. Router-only success does not prove DHCP, wireless or client proxy paths are healthy.