How to open port 80 on the Xiaomi router: step-by-step instructions

Opening ports on a router is a standard procedure for those who want to organize remote access to their home server, webcam or gaming host. Owners of Xiaomi equipment often face the need to pass traffic for proper torrent clients or video surveillance.Port 80 is traditionally used for the purpose of providing a secure service. HTTP-traffic, that is, for web servers, which makes it the most frequent request of users.

However, the security setting process on Chinese Xiaomi devices has its own nuances, different from standard Western counterparts. The firmware interface can be executed in English or Chinese, and the logic of the firewall requires a careful approach. In this article, we will discuss all the steps from logging into the control panel to the final check of service availability from the external network.

It's worth noting that opening ports is an action that reduces the level of security on your local network, literally creating a window into your home for external connections, so it's critical to understand what services you're running and how secure they are with passwords or other authentication methods.

Preparation for network setup and verification IP-address

Before making changes to the router configuration, you need to make sure that your device running the server has static IP-If the address changes after each router restarts, the toss rule will stop working and access to the service will disappear.

On a Windows computer, you can do this through the network connection control panel. You need to record the current gateway settings and DNS, and then manually prescribe IP-address that is out of range DHCP, For example, if a router gives out addresses from 192.168.31.100 to 192.168.31.200, your server would better assign an address to 192.168.31.50.

For Linux or macOS devices, the static address setting procedure is also done through network system settings. Make sure you know the exact default gateway address, as that is what you will need to log into the Xiaomi router's web interface.

  • πŸ“Œ Determine. MAC-the address of the device for which the port is opened.
  • πŸ“Œ Choose a free one. IP-address on the local subnet (usually 192.168.31.X).
  • πŸ“Œ Write down the current settings DNS-manual-entry servers.
  • πŸ“Œ Make sure that the firewall on the computer itself does not block incoming connections.

⚠️ Note: If you are using dynamic IP-The address of the provider, your external IP For a stable server, consider using technology. DDNS, which binds the domain name to a changing address.

Once you've fixed the address, check the connection to the future gateway. Open the command line and type in the ping command. If the answer comes, then the physical connection and the underlying logical connection are correctly established.

Log in to the web interface of the Xiaomi router

The router settings are accessed via the browser. The address bar must enter the standard gateway address. Most Xiaomi Router models (e.g. Mi Router 4A, 4C, AX3600 series) use the default address 192.168.31.1 or the domain name router.miwifi.com.

When you first log in, you'll need authorization. If you've previously configured your router, use the administrator password you've set, and if you lose your password, you'll have to reset your password to factory settings, which will result in the loss of all Wi-Fi network configurations and other settings.

The interface can be in English or Chinese. If you see characters, look for a menu item similar to Settings (often indicated by a gear) and choose to change the language to English, which will make it much easier to navigate further through the sections.

πŸ“Š What is your Xiaomi router?
Mi Router 4A
Mi Router AX3600
Mi Router Pro
Another model

Modern models also support management via the Mi Wi-Fi mobile application. However, for fine-tuning ports, especially for the pass-through, the web interface via the browser on a PC is a more reliable and functional tool.

Port Forwarding (Virtual Servers)

In the interface of Xiaomi routers, port rollover is often hidden in an obscure place. You need to find a section that may be called Advanced Settings. Inside this menu, look for a subsection of NAT or Port Forwarding.

In some versions of the firmware, this feature is called Virtual Servers, and the logic is the same: you create a rule that tells the router, "All traffic coming to port X from the outside, send it to device Y within the network."

If you can't find this section in the standard menu, your router may be running in Access Point mode, which is where routing functions, including NAT and port rolling, are disabled. You need to switch the device to Router mode.

  • πŸ” Go to the Advanced menu β†’ NAT.
  • πŸ” Find the Add button or + create a new rule.
  • πŸ” Make sure UPnP is enabled if you plan to use automatic playthrough for games.

⚠️ Note: On some Xiaomi routers with firmware for the Chinese market, the interface may not have English localization. Use a screenshot translator or look for sections with a shield or socket icon".

Once you click on the section, you'll see a list of existing rules (if any) and a new add button. Click on it to open the option form.

Setting up the pass rule for port 80

Now, to fill in the configuration fields directly, each field is critical to the connection to work properly, and a single character error can cause the entire service to fail.

In the Name field, type in an arbitrary name, such as "WebServer" or "Camera." This is just for your convenience to identify the rule in the list. In the Protocol field, select TCP, because HTTP works on this protocol. If you want, select TCP/UDP or Both.

The most important fields are ports. In the External Port field, specify 80. This is the port that will be knocked on from the Internet. In the Internal Port field, also specify 80 if your server listens to a standard port. If you change the port on the server, specify it here.

Parameters to be filled:


Name: MyWebServer




Protocol: TCP




External Port: 80




Internal IP: 192.168.31.50 (Your static IP)




Internal Port: 80




Status: Enable (Included)

