How to completely disable dnsmasq on Xiaomi devices: 5 proven methods

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.

  1. Connect to the device on SSH (for routers or use ADB (for smartphones/TV).
  2. Follow the command: ps | grep dnsmasq
  3. If the process is active, you will see a line like /usr/sbin/dnsmasq -x /var/run/dnsmasq.pid.
πŸ“Š What kind of Xiaomi device are you using?
Router (Mi Router, AX-series)
TV (Mi TV, Redmi Smart TV)
Smartphone (MIUI/HyperOS)
Smart speaker (Mi AI Speaker)
Other

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:

  1. Open the router's web interface at the address http://miwifi.com (or 192.168.31.1).
  2. Go to Settings β†’ Local Network β†’ DHCP.
  3. Turn off the "Enable" option. DHCP-server".
  4. 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:

  1. 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).
  2. Stop the service: /etc/init.d/dnsmasq stop
  3. Turn off autostart: /etc/init.d/dnsmasq disable
  4. Delete the configuration file (optional): mv /etc/config/dhcp /etc/config/dhcp.bak
  5. 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 routerSupports dnsmasq shutdown?Risks.Alternative method
Xiaomi Router 4A/4CYes (via SSH)Loss of access to miwifi.comUse hosts for redirection
Mi Router AX3600/AX6000Yes (root rights)Failure IPTV misalignedConfigure Stubby for DNS-over-TLS
Mi Router MiniPartially (only) DHCP)Unstable Wi-Fi operationUpdate 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:

  1. Turn on the debugging. USB In the settings of the TV: Settings β†’ On TV. β†’ POS version β†’ Click 7 times on "Version of the Software".
  2. Get on TV. ADB: adb connect [IP-TV address IP You can set up β†’ Network)
  3. 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:

  1. Install Magisk on your TV (see the forum for instructions for a specific model) 4PDA).
  2. Install Systemless Hosts or Disable Services.
  3. Add to the blacklist the service dnsmasq.
  4. 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:

  1. Open the Settings. β†’ SIM-maps and mobile networks β†’ Access point (APN).
  2. Choose yours. SIM-map and change the parameters APN:
  3. Add the lines: dns1=8.8.8.8 dns2=1.1.1.1
  4. 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?
On smartphones, Xiaomi dnsmasq is closely integrated with system services connectivity and vpn. its removal can lead to: - Loss of mobile Internet (will not be determined). APN). - Inability to connect to VPN (including the built-in Mi VPN). - Mi Share (Wi-Fi Direct) - Errors when using Dual Apps (app cloning) can only be restored by flashing or resetting to factory settings.

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 dnsmasq

If 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.com

If 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 deviceTeam to checkExpected output
router (SSH)netstat -tulnp | grep dnsmasqNo withdrawal (process stopped)
Television (ADB)getprop | grep dnsDNS-The servers are in accordance with your settings
Smartphone (Termux)iptables -L -n | grep dnsmasqThere 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.com

Problem 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 2

Problem 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.8

Problem 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

FAQ: Frequent questions about disabling dnsmasq on Xiaomi

❓ Can you disable dnsmasq without root rights on your smartphone?
No, you can't completely disable dnsmasq without root, because it's a system process. DNS (for example, 1.1.1.1). Disable automatic receipt DNS customized Wi-Fi/mobile network. VPN own DNS-These methods don't disable dnsmasq, but they minimize its impact.
❓ After disabling dnsmasq, some sites on the router stopped working?
Most likely, dnsmasq was used to forward requests to Chinese servers (relevant for firmware with regional restrictions).Solutions: Check if your new one is blocking your new one. DNS-server specific domains (e.g. mi.com) Add problem domains to /etc/hosts rightly IP. Temporarily return dnsmasq and export its cache for analysis: cat /var/lib/misc/dnsmasq.leases
❓ How to return dnsmasq if something goes wrong?
Recovery methods depend on the device: Router: Follow /etc/init.d/dnsmasq enable and reboot. TV: Reset your network settings or reflash your device through ADB Smartphone: Reset to factory settings or reflash through Fastboot. If dnsmasq was physically removed (e.g., via rm), you will need to flash it back.
❓ Why traffic consumption increased after DNSMASQ was turned off?
Dnsmasq caches DNS-Without it, every request to a domain (e.g., google.com) is sent directly to an external domain. DNS-server that can increase traffic to 5-15%. Solutions: Install an alternative caching DNS (Use DNS-over-HTTPS (DoH) to reduce the volume of requests. Set up local cache in applications like AdGuard Home.
❓ Can you turn off dnsmasq on Xiaomi Mi Box or Mi Stick?
On the Mi Box S and Mi TV Stick dnsmasq is built into the firmware at the core level, and you can only turn it off completely through: Getting root rights (for example, through Magisk); Install custom firmware (for example, LineageOS); Use ADB For temporary stop: adb shell su -c"mount -o rw,remount /system" adb shell su -c"mv /system/bin/dnsmasq /system/bin/dnsmasq.bak" Note: on these devices, dnsmasq is also managed by Google Cast, so turning it off could disrupt YouTube and Netflix.