Dnsmasq service on Xiaomi devices is built-in DNS-proxy DHCP-A server that automatically manages network requests, which for most users is invisible, but in some cases can cause conflicts with the Internet. VPN, It's a problem that's particularly important for Mi Router routers, Mi TVs, and other users of Mi Routers. TV and firmware smartphones MIUI/HyperOS, where dnsmasq is integrated into system services.
In this article, weβll look at all the possible ways to disable dnsmasq on Xiaomi devices, from standard settings to manually editing configuration files. You'll learn how to determine if a service is working on your device, what risks it poses to deactivate, and how to get it back if something goes wrong. 2026 Years and tested on Xiaomi Router models 4A/4C/AX3600, Mi TV Q2/Q1E and Redmi Note smartphones 12/POCO X5.
1.Why disable dnsmasq on Xiaomi?
Before we get to the instructions, it is important to understand when it is necessary to disable dnsmasq. This service has two key functions:
- π Caching DNS-query speeds up re-opening of sites, but can lead to outdated entries (for example, after a change of site). IP hosting).
- π‘ Local distribution DNS β Redirects requests within the network, which sometimes conflicts with user settings (for example, when using Pi-hole or AdGuard Home).
The main reasons for disconnection:
- β‘ Conflicts with VPN β DNSMASQ can be ignored DNS server VPN, revealing IP.
- π« Website Blocking β Some Xiaomi firmwares embed filtering of βunwantedβ content in dnsmasq (especially relevant for Chinese versions of devices).
- π’ Slowing down the internet on weak routers (e.g. Mi Router) 3G) dnsmasq can consume up to 20% CPU.
- π§ Configuring alternatives DNS β If you are using Cloudflare (1.1.1.1) or Google DNS (8.8.8.8) but the requests are still via dnsmasq.
β οΈ Note: Disabling dnsmasq on Xiaomi routers may result in loss of access to local hosts (e.g. miwifi.com for router management). IP-address!
Before you start to shut down, check if the problem is really related to dnsmasq.
- Connect to the device on SSH (for routers or use ADB (for smartphones/TV).
- Follow the command: ps | grep dnsmasq
- If the process is active, you will see a line like /usr/sbin/dnsmasq -x /var/run/dnsmasq.pid.
2. disable dnsmasq on Xiaomi routers (Mi Router, AX-series)
On routers, Xiaomi dnsmasq starts automatically at the start of the system and is responsible for the distribution IP-address (DHCP) processing DNS-You can turn it off in a number of ways, from just turning it off. DHCP until the service is completely removed.
Method 1: Disconnection DHCP-server (without server) SSH)
If you only need to stop giving out IP-addresses, but leave DNS-caching:
- Open the router's web interface at the address http://miwifi.com (or 192.168.31.1).
- Go to Settings β Local Network β DHCP.
- Turn off the "Enable" option. DHCP-server".
- Save the settings and restart the router.
This method does not completely disable dnsmasq, but it stops its main activity. ~5-10 MB RAM.
Method 2: Completely shut down through SSH (power-user)
Full deactivation will require access to SSH. On New Firmware (2023)+) SSH Deactivated by default β it must be activated first.
Turn on SSH via the web interface (Settings) β Additionally. β SSH)
Install Putty (Windows) or use Terminal (Mac/Linux)
Download a backup copy of the configuration (/etc/config/dhcp)
Prepare an alternative DNS-server (e.g. 1.1.1.1)-->
Instructions:
- Connect to the router on SSH: ssh root@192.168.31.1 The default password is your networkβs admin password (if you havenβt changed it).
- Stop the service: /etc/init.d/dnsmasq stop
- Turn off autostart: /etc/init.d/dnsmasq disable
- Delete the configuration file (optional): mv /etc/config/dhcp /etc/config/dhcp.bak
- Restart router: reboot
After this, dnsmasq will stop running. However, managing the router via miwifi.com will become impossible - use it. IP-address (192.168.31.1).
β οΈ Attention: On routers with MiWiFi firmware R3P And a new disabling of dnsmasq can cause a failure in parental control and guest network!
| Model router | Supports dnsmasq shutdown? | Risks. | Alternative method |
|---|---|---|---|
| Xiaomi Router 4A/4C | Yes (via SSH) | Loss of access to miwifi.com | Use hosts for redirection |
| Mi Router AX3600/AX6000 | Yes (root rights) | Failure IPTV misaligned | Configure Stubby for DNS-over-TLS |
| Mi Router Mini | Partially (only) DHCP) | Unstable Wi-Fi operation | Update the firmware to the latest version |
3. disable dnsmasq on Xiaomi TVs (Mi) TV, Redmi Smart TV)
On TVs, Xiaomi dnsmasq is used to process network requests for applications and advertising services. It is more difficult to turn it off than on routers, since the Android system is used to process network requests for applications and advertising services. TV It restricts access to system files, but there are workarounds.
Method 1: Through ADB (without root)
If you do not have superuser rights, you can temporarily stop the service:
- Turn on the debugging. USB In the settings of the TV: Settings β On TV. β POS version β Click 7 times on "Version of the Software".
- Get on TV. ADB: adb connect [IP-TV address IP You can set up β Network)
- Stop dnsmasq: adb shell su -c"pkill dnsmasq" Note: After the reboot, the service will start again.
Method 2: Completely shut down via Magisk (root required)
Permanent shutdown will require:
- Install Magisk on your TV (see the forum for instructions for a specific model) 4PDA).
- Install Systemless Hosts or Disable Services.
- Add to the blacklist the service dnsmasq.
- Reset the device.
On Mi TVs. TV Q2/Q1E dnsmasq is also responsible for Chromecast and Google Assistant:
- β Loss of the ability to broadcast from the phone (Miracast/Google Cast).
- β Errors in Netflix, YouTube apps (DNS-mistake).
- β Failures in the operation of the remote with voice control.
π‘
If after disabling dnsmasq stopped working streaming services, try manually prescribe DNS Google (8.8.8.8) or Cloudflare (1.1.1.1) in the settings of the TV network.
4. Disabling dnsmasq on Xiaomi smartphones (MIUI/HyperOS)
On smartphones Xiaomi, Redmi and POCO dnsmasq is built into the netd system service and is responsible for processing. VPN It's impossible to completely shut it down without root rights, but you can limit its impact.
Method 1: Change settings VPN (roundabout DNS)
If dnsmasq is ignored DNS yours VPN:
- Open the Settings. β SIM-maps and mobile networks β Access point (APN).
- Choose yours. SIM-map and change the parameters APN:
- Add the lines: dns1=8.8.8.8 dns2=1.1.1.1
- Save and restart the phone.
Method 2: Use of alternatives DNS via
Install one of the applications for forced change DNS:
- π‘οΈ 1.1.1.1 (Cloudflare) - Simple interface, supports DNS-over-HTTPS.
- π DNS Changer β allows you to choose any public DNS.
- π AdGuard β Blocks Advertising and Redirects DNS.
These applications create local VPN-tunnel bypassing the system dnsmasq.
β οΈ Note: On smartphones with HyperOS (2026)+) attempt to disable dnsmasq via ADB or root can cause Mi Protect protection to go off and lock the device. β Memory. β Device protection.
What happens if you delete dnsmasq on your smartphone?
5. Checking the result: how to make sure that dnsmasq is turned off
After the instructions are followed, check if the service is actually deactivated.
Method 1: Command line (SSH/ADB)
Follow the command:
ps -ef | grep dnsmasqIf you don't find the process, the service is disabled. If you see a line like, /system/bin/dnsmasq --conf-file=..., So dnsmasq still works.
Method 2: Verification DNS-request
Use nslookup or dig for the test:
nslookup google.comIf your response indicates your alternative DNS (e.g. 1.1.1.1), so dnsmasq does not interfere with requests.
Method 3: Traffic monitoring
Install the app βNetGuardβ (Android) or βWiresharkβ (PC) and check where they go DNS-If you see traffic to port 53 from the address 192.168.x.1 (Your router: Dnsmasq is still active.
| The device | Team to check | Expected output |
|---|---|---|
| router (SSH) | netstat -tulnp | grep dnsmasq | No withdrawal (process stopped) |
| Television (ADB) | getprop | grep dns | DNS-The servers are in accordance with your settings |
| Smartphone (Termux) | iptables -L -n | grep dnsmasq | There are no rules mentioning dnsmasq |
Possible problems and solutions
Disabling dnsmasq can have unexpected consequences, and here are the most common problems and ways to fix them:
Problem 1: No access to miwifi.com (router)
Solution: Add the record to the file /etc/hosts:
192.168.31.1 miwifi.com
192.168.31.1 www.miwifi.comProblem 2: It doesn't work. IPTV after disabling dnsmasq
Solution: Set up manually IGMP Proxy:
iptables -t mangle -A PREROUTING -i br-lan -d 224.0.0.0/4 -j TTL --ttl-set 2Problem 3: The smartphone is not connected to the VPN
Solution: Install the βOpenVPN for Androidβ app and add:
block-outside-dns
dhcp-option DNS 8.8.8.8Problem 4: The TV can't find local devices (DLNA)
Solution: Turn on mDNS manually:
adb shell settings put global mdns_enabled 1π‘
If you have lost your internet after disabling dnsmasq, check your settings. DHCP It's on the router. It's possible that the devices are not getting IP-- Addresses, temporarily switch on DHCP back or assign static IP manually.
7. Alternatives to dnsmasq: what to use instead
If you have disabled the dnsmasq, but need to DNS-Caching or local name resolution, consider the following alternatives:
For routers:
- π Unbound - recursive DNS-server DNSSEC.
- π‘οΈ Pi-hole β an ad blocker with its own DNS-server.
- π Stubby β Implementing DNS-over-TLS for secure queries.
For Android devices:
- π± DNS66 β Ad-blocker with user support DNS.
- π Intra β DNS-over-HTTPS from Cloudflare.
- π Blokada is a universal blocker with VPN-regime.
To install alternatives on the router, use Entware (package manager for embedded systems). For example, install Unbound:
opkg update
opkg install unbound