How to open ports on the Xiaomi router: detailed settings

Modern home networks require flexible access settings, especially if you plan to use remote video surveillance, run game servers or actively download torrents. Port Forwarding on Xiaomi routers often becomes a necessary measure for the correct operation of specific software that can not independently bypass NAT protection. Without the right configuration, the router simply blocks incoming connections, considering them potentially dangerous to the internal network.

Owners of devices with firmware MiWiFi OS The Xiaomi Router has a powerful enough functionality that is hidden in the standard interface, but is available with a competent approach. In this article, we will discuss all the nuances, from basic settings to organization. VPN-Tunnels so that your traffic goes exactly where it needs to go, bypassing the ISP’s unnecessary locks or internal security policies.

It should be noted that the configuration process can vary depending on the version of the firmware installed and the device model. The administration interface may look different on the Chinese and global versions, but the logic of the network protocols remains unchanged. We will consider universal methods that apply to most current models, including the AX series, AC and older devices with the Mi logo.

Preparation for setting up network rules

Before making changes to the configuration of the router, you need to ensure a stable connection to the control device. It is best to perform all the manipulations by connecting the computer to the Xiaomi Router through the device. LAN-cable, because the network may break down for a short time during the setup process, and if wired connection is not possible, make sure your Wi-Fi connection is stable and you are in a zone of confident reception.

To access the control panel, you will need to know IP-Gateway address: In most cases, the default address is 192.168.31.1 or the domain name miwifi.com. Enter this address in the address bar of any browser. If you have changed the standard settings, use the current one. IP-address that can be viewed in the network connection properties of your operating system.

An important step is the fixation IP-address of the device for which the ports are planned to be opened. IP It is important because of the dynamic distribution of addresses (DHCP) The target device can get a new address after the reboot, and all the configured rules will stop working. DHCP-server of the router itself, linking it to MAC-address of the computer or console network card.

β˜‘οΈ Preparation for port port port transfer

Done: 0 / 4

Remember that any changes to network security require care. Opening ports makes your device visible from the external network, so use complex passwords and updated firmware. Don't open ports for services you're not sure you need, and always check what kind of software is waiting for incoming connections.

Administrator panel entrance and basic settings

Once you enter the gateway address in the browser, the system will ask for an administrator password. If you set up the router for the first time, this is the password you came up with when you initialized. In some cases, especially on Chinese firmware versions, you may need to log in through the Mi Account account associated with the device. Make sure you have access to the Internet to log in if you use the cloud login method.

The web configurator interface offers two modes: simple and advanced. To work with ports, you need to switch to Advanced Settings mode. This option is usually located at the top of the screen or in the drop-down profile menu. In the Mi Home mobile application, functionality can be limited, so it is recommended to use the browser version on your PC for deep customization.

In the extended menu, you can navigate through tabs on the left or top, depending on the interface version. We're interested in the section related to network settings, which is often called Advanced -> NAT or Port Forwarding. This is where all the tools for managing incoming traffic are concentrated. If you don't see these options, your firmware version may be stripped down and you'll need to upgrade or install an alternative version of the software.

πŸ’‘

Use incognito mode in the browser when you log in to the router settings to avoid conflicts with cached authorization data and old sessions.

It is worth paying attention to the status WAN-If your router is connected to another router of the provider (double mode) NAT), Port rollover on Xiaomi may not work, even if all settings are done correctly, in which case you either need to switch the provider’s modem to Bridge mode, or toss ports on both devices sequentially.

Port Port Forwarding (Port Forwarding)

The manual port transfer mechanism allows you to redirect incoming traffic from a specific external port to a specific internal port. IP-This is the standard procedure for organizing access to the address and port. FTP-A server, a Minecraft game server, or a video surveillance system. In the router menu, this feature is often denoted as Port Forwarding or located in the Advanced section -> NAT.

To create a new rule, you need to click the add button (usually a plus icon or an "Add" button). You will need to fill in several fields: the rule name (arbitrary, for your convenience), the protocol (TCP, UDP or Both), the external port and the internal port. The internal IP must correspond to the address of the device that will serve the requests. For example, if you open a port for a web server on a computer with 192.168.31.150, specify this one.

Pay special attention to the port range. Some applications require opening a specific port, such as 80 for HTTP or 443 for HTTPS, while games can use whole ranges. Make sure that the selected external port is not occupied by other services of the router itself. After filling in all the fields, save the changes; the router can restart the network module, which takes a few seconds.

ServiceProtocolPort (standard)Description
Web ServerTCP80, 443Access to websites
FTPTCP21File transfer
MinecraftTCP/UDP25565Game server
BitTorrentTCP/UDP6881-6889Torrent clients
RDPTCP3389Remote desktop
πŸ“Š What is the purpose of opening ports?
Games (online servers)
Torrents and downloads
Video surveillance
Remote access to the PC
Other

After applying the settings, it is recommended to check the port availability using online services such as 2ip.ru or portscanner. Run the check by specifying the number of the open port. If the service shows that the port is closed, check the Windows firewall or antivirus on the target device - they can block the connection even if the router is set up correctly.

