Set up port port port port port port porting on Xiaomi router is a challenge faced by both experienced users and beginners who want to organize remote access to home devices, run a game server or connect to video surveillance over the Internet. Despite the seeming complexity, the setup process in MiWiFi or OpenWRT firmware (for advanced models) takes no more than 10 minutes, if you know the key nuances.
In this article, we will analyze Step-by-step how to open ports on popular models Xiaomi Mi Router 4A/4C/AC2100, Redmi Router AX5/AX6 flagship AX6000/AX9000, including the features of static IP, DMZ We will focus on security issues โ why opening ports can be dangerous and how to minimize risks.
If you haven't experienced networking before, don't worry: we'll explain all the terms in plain language and provide visual cues. For experienced users, we'll give you advanced scenarios, like port rollovers for a Minecraft server or a port rollover. IP-camera DDNS.
What is port port transfer and why it is needed
Port forwarding is a mechanism that allows external devices from the Internet to access specific services on your local device (computer, server, camera), and by default, the router blocks all incoming connections from the outside, protecting your network.
- ๐ฎ For hosting a game server (Minecraft, CS:GO, Valheim).
- ๐น For remote video surveillance viewing through RTSP or ONVIF.
- ๐ฅ๏ธ Remote control of the computer through RDP or SSH.
- ๐ To host a web server or Nextcloud on a home PC.
- ๐ฑ To synchronize data with NAS-storage devices (Synology, QNAP).
Without port port port porting, external devices will not be able to reach your local service even if it is running, for example, if you set up a Minecraft server on port 25565, but did not throw that port on the router, friends will not be able to connect to it.
It is important to understand that port port port transfer is a two-way process:
- The local device must listen to the port (e.g., the server must be running).
- The router must redirect external requests to that port to the desired device on the local network.
Preparation for setup: what to do before the port rollover
Before you start setting up, follow a few critical steps that ignore can make port overflows unworkable or unstable.
Assign the device static IP locally
Check that the service on the device is running and listening to the port
Make sure the firewall is Windows/Antivirus does not block the port
Write down the external IP-router address (or configure) DDNS)
Disable UPnP if it is enabled (recommended for security)-->
1. Assign a static IP-address
If your device (such as a computer or a computer) IP-camera) receives IP-address DHCP, It can change when the router restarts, and then the port overlay will stop working. IP one-way:
- ๐ง In the router settings (recommended for most users).
- ๐ฅ๏ธ In the device network card settings (for experienced users).
2. Check that the port is open on the local device
Before you roll, make sure your service is actually listening to the right port.
- On Windows: Execute the command to CMD: netstat -ano | findstr "PORT" Replace the PORT with the desired number (for example, 25565 Minecraft).
- Nana Linux/macOS: Use the command: ss. -tulnp | grep "PORT"
3.Find out the external IP-router
External (white) IP-address:
- ๐ On the website 2ip.ru or whatismyipaddress.com.
- ๐ก In the router's web interface: Status โ Network map (WAN).
If you have a gray (private) IP (Starts with 10., 192.168. or 172.16., port rollover will not work โ you will need to DDNS Or call the provider for white IP.
What to do if I have gray IP?
Step-by-step: port transfer on the Xiaomi router
Consider a universal method of configuring port throw on most Xiaomi routers (including Mi Router). 4A, Redmi Router AX6, AX6000). The interface may vary slightly depending on the firmware version, but the general logic is maintained.
Step 1. Log in to the router's web interface
Open the browser and enter in the address bar:
- 192.168.31.1 โ for most Xiaomi models
- Miwifi.com is an alternative address (not always working).
Log in with a login and password (often by default) admin/admin or listed on the router's sticker).
Step 2. Go to the "Ports Distribution" section
Path to the menu:
- Go to Additional Settings (or Advanced).
- Selecting Redirection โ Port transfer (Forwarding) โ Port Forwarding).
Step 3. Add a new rule of skipping
Click Add (Add) and fill in the fields:
| Field. | Meaning | Example for Minecraft Server |
|---|---|---|
| Name of the rule | Arbitrary name (for convenience) | Minecraft Server |
| Protocol | TCP, UDP or TCP/UDP | TCP |
| Outer port | A port that will be open "outside" | 25565 |
| Inland port | Port on local device | 25565 |
| IP-address | Local. IP Devices (must be static!) | 192.168.31.100 |
Step 4: Save and apply the settings
After filling the fields, press Save and restart the router (recommended).The port roll rule should work immediately, but sometimes it takes 1-2 minutes to apply.
1. whether UPnP is disabled (may conflict with manual rules).
2. Does the port block the firewall on the target device?
3. Is the protocol correct (TCP/UDP).
4. Hasn't it changed? IP-Device address (if not statically fixed).-->
Port transfer for popular services
Let's take a look at some examples of how to configure the scatter for common tasks, and in each case, it's assumed that the local device is already configured (the server is running, IP-camera connected, etc.).
1. Port transfer for Minecraft server
To connect your friends to your Minecraft server:
- ๐ฎ Open port 25565 (default for Java Edition).
- ๐ก Protocol: TCP.
- ๐ The internal and external ports must be the same.
If the server is running on another port (e.g. 25566), specify it in the dash settings.
2. Freight-forwarding IP-camera (RTSP, HTTP)
For remote viewing from Xiaomi, Hikvision or Dahua cameras:
- ๐น Port 554 for RTSP (videostream).
- ๐ Port 80 for HTTP (web-based).
- ๐ Protocol: TCP for HTTP, TCP/UDP for RTSP.
Important: many IP-The default cameras have weak passwords. Before you roll over ports, be sure to change the standard credentials!
3. Distribution for remote desktop (RDP)
To connect to Windows by RDP:
- ๐ฅ๏ธ Port: 3389.
- ๐ Protocol: TCP.
- โ ๏ธ Warning: RDP โ Use a complex password and restrict access to IP firewall router.
4. Fast forwarding for the web server (Apache, Nginx)
For hosting a website on a home PC:
- ๐ Ports: 80 (HTTP) 443 (HTTPS).
- ๐ Protocol: TCP.
- ๐ Recommended use HTTPS Certified by Letโs Encrypt.
๐ก
For the web server, be sure to configure DDNS, if you have a dynamic IP. Free services: No-IP, DynDNS, DuckDNS.
Security: How to Protect Yourself When Passing Ports
Opening up ports to the Internet is always a risk, and attackers scan networks for vulnerable devices, so it's important to take precautions.
โ ๏ธ Warning: Never open ports 22 (SSH), 3389 (RDP) or 80/443 without additional protection, unless you're sure about the security of your password.
Methods of protection:
- ๐ Use complex passwords (at least 12 characters with numbers and special characters).
- ๐ก๏ธ Set up. Fail2Ban on a local device (for Linux/NAS).
- ๐ Restrict access to IP in the router settings (Firewall section) โ IP-filter).
- ๐ Regularly update the router firmware and software on the target device.
- ๐ For RDP/SSH use VPN flat-out.
Alternatives to port port port port port forwarding:
If you want remote accessibility but donโt want to open ports, consider:
- ๐ VPN (For example, WireGuard or OpenVPN on the router).
- ๐ Cloudflare Tunnel or Ngrok for tunneling.
- ๐ก DDNS + VPN (For example, through Synology. DSM).
Advanced settings: DMZ, UPnP and DDNS
Besides the standard port port port port port port port, Xiaomi routers support additional features that can simplify setup or expand capabilities.
1. DMZ (Demilitarized Zone)
DMZ It allows you to redirect all the external ports to one device on the LAN, which is convenient if you need to open many ports, but it's extremely insecure:
- ๐ก๏ธ Use only for testing.
- ๐ง Path to the menu: Redirection โ DMZ.
- โ ๏ธ Device in DMZ Becomes vulnerable to attacks.
2. UPnP (Universal Plug and Play)
UPnP automatically scans ports for compatible applications (e.g., uTorrent, Steam).
- ๐ Convenient but not secure โ any application can open a port.
- ๐ง Path to the menu: Additional settings โ UPnP.
- โ We recommend you to disable if you are not using it.
3. DDNS (Dynamic DNS)
If you have a dynamic IP (changes when reconnected), DDNS You can attach a permanent domain name to it:
- Register for No-IP, DynDNS or DuckDNS.
- In the router: Additional settings โ DDNS.
- Enter your account details and select a domain.
Now instead IP-You can use a domain like yourname.ddns.net.
Frequent problems and their solutions
Even after you set up the port span correctly, it may not work, and let's look at the typical errors and how to fix them.
| Problem. | Possible cause | Decision |
|---|---|---|
| The port won't open. | IP-address changed | Secure the static IP in the settings of the router or device |
| Outside IP no ping | Provider locks in ICMP or gray IP | Check it out. IP on 2ip.ru; If it is gray, contact the provider. |
| Port open, but no connection is established | firewall Windows/Antivirus is blocking the port | Add an exception to the port in Windows Firewall or disable the antivirus temporarily |
| The junction is working, but unstable | Conflict with UPnP or double NAT | Turn off UPnP; if double NAT โ Set up Bridge Mode or contact the provider |
| You can't keep the pass rule. | Firmware restriction or lack of memory | Update the router firmware or reset the settings to the factory |
How to check if the port is open?
Use online services:
- ๐ 2ip.ru/port-scan
- ๐ yougetsignal.com
- ๐ Team in Linux/macOS: nc -zv your_IP port
โ ๏ธ Note: If the port is checked as closed, but the airborne settings are correct, the reason may be a lock by the provider. Some operators (e.g. Rostelecom, Beeline) by default close incoming ports for home fares.