Open port 25565 on Xiaomi router: a full guide for Minecraft and other services

Why can't I connect to the server via port 25565?

You set up a Minecraft home server, run it on a local PC, but friends can't connect over an external IP? 90 percent of the time, the problem is a closed port 25565 on a Xiaomi router. By default, all incoming connections are blocked by the router's firewall -- a standard security measure, but it interferes with game servers, VPNs or other network services.

In this article, we will discuss three working ways to open a port on Xiaomi Mi Router 3/4/4A/4C/5/6 routers (including models with MiWiFi firmware and OpenWRT). We will focus on practical nuances: from binding static IP to bypassing the limitations of the provider. If you are not a technical specialist, do not worry: the instructions are adapted for beginners, with explanations of each step.

⚠️ Important: Before setting up, check that the server is actually local. Connect to it from another device on the same network at the address localhost:25565 or 192.168.x.x:25565. If the local connection does not work, the problem is the server settings, not the router.

Method 1: Port Forwarding via the web interface

This is the main method that works on all Xiaomi models with original firmware. Instructions are universal for the Mi Router 4A Gigabit Edition, Mi Router 4C, Mi Router 5 and other devices in the series.

Steps to set up:

  1. Connect to the router via cable or Wi-Fi. Open the browser and enter in the address bar 192.168.31.1 (standard IP for Xiaomi). Log in with the admin login and password (default on the sticker on the bottom of the router).
  2. Go to the section Additional settings β†’ Redirect β†’ Ports rollover.
  3. Click Add the rule and fill in the fields: πŸ“Œ Rule name: Minecraft Server (or any other) πŸ”’ Protocol: TCP/UDP (or TCP, if the server does not require UDP) πŸ”Œ Outer port: 25565 πŸ”Œ Inland port: 25565 πŸ–₯️ Internal IP: IP-your PC address (for example, 192.168.31.100)

Save the rule and restart the router.

⚠️ Warning: If the port still doesn't open after saving the rule, check if it's blocked by an antivirus or Windows firewall. Turn them off temporarily for the test.

Make sure the server is running on a PC|Check local connection to the server|Write down static. IP PC-based|Turn it off. VPN/router proxy-->

Method 2: Demilitarized Zone (DMZ)

If port rolling didn’t work or you need to open all ports for a single device (like testing), use DMZ. This method is less secure, but easier to set up.

Instructions:

  1. In the router’s web interface, go to Additional Settings β†’ Redirect β†’ DMZ.
  2. Turn on the function. DMZ and point out IP-Your PC address (same as for port forwarding).
  3. Save the settings and restart the router.

⚠️ Attention: DMZ Opens all ports to the device, which increases the risk of hacking. Use this method only temporarily or if you are confident in the security of your PC (it has a firewall and antivirus installed on it).

πŸ’‘

If the DMZ port 25565 still doesn’t work after setting up, check if your ISP is blocking it. Some carriers (such as Rostelecom or Beeline) are defaulting on popular ports for home users.

Method 3: UPnP (Universal Plug and Play)

UPnP allows devices on the LAN to automatically open ports on the router, which is convenient but less secure.

How to turn on UPnP on Xiaomi:

  1. Go to Additional Settings β†’ Redirect β†’ UPnP.
  2. Activate the switch Enable UPnP.
  3. In server settings (e.g. server.properties for Minecraft), make sure that the enable-upnp=true setting is used.
  4. Restart the server and router.

⚠️ Attention: UPnP may conflict with manual port rollover.If you've already set up the rollover manually, disable UPnP to avoid double rules.

MethodDifficultySecurityWhen to use
Port Forwarding (Port Forwarding)Medium⭐⭐⭐⭐⭐The basic method for permanent servers
DMZLow.⭐⭐Temporary testing or if the pass does not work
UPnPLow.⭐⭐⭐For automatic settings (for example, for games)

Static IP binding: why it matters

If you have set up a port port to dynamic IP (quiz DHCP), the rule will stop working after the router restarts or the lease expires IP. To avoid this, tie the static IP ce MAC-pc address.

How to do this:

  1. Find out. MAC-address: πŸͺŸ In Windows: Open the command line and type ipconfig /all. Look for the physical address line. 🐧 V Linux/Mac: Execute ifconfig or ip a.

Additional settings β†’ Network β†’ Local network β†’ IP and MAC binding

192.168.31.100

Save and restart the router.

Critical detail: If you are using a dual-band router (2.4 GHz + 5 GHz), make sure that your PC is connected to the same range as a static IP. For example, if you have tied IP to a 192.168.31.x network and your PC is connected to a 192.168.32.x guest network, port rollover will not work.

Manual port roll-over |DMZ|UPnP|Never set-up |Another way-->

Open port check: 3 reliable ways

After setting up, you need to make sure that port 25565 is really open to external connections.

  1. 🌍 From an external device: Ask a friend to connect to your server via an external device IP (You can find it on the website. 2ip.ru). If the connection is completed, the port is open.
  2. πŸ” Online services: Use tools like PortChecker or CanYouSeeMe. Enter port 25565 and run the check.
  3. πŸ’» Command Prompt: On another device on the network, run: telnet [your external_IP] 25565 If the screen is empty or if a connection message appears, the port is open. If you see a Could not open connection error, the port is closed.