Setting up VPN-client on the router Xiaomi

Modern firmware Xiaomi Router supports work in mode VPN-This allows all traffic or traffic of certain devices to be flown through a secure tunnel, which is important for bypassing ISP locks or ensuring security when using open networks: PPTP, L2TP/IPsec OpenVPN.

To set up, go to the Settings section -> VPN Client (or similar in your version of the software) You need to select the type of connection and enter the data provided by your VPN-Provider: server address, login, password and, if necessary, certificates. OpenVPN protocol is considered the most secure, but requires downloading a configuration file (.ovpn), which is usually provided by the service.

The important thing is to choose the mode of operation. You can configure the router so that through VPN Only certain device traffic (Policy-based routing) or all home network traffic was running. VPN-So the client has the option of choosing devices or subnets, which allows you to, for example, run a torrent client on a network. NAS through VPN, leaving the rest of the internet traffic straight to maintain speed.

⚠️ Attention: Use VPN-The tunnel reduces the overall speed of the Internet connection due to the overhead of encryption and routing.

If standard firmware cannot configure a VPN (for example, the provider requires specific OpenVPN settings), you may want to consider installing an alternative firmware such as PandoraBox or Padavan if your router model supports this capability.

What to do if the VPN is not connected?
Check system time on the router – time out-of-synchronization often leads to certificate error, and make sure that the VPN port (usually 1194 for OpenVPN) is not blocked by the provider or firewall.

UPnP and Automatic Port Opening

UPnP (Universal Plug and Play) allows applications and devices to automatically open the necessary ports on the router without user intervention, which is convenient for game consoles (PlayStation, Xbox) and some torrent clients who independently manage network connections. On Xiaomi routers, this feature is usually enabled by default, but can be disabled for security reasons.

You can find UPnP settings in Advanced -> UPnP. Here you will see a list of active rules created by applications. If you see a lot of unknown devices or rules, this may be a sign that there is infected software on your network that is trying to open a back door.

Using UPnP carries certain risks, as any application on the local network gets the right to change the rules of the firewall. Xiaomi Router allows you to view active sessions, which helps control the process. If you do not trust the devices in your network or want maximum control, manually configuring ports will be a more reliable solution.

πŸ’‘

UPnP makes life easier for the average user, but static port swipe is preferable for maximum security and stability of game servers.

It is worth noting that some modern games and applications may not work correctly if the NAT type is strict (Strict).Enabled UPnP or manually configured ports change the NAT type to Open or Moderate, which improves the quality of the connection in multiplayer and speeds up the search for matches.

Diagnostics and solution

Even with the right setup, there can be situations where ports remain closed. First of all, check if your provider is using the technology. CGNAT (Carrier-Grade NAT). This happens when the provider issues subscribers "gray" IP-addresses (usually beginning with the 10.x.x.x, 100.x.x.x, 172.x.x.x). In this case, port port port port port port port porting on the router is powerless, since you do not have a unique external IP.

The solution to the CGNAT problem is to order the static IP service from your ISP. Once you connect to this service, you will receive a unique white address, and all settings on the Xiaomi Router will work as expected. Also make sure that the router settings correctly set the time and date, since some security protocols depend on time stamps.

If you use antivirus software or third-party firewalls on your computer, they may ignore your router's settings. Check the incoming connection rules in your Windows firewall or your antivirus settings. Often you need to create an exception for a particular application or port to allow incoming traffic from your local network.

⚠️ Warning: After changing your network settings, always reboot your router completely. 10-15 So, you can turn it on again, and that will clear the network spreadsheet cache and apply all the changes correctly.

In rare cases, you may need to reset your network settings to factory settings if the configuration becomes too confusing.Be sure to save your current configuration via the web interface before doing so to be able to roll back.The option to export settings is in the System Status or Administration section.

Frequently Asked Questions (FAQ)

Is it safe to open ports on Xiaomi router?
Opening ports creates potential entry points for attackers, so it’s only safe if you take precautions: Use complex passwords for services, update router firmware, and only open ports that are really necessary for specific applications to work. Don’t turn on remote administration (Web Management from WAN) unless absolutely necessary.
Why is the port port not working, even though everything is set up correctly?
The most likely reason is the provider’s use of technology CGNAT ("grey" IP-address. IP-address WAN Router status: if it is different from what the site shows 2ip.ru, So you don't have direct Internet access, and check the firewall on the target device.
Can I open ports through the Mi Home app?
The functionality of the Mi Home mobile application is limited to basic settings. To fully work with ports, VPNs and complex NAT rules, it is recommended to use the router’s web interface through a browser on a computer or phone.
How do I know which port my program is using?
In Windows, this can be done via the command line by entering the netstat -an command, or using utilities like Process Explorer. The settings of the program itself (such as a torrent client or game) also often specify the port used in the Network or Connection section.
Do I need to open ports for PS5 or Xbox?
For the best experience in online gaming, it is recommended to enable UPnP or manually flip the ports specified in the console documentation.This will change the type of NAT to "Open", which will solve problems with connecting to friends and voice chat.