Why you canβt open ports on Xiaomi and where to start
You try to set up remote camera access, run a game server, or connect to a torrent tracker, but Xiaomi router blocks incoming connections? Port forwarding is standard, but on Mi Router devices it has nuances. The main problem for users is that even after setting up a rule in the web interface, the port remains closed. In 90% of cases, three things are to blame: an incorrectly assigned local IP, a conflict with UPnP or a lock at the provider level.
This article is not a universal guide for kettles, but a thorough analysis of the features of Xiaomi firmware (including global and Chinese versions).We will go all the way from network preparation to external port verification. If you use Mi Router 4A Gigabit, AX3600 or AIoT Router AC2350, look at the sections about DMZ and dual NAT - these are frequent pitfalls.
Before you start, answer three questions:
- πΉ What? IP-address of the device for which you open the port? (If dynamic - the rule will stop working after restarting the router).
- πΉ Do you have white? IP (Without it, external connections are impossible, even with the correct pass-through).
- πΉ What firmware does the router use? (Chinese versions may not have port settings menu).
Step 1: Preparing the network β without it, port transfer will not work
Many users jump right into Port Forwarding settings, but forget about the basics. On Xiaomi routers with firmware older than 2021, port rolling will not work if the device receives IP over DHCP - the rule will simply "fly" after the address rental update. So the first step is to assign a static IP to the target device (PC, camera, server).
This can be done in two ways:
- Through router settings (recommended):
Manually on the device.
- π₯οΈ On Windows: Control Panel β Network and Internet β Network control centre β Change of adapter parameters β Properties IPv4.
- π§ On Linux: edit /etc/network/interfaces Or use nmcli.
- π Use a different browser (recommended Firefox or Edge).
- π Shut down. VPN/proxy.
- π± Connect from your phone over Wi-Fi (sometimes the lock only works for PCs).
- π§ Reset the router with the Reset button (hold 10 seconds) if you have previously changed your security settings.
Sign in with your admin login and password from the sticker on the router.
- π New models (AX3600, AIoT Router β Password can match Wi-Fi password.
- π Check the documentation β some routers (Mi Router 3) require a link to a Mi Account.
- Save the rule and restart the router.
For Chinese Firmware (translation required)
In the Chinese versions (Mi Router 4C CN, AX1800 CN), the menu is called (Redirect Rules).
- π Fields can be in Chinese - use a translator or focus on the order of fields.
- π Some firmware blocks saving rules without binding to your Mi Account.
| Model router | The path to settings | Features |
|---|---|---|
| Mi Router 4A | Advanced β NAT Forwarding β Port Forwarding | It supports up to 20 rules, and Chinese firmware may require an update. |
| Mi Router AX3600 | Settings β Internet β Port Forwarding | There is a separate partition for DMZ. Supports IPv6. |
| AIoT Router AC2350 | Advanced β Firewall β Port Forwarding | It can conflict with the built-in antivirus (disable it before setting up). |
| Mi Router 3G/4G | Only through the Mi Wi-Fi app | The spread only works with white IP (check through 2ip.ru). |
Static appointment IP target-device|The port does not conflict with other rules.|Protocol (TCP/UDP) chosen|The external and internal ports are the same (unless you need to mask)|Xiaomiβs built-in firewall is disabled (if any)-->
Step 4: Checking an Open Port β Why It May Not Work
You kept the rule, but the port is still closed?
- Check the local connection:
If the connection does not work locally, the problem is in the settings of the service, not in the router.
Check external access
- π Use YouGetSignal or PortChecker services.
- π± Specify the port and run the check. If the port is closed, proceed to step 3.
Typical causes of non-working pass:
- π« Double. NAT: Your provider uses the second level. NAT (Check out whatismyip.com if you IP It's the same as the local, it's your case. IP from the provider DMZ.
- π₯ Firewall on your device: on Windows, disable Windows Defender for test port, on Linux, check iptables.
- π UPnP conflict: If UPnP is enabled, it can automatically overwrite your rules. β UPnP.
π‘
If your routerβs external IP starts at 100.64, this is a sign of CG-NAT (Carrier-Grade NAT) from the provider, in which case it is impossible to open ports without additional services (for example, βStatic IPβ from Rostelecom or Beeline).
Step 5: Alternative methods β if port rollovers donβt help
If the standard Port Forwarding doesnβt work, Xiaomi has two backup options:
1. DMZ (Demilitarized Zone) setting
DMZ redirects all the external ports to one device on the LAN, which is less secure, but sometimes the only way to work is to configure:
- Go to Advanced β NAT Forwarding β DMZ.
- Turn on the DMZ Host and specify the static IP device.
- Save and restart the router.
β οΈ Attention: DMZ expose all the ports of the device to the Internet. Don't use this method for PCs with sensitive data, just servers or cameras with updated software.
2.Using a VPN with port forwarding
If the provider blocks incoming connections (CG-NAT), the alternative is to rent a white IP VPS and configure a reverse proxy (e.g. via NGINX or Cloudflare Tunnel).
- π The device in the local network is connected to VPS down OpenVPN/WireGuard.
- π Nana VPS Configures the transfer of ports to the local device.
- π External connections are coming to IP VPS, Not your home address.
Services will be suitable for implementation:
- π» Oracle Cloud Free Tier (Free) VPS).
- π Cloudflare Tunnel (No White Requirement) IP).
Step 6: Security β How to Keep Hackers Out
Open ports are a potential vulnerability.
- π Use non-standard ports instead of 22 (SSH) 3389 (RDP) Choose 2222, 48956, etc.
- π‘οΈ Restrict access by IP: In the squash rule, specify the permitted IP (if they're static).
- π Update the software on the device you are opening the port to (especially if it is a camera or a camera) NAS).
- π‘ Turn off the airbrush when it is not needed (for example, after playing on the server).
To check the security, use the following services:
- π Shodan β Shows you which ports are yours IP visible.
- π‘οΈ GRC ShieldsUP! β testing vulnerabilities in open ports.
β οΈ Note: Xiaomi routers with firmware until 2020 had a vulnerability that allows you to remotely execute code through the open port 80. If your model is older, update the firmware or disable the web interface from the outside.
Frequent mistakes and their solutions
We've got a top.-5 Problems faced by Xiaomi users when rolling ports:
| Mistake. | Reason. | Decision |
|---|---|---|
| The port is open locally, but not outside | CG-NAT from a provider or dual NAT | Request a white IP or use a VPN |
| The rule is maintained but not applied | Conflict with UPnP or Firewall | Disable UPnP, restart router |
| You can't keep the rule (Chinese firmware) | Requires a link to Mi Account | Sign in to the application or flash the global version |
| The port opens, but the connection is cut off. | MTU fragmentation or NAT problems | Reduce MTU to 1472 in WAN settings |
| Web interface not available after port 80 is dropped | Conflict with the router control port | Change the port of the web interface to 8080 in Settings β Management |