Skip to content
Contents
GuidesOpenWrt

Smart plug offline after DNS filtering? Allow one hostname for one client

Check wireless association, local control and cloud access, then add and remove a client-specific DNS exception to test the cause.

The physical button still works, but the app shows the smart plug as offline. Check whether the plug is associated with the wireless access point. Then try a local control on the home network and a remote action in the app. If the wireless link has dropped, restore it first. If only cloud control fails, check the names used for sign-in and heartbeat traffic.

Find the blocked request during one reconnect

Find the plug’s lease in OpenWrt and note its IP address and the time. Filter the AdGuard Home query log by that client. Refresh the device status or reconnect the plug once. Open a blocked entry at that time and check the hostname, query type and matched rule. If there is no entry, check IPv6, another resolver and cached answers. The phone running the app may have made the request itself.

If every device appears under the same dnsmasq address, first arrange for the resolver to identify individual clients. An exception for that shared address affects several devices. If the phone made the failed query, investigate the phone.

Add a client exception and test its removal

Reserve a stable address for the identified client. In AdGuard Home, open Filters → Custom filtering rules and add a client-specific exception such as @@||login.vendor.example^$client=192.168.1.42. Substitute the observed hostname and the device’s IP address. The domain anchor also matches subdomains, so use the most specific service name available.

The allowed client resolves the test name and returns to NXDOMAIN after the exception is removed

In the virtual lab, 192.168.71.10 received 192.0.2.48 while another client still received NXDOMAIN. Removing the exception blocked the first client again. Check the actual plug with the cloud action below.

Wait for the cached negative answer to expire or reconnect the device normally. Retry the failed cloud action and check whether the new query matches the exception and the plug comes online. A second filtered client should still be blocked. Remove the exception temporarily and repeat. Keep the rule if allowing the name restores service and removing it reproduces the failure. If DNS now works but the device remains offline, restore the initial rules and check its clock, TLS and cloud service. How to test an AdGuard Home tracker rule on one phone and keep logins working

Allow one client and then remove the exception

The recording shows a real SSH session on an isolated OpenWrt router followed by the same DNS query from a LAN client. English narration includes English and Chinese subtitles.

Run the commands only on a disposable test instance. The router is 192.168.71.1. Its management API listens on loopback port 15865 and its DNS service uses port 15866. The test upstream has an A record for login.sample.test. The only initial custom rule blocks that name. The set_rules call replaces every custom rule. On your home instance, edit just one line in the web interface.

Add the exception in the lab router’s SSH session and query from loopback as a control.

post() {
  wget -qO- --header='Content-Type: application/json' --post-data="$1" \
    http://127.0.0.1:15865/control/filtering/set_rules
}
post '{"rules":["||login.sample.test^","@@||login.sample.test^$client=192.168.71.10"]}'
nslookup -type=A login.sample.test 127.0.0.1:15866

Exit SSH and run the following query on the lab client at 192.168.71.10. Log back into the lab router, define the post function again and restore the original block rule with post '{"rules":["||login.sample.test^"]}'. Repeat the same client query. The A record should change back to NXDOMAIN.

dig -b 192.168.71.10 @192.168.71.1 -p 15866 login.sample.test A +noall +comments +answer

Reference

Reference

Check the model, region and hardware revision on the label before selecting firmware.

Explore hardware

Comments