In the Internal field IP (Internal IP) enter the address you assigned to your device in the first step, make sure that the rule status is set to Enable or On. After filling in all the fields, press the Save button or OK.

β˜‘οΈ Checking the rollover setting

Done: 0 / 4

Once saved, the router may require a reboot, although current Xiaomi models apply settings instantly. Check the rule list: your new rule should show up in the active connections table.

Problems with the provider and CGNAT

Often, users do all the settings perfectly, but the port doesn't open anyway. 90 percent of the time, the problem isn't with the router, it's with your ISP using the technology. CGNAT (Carrier-Grade NAT). This means that you do not have a unique external IP-address, and are behind the common address of the provider along with hundreds of other subscribers.

It's easy to test. Compare that. IP-The address that appears in the status of the Xiaomi router in the Status section (WAN IP), with the address that the sites see on the Internet (for example, on the 2ip.ru). If the address is different, you have CGNAT, Port transfer is technically impossible without additional actions.

ParameterNormal situationSituation CGNAT
IP in router (WAN)185.xxx.xxx.xxx10.xxx.xxx.xxx
IP at 2ip.ru185.xxx.xxx.xxx185.yyy.yyy.yyy
Port transferIt's working.It's not working.
DecisionNot requiredStatic IP Request

The solution to the problem is only one: call the provider and order the service "Static". IP-address" or "Dedicated IP". It's usually a paid option, but it's necessary to organize the server. CGNAT There are (e.g. tunneling) but they require complex setup and a third-party server.

What is IPv6 and will it help?
Providers are increasingly adopting IPv6. If your ISP and router support IPv6, you can get a unique address without ordering a static IPv4. However, for this, the server and client must support IPv6, which is not yet common everywhere.

Port accessibility and security checks

Once set up, you need to make sure that the port is really open. Don't check availability from a device inside the same Wi-Fi network - this won't give an exact result, since the request will bypass the NAT. Use mobile Internet or ask a friend to check the availability of your IP.

To check, use online services such as portchecker.co or yougetsignal.com. Enter port number 80 and press the check button. If the service shows "Open" - congratulations, the setup was successful.

However, opening port 80 carries risks: Web servers exposed to the Internet are constantly scanned by bots for vulnerabilities. Make sure that the server software is updated to the latest version, use complex passwords and, if possible, configure SSL-encryption (HTTPS).

  • πŸ›‘οΈ Regularly update server and router software.
  • πŸ›‘οΈ Use complex passwords for admin panels.
  • πŸ›‘οΈ Consider changing a standard port 80 to a non-standard port (e.g., 8080) to hide from simple scanners.

⚠️ Warning: Never open port 80 if your device runs a standard, unsecured web interface of a router or a camera with a factory password.

πŸ’‘

Use it to improve safety Fail2Ban On the server, this utility automatically blocks IP-Addresses after several failed attempts to enter.

If the check shows "Closed", double check again. IP-The address in the rule and the status of the firewall on the computer itself. Sometimes the antivirus can block incoming connections even when the ports on the router are open.

Alternative solutions and tunnelling

If you get "white" IP-ISP address is impossible or expensive, there are alternative ways to organize access, tunneling technology allows you to throw a port through an intermediary server, bypassing restrictions. NAT provider.

One of the popular solutions is to use services like Ngrok, Cloudflare Tunnel, or ZeroTier, which create a secure tunnel between your device and their network, and you get a domain name that you can access your local server from anywhere in the world.

The advantage of this is that you don't have to open ports on a Xiaomi router at all. It's even safer because your real-world router is a real one. IP-However, the connection speed will be limited by the throughput of the tunnel and the intermediary servers.

πŸ’‘

Using Cloudflare/ZeroTier tunnels is the best alternative to port-over if you don’t have a static IP or are worried about security.

For beginners, setting up a tunnel may seem daunting, but it is an investment of time that will pay off with stability and security.The router in this case runs normally without requiring complex manipulation of the NAT.

Frequently Asked Questions (FAQ)

Why is port 80 not open when all settings are correct?
It's probably a problem with CGNAT from the provider side. Compare the WAN of the IP router and the IP of the 2ip.ru website. If they're different, you need to order a static IP from the provider. Also check if the connection is blocking the antivirus on the computer.
Is it safe to open port 80 for home use?
It's risky. Port 80 is constantly being scanned by hackers. If you're not an experienced administrator, it's better to use a VPN (like WireGuard or OpenVPN) to access your home network than to open ports directly.
Can I open port 80 on Xiaomi router via the Mi Home app?
No, the Mi Home or Mi Wi-Fi mobile app has limited functionality and does not allow you to configure NAT rules and port browsing.
What if the router interface is only in Chinese?
Try changing the language in the settings. If there is no language, use an automatic translator in your browser (such as Google Translate) or search the menu section with the icon "NAT" or "Virtual Server" based on visual prompts.
Do I need to restart the router after setting up the pass?
Settings are usually applied instantly. However, if the port does not open, rebooting Xiaomi's router can help reset the NAT table cache and apply the new rules correctly.