How to open ports on the Xiaomi router: full instructions with pictures and tips

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).
πŸ“Š What model of Xiaomi router you use?
Mi Router 4/4A
Mi Router 5/5G
AX1800/AX3000/AX3600
AIoT Router AC2350
Another model

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:

  1. 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 routerThe path to settingsFeatures
Mi Router 4AAdvanced β†’ NAT Forwarding β†’ Port ForwardingIt supports up to 20 rules, and Chinese firmware may require an update.
Mi Router AX3600Settings β†’ Internet β†’ Port ForwardingThere is a separate partition for DMZ. Supports IPv6.
AIoT Router AC2350Advanced β†’ Firewall β†’ Port ForwardingIt can conflict with the built-in antivirus (disable it before setting up).
Mi Router 3G/4GOnly through the Mi Wi-Fi appThe 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?

  1. 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:

  1. Go to Advanced β†’ NAT Forwarding β†’ DMZ.
  2. Turn on the DMZ Host and specify the static IP device.
  3. 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 outsideCG-NAT from a provider or dual NATRequest a white IP or use a VPN
The rule is maintained but not appliedConflict with UPnP or FirewallDisable UPnP, restart router
You can't keep the rule (Chinese firmware)Requires a link to Mi AccountSign in to the application or flash the global version
The port opens, but the connection is cut off.MTU fragmentation or NAT problemsReduce MTU to 1472 in WAN settings
Web interface not available after port 80 is droppedConflict with the router control portChange the port of the web interface to 8080 in Settings β†’ Management
πŸ”Ή Why is the port closed after the transfer?
There are several reasons: Provider blocks incoming connections (CG-NAT). Check your IP on 2ip.ru β€” if it's gray, the dash will not work. Device does not listen to the port. Check locally using netstat -ano | findstr PORT (Windows) or ss-tulnp | grep PORT (Linux). Conflict with UPnP. Disable UPnP in the router settings and resave the rule.
πŸ”Ή How to open a port for a torrent client (qBittorrent, uTorrent)?
Torrents require a TCP port (usually in the range of 6881–6889 or random). Instructions: In the torrent client, find the port settings (in qBittorrent: Tools β†’ Options β†’ Connection). Assign a static IP PC in the router settings. Create a pass rule for the selected port (TCP protocol). Enable UPnP in the client and router (or manually configure the port on PortCheckTool.
πŸ”Ή Can I open a port on Xiaomi without static? IP?
Technically yes, but: The rollover rule will reset when updated DHCP-- Rental (every 24 hours) - External devices will not be able to connect because the local device is not connected. IP The solution is: use it. DDNS (For example, No-IP or built-in router Dynamic DNS) + script IP device-wise.
πŸ”Ή How to open port 80 for a web server?
Port 80 conflicts with the router's web interface. Options: Change the web interface port to 8080 in Settings β†’ Management β†’ Web Management Port. Use a different port for the server (e.g., 8080) and configure the dashboard. Disable the web interface from the outside (not recommended for security reasons).
πŸ”Ή Why After Updating the Firmware Stopped Working?
Xiaomi sometimes resets Port Forwarding settings after updates.What to do: Check if static resets IP Restore the pass rule. If the option is gone, roll back the firmware or install an alternative (Padavan (AX3600) post-update MIWIFI_R3600_firmware_... squirting UDP-The solution is to manually specify the protocol. TCP+UDP rule-of-law.