Opening ports on a Xiaomi router is a necessary procedure for gamers, server administrators or users who need to remotely connect to home devices. Without properly configuring port forwarding, many network applications โ from Minecraft server to video surveillance system โ simply wonโt work outside the local network. However, the interface of Mi Router routers (especially the 4A Gigabit, AX3600 or Redmi Router AC2100 models) often raises questions even among experienced users.
In this article, we'll look at not only the basic steps of opening ports, but also the common mistakes that lead to the overlay not working, how to check if the port is open, what DMZ and UPnP settings might interfere with, and why you sometimes have to manually write rules in iptables. And for those who are afraid of breaking something, we've prepared a unique safe port table for popular services that can be opened without risk to security.
Why open ports on the Xiaomi router?
By default, all external connections to your home network are blocked by the router's firewall, which protects devices from hacker attacks, but also limits the functionality of many programs.
- ๐ฎ Online Games: for hosting the Minecraft server, CS:GO Valheim needs open ports 25565, 27015 and others.
- ๐ก Remote Access: Connecting to a Home PC via RDP (port 3389) or SSH (port).
- ๐น Video surveillance: Xiaomi or TP-Link cameras often require port rollovers to view over the internet.
- ๐พ File servers: FTP (Port 21, Nextcloud or Samba to access data from anywhere in the world.
- ๐ Web servers: If you have a website on your home PC, you will need to open 80 ports (HTTP) 443 (HTTPS).
Without port rollover, these services will only be available on your local network, such as friends will not be able to connect to your Minecraft server, and you will not be able to remotely control your computer through TeamViewer unless you set up rules on the router.
โ ๏ธ Warning: Opening ports reduces network security. Always use strong passwords for the services you access and limit your range whenever possible. IP-addresses that are allowed to connect.
Preparation for port transfer: what do you need to know?
Before opening ports, make sure all the preconditions are met:
- Static IP-Address: If your PC or server receives IP down DHCP, It can change after the router restarts, and port overhead will stop working. IP locally.
- The right external IP: Check that you are white (public) IP-address, not gray (private) if your provider uses CGNAT, Port transfer may not work.
- Access to the router admin panel: by default, login is at 192.168.31.1 (or miwifi.com) with the login and password specified on the device sticker.
To check if you have white IP, go to 2ip.ru and compare the address shown to what is displayed in the router settings (Status โ Network Card). If they are different, you have CGNAT, and you will need to contact the provider to pass the ports.
Step-by-step: how to open a port on Xiaomi
Consider the process with the MiWiFi firmware (relevant to most models, including the Mi Router 4A Gigabit and AX3600). If you have an alternative firmware (Padavan or OpenWRT), the steps may differ.
Step 1: Entrance to the admin panel
Open your browser and type in 192.168.31.1 or miwifi.com. Sign in with your login and password (the default is admin and password from the sticker on the router). If you changed the login data but forgot it, you will have to reset the router with the Reset button.
Step 2: Go to the port port port forwarding section
From the router menu, select:
Additional settings โ Redirection โ Port ForwardingStep 3: Creating a pass rule
Click Add the rule and fill in the fields:
- Rule name: An arbitrary name (e.g., Minecraft Server).
- Protocol: Select TCP, UDP, or TCP/UDP (if you are not sure, choose the latter option).
- External port: A port that will be open to the Internet (e.g. 25565 for Minecraft).
- Internal port: Usually the same as the external port, but may differ (e.g. if you redirect the 8080 to the internal 80).
- Internal IP-address: static IP devices on a local network (e.g. 192.168.31.100).
Example of filling for RDP:
| Field. | Meaning |
|---|---|
| Name of the rule | Remote Desktop |
| Protocol | TCP |
| Outer port | 3389 |
| Inland port | 3389 |
| Internal IP | 192.168.31.50 |
Step 4: Preservation and verification
Click Save and restart the router, and then check if the port is open using services like YouGetSignal or PortChecker.
Checked static. IP device|The correct protocol was chosen (TCP/UDP)|The external and internal ports are the same (unless you redirect)|Correct internal information IP|The router is not in "Guest Network" mode"-->
Table of standard ports for popular services
To avoid guessing which ports to open, use our table. Note that some services require multiple ports to be opened (e.g., FTP needs 20-21 for data and commands).
| Service | Ports (TCP/UDP) | Note |
|---|---|---|
| Minecraft (server) | 25565 (TCP/UDP) | For mods, 25566-25570 may be required. |
| RDP (Remote Desktop) | 3389 (TCP) | It is recommended to change the standard port in the Windows registry. |
| SSH | 22 (TCP) | Always change the default port for security. |
| FTP | 20-21 (TCP) | Passive mode requires ports. 50000-51000. |
| HTTP/HTTPS | 80 (TCP), 443 (TCP) | For the web server, be sure to set up HTTPS. |
โ ๏ธ Note: Ports 80 and 443 are often blocked by ISPs. If the web server is not working, try redirecting the external port 8080 to the internal 80.
Common mistakes and their solutions
If the port does not open after the drop, check the following points:
- ๐ Router is not rebooted: after saving the rules, be sure to restart the device.
- ๐ก๏ธ firewall Windows/macOS: Even if the port is open on the router, the local firewall can block the connection.
- ๐ UPnP conflict: If UPnP is enabled, it can automatically close ports. Try turning it off in Additional Settings โ UPnP.
- ๐ CGNAT The provider: if you have a gray IP, port transfer is not possible without additional services from the provider (for example, dedicated IP).
- ๐ Incorrect internal IP: Make sure that the device you are opening the port for is the one you are using. IP, rule-listed.
If you are using dual NAT (for example, the router is connected to another router), you need to configure port rollover on both devices, and check if DMZ mode is on, as it may conflict with manual rules.
How to check if the port is open without third-party services?
How to open ports without risk?
Opening ports makes your network more vulnerable to attacks, and follow these tips to minimize the risks:
- ๐ Change the standard ports: for example, instead of 3389 for RDP use 3390 ox-port 10000-60000.
- ๐ก๏ธ Set the limit to IP: In the squash rule, specify the permitted IP-addresses (if they are static).
- ๐ Turn off the airdrop when it is not needed: for example, if the Minecraft server works only on weekends, close the port on weekdays.
- ๐ Use it. VPN: Instead of opening ports for the entire Internet, set up WireGuard or OpenVPN on the router.
For maximum security, consider alternatives to port port port port transfer:
- Cloud Proxies: Services like Cloudflare Tunnel or Ngrok allow you to access local services without opening ports.
- Reverse SSH: If you need access to a home PC, set up the reverse. SSH-connection via intermediate server.
๐ก
Before opening an FTP port, be sure to set up SFTP (port 22) instead of standard FTP (port 21) โ this will protect your data from being intercepted.
Features of port port port transfer on different models Xiaomi
The interface and port port port port port port capabilities may vary depending on the router model and firmware version.
| Model router | Features of port port transfer | Firmware |
|---|---|---|
| Mi Router 4A Gigabit | Supports up to 32 rules of thumbing, no TCP/UDP separation in some firmware versions. | MiWiFi (stack) |
| Mi Router AX3600 | There is a separate section for DMZ. Supports port ranges (e.g., port ranges, 30000-30010). | MiWiFi / OpenWRT |
| Redmi Router AC2100 | In some firmware, port port port forwarding is called Virtual Servers. | MiWiFi |
| Mi Router Pro | Supports Port Triggering for complex scenarios. | Padavan (castom) |
If you have custom firmware (Padavan or OpenWRT), the port rolling process will be different, for example, in OpenWRT, the rules are configured via LuCI or /etc/config/firewall configuration.
๐ก
On routers with Padavan firmware, port port rollover is configured in the NAT โ Port Forwarding section, and for OpenWRT you will need to edit the /etc/config/firewall file.