Port port port transfer on the Xiaomi router: full instructions for all models

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:

  1. The local device must listen to the port (e.g., the server must be running).
  2. The router must redirect external requests to that port to the desired device on the local network.

๐Ÿ“Š Why you are setting up port port transfers?
Game server
Video surveillance
Remote access to PC
Web server/site
Other

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?
If your provider is giving you gray IP (CGNAT), No standard port transfers. 1. Order white from the provider IP (2. Use services like Ngrok or Cloudflare Tunnel to tunnel traffic. 3. Set up a setup DDNS circumventive CGNAT (For example, through ZeroTier or Tailscale).

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:

  1. Go to Additional Settings (or Advanced).
  2. Selecting Redirection โ†’ Port transfer (Forwarding) โ†’ Port Forwarding).

Step 3. Add a new rule of skipping

Click Add (Add) and fill in the fields:

Field.MeaningExample for Minecraft Server
Name of the ruleArbitrary name (for convenience)Minecraft Server
ProtocolTCP, UDP or TCP/UDPTCP
Outer portA port that will be open "outside"25565
Inland portPort on local device25565
IP-addressLocal. 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).-->

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:

  1. Register for No-IP, DynDNS or DuckDNS.
  2. In the router: Additional settings โ†’ DDNS.
  3. 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 causeDecision
The port won't open.IP-address changedSecure the static IP in the settings of the router or device
Outside IP no pingProvider locks in ICMP or gray IPCheck it out. IP on 2ip.ru; If it is gray, contact the provider.
Port open, but no connection is establishedfirewall Windows/Antivirus is blocking the portAdd an exception to the port in Windows Firewall or disable the antivirus temporarily
The junction is working, but unstableConflict with UPnP or double NATTurn 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 memoryUpdate 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.

FAQ: Answers to Frequent Questions

Can I flip a port on a Xiaomi router through the Mi WiFi mobile app?
No, the official Mi WiFi app does not have port-dropping functionality, and can only be configured via the router's web interface (192.168.31.1).
How to throw a port on Xiaomi router with OpenWRT firmware?
On routers with OpenWRT (for example, Xiaomi Router) 4A Gigabit Edition: Open the Network โ†’ Firewall โ†’ Port Forwards. Add a new rule by specifying Source zone: wan, Destination zone: lan. IP Save and Apply (Save & Apply) for OpenWRT, you can also configure via console using uci.
Why does the connection only work from the local network after the port is rolled over?
Probable reasons: You have gray IP (check on 2ip.ru). The provider blocks incoming connections (often at home rates). IP In connection settings (you need to use external) IP router DDNS).
How to skip a range of ports (for example, 30,000-30010)?
In the Xiaomi web interface, you can specify the range of ports via the hyphen: In the field External port: 30000-30010. In the field, the Inland Port: 30000-30010. Make sure the protocol is (TCP/UDP) range-support.
Can I roll over a port on Xiaomi router without static? IP?
Technically, yes, but it's unstable. IP devices in the local network will change (for example, after restarting the router), the overhead will stop working. IP customized DHCP router (local network section) โ†’ Tethering IP/MAC). Set up static. IP on the device itself (in the properties of the network connection).