The built-in firewall in Xiaomi devices is a two-way sword: on the one hand, it protects your smartphone or router from unauthorized access and network attacks, on the other hand, it can block legitimate applications, slow down the Internet connection or interfere with the work of the device. VPN. If youβre facing compatibility issues, traffic restriction, or just want to test a network without protection, turning off a firewall can be a solution.
However, before you deactivate this function, it is important to understand: on devices with MIUI 14+ HyperOS and disabling a system firewall through standard settings often results in its automatic turn on after a software reboot or update. In this article, we will analyze all available methods β from basic settings to hidden commands for experienced users, and also consider the specifics of working with Xiaomi Mi Router and Redmi Router routers.
What is a firewall on Xiaomi and why turn it off
A firewall (or firewall) in the Xiaomi ecosystem performs several key functions:
- π‘οΈ Blocking Inbound Connections β Protects against Port Scanning and Hacker Attacks.
- π± Control of application traffic β restricts background activity of programs (for example, advertising) SDK).
- π Filtering Network Packets β Blocks Suspicious Packets IP-address and domain.
- π Port forwarding management β relevant for routers when configuring servers or torrent clients.
The reasons for disconnection can be different:
- π« Applications (such as Torrent clients or Termux) cannot connect to the network.
- β‘ Slowing Internet connection due to excessive traffic filtering.
- π§ Necessity to test network services (e.g., a local web server).
- π Conflict with VPN Proxy servers (especially on HyperOS).
β οΈ Warning: Turning off firewalls on a permanent basis increases the risk of malware infection, especially if you connect to public Wi-Fi networks.
How to turn off firewall on Xiaomi smartphones (MIUI/HyperOS)
The way you shut down depends on the firmware version. MIUI 12 and HyperOS, the settings interface has changed, and some options have become hidden.
Method 1: Through standard security settings
This is the easiest method, but it doesnβt work on all models (for example, on Xiaomi 13 Pro with HyperOS, the option may not be available):
- Open Settings β Applications β Application Management.
- Slip on the three dots in the upper right corner and select Special Access.
- Go to Network Access (or Firewall on older versions) MIUI).
- Turn off the switch for the right app or globally for everyone.
If there is no Firewall, try an alternative route:
Settings β Memory β Three points β Special access β Network accessCheck the version. MIUI/HyperOS In Settings β The phone.
Make a backup copy of important data
Make sure there are no active network attacks on your device (check out Google Play Protect)
Remember the current network settings (screenshot Settings) β Wi-Fi)
-->
Method 2: Developer settings (for power users)
If the standard method didn't work, you can try turning off the firewall through the developer mode, which requires activating the hidden menu:
- Go to Settings. β The phone.
- Tap 7 times on the MIUI version (or HyperOS version).
- Return to the main settings and open additionally β For developers.
- Find the USB debugging option and turn it on.
- Connect your phone to your PC and use the command ADB: adb shell settings put global firewall_enabled 0
β οΈ Note: On some devices (e.g., Redmi Note 12 with HyperOS), this command may reset after rebooting.
What to do if ADB is not working?
Method 3: Disconnecting through the application "Security" (Mi Security)
On devices with MIUI 13 and below firewall can be controlled through the proprietary application Mi Security:
- Open the Security app (the shield icon).
- Go to Network or Network Protection.
- Slip on the firewall and turn off the protection for the desired applications.
- To completely disable, find the Global Firewall option and deactivate it.
On HyperOS, the Mi Security application may not be available, in which case use Method 1 or Method 2.
π‘
If after switching off the firewall the Internet began to work slower, check the settings DNS. Sometimes a firewall blocks unsafe systems. DNS-And when you shut it down, the traffic goes through the slow nodes. DNS from Google (8.8.8.8) or Cloudflare (1.1.1.1).
Disabling firewall on Xiaomi routers (Mi) Router/Redmi Router)
On Xiaomi routers, the firewall is integrated into the firmware and is turned on by default, and it may be necessary to turn off it to:
- π₯οΈ Port settings for game servers (e.g. Minecraft or Minecraft) CS:GO).
- π‘ Optimizing speed when using torrent clients.
- π Connecting devices with non-standard protocols (IP-cameras, smart home).
Instructions for standard firmware MiWiFi
To turn off the firewall on the router:
- Connect to the router network and open http://miwifi.com (or 192.168.31.1).
- Log in (the default login and password is often admin).
- Go to Additional Settings β Security β Firewall.
- Turn off the option to Enable Firewall and save settings.
On some models (for example, Xiaomi Mi Router) 4A Gigabit may be required:
Additional β Network settings β Firewall (SPI)Shutdown through SSH (Telnet-enabled firmware)
If the web interface does not allow you to disable the firewall, you can use it. SSH-This method is suitable for OpenWRT firmware or modified versions:
- Set up the connection to SSH (For example, through PuTTY or Termux: ssh root@192.168.31.1 The default password is admin or blank.
- Execute the command to disable: uci set firewall.@defaults[0].syn_flood='0' uci set firewall.@defaults[0].drop_invalid='0' uci commit /etc/init.d/firewall restart
β οΈ Warning: Disabling firewall on router through SSH It can disrupt parental controls and guest networks if you have set up restrictions on the user experience. MAC-Addresses will also need to be reconfigured.
| Model router | Supports disconnection through the web interface? | Whether required SSH shutdown? | Risk of losing stability |
|---|---|---|---|
| Xiaomi Mi Router 4C | Yes. | No. | Low. |
| Xiaomi Mi Router 4A Gigabit | Partially (only) SPI) | Yes. | Medium. |
| Xiaomi AX3600 | Yes. | No. | Low. |
| Redmi Router AC2100 | No. | Yes. | High-pitched |
What to do if the firewall itself turns on after a reboot
One of the most common problems with Xiaomi is that it automatically turns on the firewall after restarting or updating the system. MIUI/HyperOS, which are set to the default values.
Smartphone solutions
- π§ Use Tasker or MacroDroid to automatically shut down the firewall after booting. Create a task with the team ADB: settings put global firewall_enabled 0
- π± Install an alternative firewall (such as NetGuard or AFWall)+), This will only block selected applications.
- π Reverse to the old version MIUI, where the firewall was controlled more flexibly (e.g, MIUI 11).
Router solutions
- π₯οΈ Sweeve alternative firmware (such as OpenWRT or Padavan) where the firewall is configured flexibly.
- π Create a boot-up script in /etc/init.d/, which will turn off the firewall at each start.
- π Turn off automatic firmware updates to avoid resetting settings.
π‘
If the firewall turns on spontaneously, it's not a bug, it's a feature of HyperOS. The system considers the firewall disabled a potential threat and returns settings to a "safe" state, the only reliable solution is root access or custom firmware.
Risks of firewall shutdown and how to minimize them
Disabling protection opens your device to a number of threats, and here are the main risks and ways to mitigate them:
| Risk | Effects of consequences | How to minimize |
|---|---|---|
| Port scanning | Attackers can detect vulnerable services on your device. | Use it. VPN When Connecting to Public Networks. |
| DDoS attacks on routers | Network overload and internet shutdown. | Set up a speed limit for incoming connections. |
| Malware | Trojans and spyware can get into the system. | Install an antivirus (such as Malwarebytes or Bitdefender). |
| Data breach | Applications may send personal information without your knowledge. | Regularly check the permissions of applications in Settings β Annexes. |
If you have disabled the firewall temporarily (for example, to set up a server), it is recommended that:
- π Turn it back on immediately after completion of the work.
- π Check for suspicious activity through Fing or Wireshark.
- π Create a separate guest network on a router for unsafe devices.
Alternatives to a complete firewall shutdown
In most cases, you don't have to turn off the protection completely, you just have to adjust it to your own needs. Here are some alternatives:
1. Add exceptions for specific applications
Instead of a global shutdown, only the right programs can be allowed to access:
- Open Settings β Applications β Application Management.
- Select an app (such as uTorrent or Termux).
- Go to Permits. β Network access.
- Allow background data transfer and disable firewall restrictions.
2. Set up port forwarding on the router
If the problem is blocking ports (for example, for a game server), instead of turning off the firewall:
- Open the routerβs web interface (miwifi.com).
- Go to the Supplementary β Port forwarding (port forwarding).
- Add a rule for the desired port (for example, TCP 25565 for Minecraft).
- Link the rule to the local IP-address.
3.Use VPN split-tunneled
Some of them VPN (For example, ProtonVPN or Windscribe allow you to choose which applications will use a secure connection and which will bypass it, which will help avoid conflicts with the firewall.
1. Energize the aircraft mode.
2 Manually turn on Wi-Fi or mobile data.
3. the firewall will be deactivated until the next restart or turn on / off the network.
-->