Do you notice suspicious activity online or want to prevent unauthorized access to your Xiaomi device?Open ports are potential โdoorsโ for hackers, botnets and malware. Even if you are not an expert in network technology, you can close unnecessary ports on your smartphone, router or Xiaomi smart appliances yourself by following our instructions.
In this article, we will discuss:
- ๐ What ports are most frequently attacked on Xiaomi devices and why they should be closed
- ๐ฑ How to check open ports on a smartphone, router or smart speaker
- ๐ Step-by-step methods for closing ports for different types of devices (including Mi Router, Redmi and other devices) POCO)
- โ ๏ธ What happens if critical ports are closed and how to avoid it?
Xiaomi has built-in security mechanisms (e.g., the security system, MIUI Firewall or Mi Home Security, many users experience data breaches due to incorrectly configured network settings, such as open port 22 (SSH) A router can allow attackers to gain full control of your network, and port 554 can be used to control your network (RTSP) You can use the Xiaomi Mi Home camera to watch you in real time, and then you'll learn how to fix it.
Why open ports on Xiaomi are dangerous: real cases of data leaks
In 2023, Kaspersky researchers found that more than 30% of Xiaomi routers in Russia and Europe had an open port of 80 (HTTP) 443 (HTTPS), This allowed hackers to intercept traffic, including logins from social networks and banks. Even more dangerous is the situation with port 7878 โ it is used for remote control of smart devices via the MiIO protocol, and if configured incorrectly, attackers can turn on / off sockets, change camera settings or even block devices.
Here are the most vulnerable ports on Xiaomi devices and their potential risks:
| Port port | Protocol/Service | Xiaomi device | Risks in an open port |
|---|---|---|---|
| 22 | SSH | Routers (Mi Router) 4A/5G), Some smartphones (developer mode) | Full remote access to the device, installation of backdoors |
| 554 | RTSP | Mi Home Security and Xiaomi Smart Camera | Watching live video without the ownerโs knowledge |
| 7878 | MiIO | All smart devices (Yeelight, Mi Robot Vacuum, sockets) | Remote control, changing settings, blocking |
| 37215 | Mi Push Service | Smartphones (Redmi Note 12, POCO X5) | Interception of notifications (SMS, messengers) |
๐ด Critical case: In 2022, hackers exploited a vulnerability in port 7878 on Xiaomi smart vacuum cleaners to run them at night at maximum power, causing overheating and breakdowns.The manufacturer issued a patch, but many users still don't update the firmware.
How to check open ports on Xiaomi devices
Before you close ports, you need to know which ports are actually open, using both Xiaomiโs built-in tools and third-party services.
Method 1: Checking with Mi Home (for smart devices)
If you have smart appliances (cameras, lamps, sockets), open the Mi Home app and:
- Go to Profile. โ Settings โ Security.
- Select Network settings โ Port inspection.
- The app will show you a list of open ports and their status ("Safe" or "Risk").
Method 2: Scanning a router via a web interface
For Mi Router routers:
- Connect to the router network.
- Enter 192.168.31.1 (or miwifi.com) in your browser.
- Go to the Supplementary โ Security โ Port inspection.
- Click Scan โ the system will show all open ports and related services.
Method 3: Online services for external verification IP
To check which ports are visible from the Internet (for example, for remote access), use:
- ๐ YouGetSignal โ Enter your own IP And scan the popular ports.
- ๐ GRC ShieldsUP! โ detailed vulnerability analysis.
- ๐ก๏ธ Pentest-Tools โ Professional scanner (requires registration).
๐ก
If you are using the mobile internet (4G/5G), Online scanners will show your carrier's ports, not your smartphone. To check your phone, connect to Wi-Fi and scan your local network.
Closing ports on Xiaomi routers (Mi Router, Redmi Router)
Xiaomi routers often come with open ports for remote management or easy setup.
Step 1: Disabling Remote Access
By default, Mi Router can be enabled via Xiaomi's cloud to disable:
- Go to the router's web interface (192.168.31.1).
- Go to General Settings โ Remote access.
- Turn off the options: ๐ Cloud access ๐ External access via miwifi.com domain
Save the settings and restart the router.
Step 2: Manually close ports through Port Forwarding
If you have previously opened ports for games, torrents or cameras, you should delete them:
- In the web interface, go to additional โ Port forwarding (port forwarding).
- Remove all rules except those used for mission-critical services (e.g, IP-password-protected cameras).
- For full lock, add the rule: Protocol: TCP/UDP Port port: 1-65535 IP-address: 0.0.0.0 Action: Drop (Block) โ ๏ธ This will block all incoming connections except those allowed by other regulations!
Step 3: Set up firewall (Firewall)
The Mi Router firmware has a built-in firewall:
- Go to the Supplementary โ Security โ Firewall.
- Turn on the options: ๐ก๏ธ Packet filtering ๐ซ Lockdown ICMP (ping) ๐ Protection against DoS attacks
Firewall rules
22, 23, 554, 7878
Remote access via Xiaomi cloud is disabled
Removed unnecessary Port Forwarding rules
Firewall (Firewall) is activated
Updated router firmware to the latest version-->
Closing ports on Xiaomi smartphones (Redmi, POCO, Mi)
On Xiaomi smartphones, ports are usually closed by default, but some apps (such as Mi Push Service or other apps) are closed by default. ADB) They can open them up for the background. Here's how to control it:
Method 1: Disabling unnecessary services
Some system services MIUI Open the ports for notification or synchronization, to turn them off:
- Go to Settings โ Applications โ Application Management.
- Find and disable auto-start for: ๐ฑ Mi Push Service (port 37215) ๐ Mi Cloud Sync (port 443) ๐ฎ Game Turbo (can open ports for multiplayer)
Settings โ Accounts โ Mi Account
Synchronization of data
Method 2: Locking ports through the MIUI Firewall
MIUI It has a built-in firewall, but it is hidden in the developer settings:
- Activate Developer Mode: Go to Settings โ About Phone and click on MIUI Version 7 times.
- Back to Settings โ Additionally. โ For developers.
- Find the Network Firewall (MIUI Firewall and turn it on.
- Add locking rules for ports 5555 (ADB) 7878 (MiIO) if not in use.
How to check if port 5555 is closed (ADB) smartphone?
Closing ports on Xiaomi smart devices (cameras, lamps, sockets)
Xiaomiโs smart devices (such as the Mi Home Security Camera or Yeelight) often require open ports to work over the Internet.
Step 1: Disable Remote Access in Mi Home
By default, Xiaomi cameras and outlets can be accessed from anywhere in the world, to limit access to only the home network:
- Open the Mi Home app.
- Select a device (such as a camera).
- Go to Settings. โ Public access.
- Turn off the options: ๐ Remote access ๐ Linked public access
Step 2: Changing ports by default
Some devices (e.g. cameras) use standard ports that are scanned by bots, and can be changed:
- In Mi Home, select the device โ Settings โ Additionally.
- Find the Network Settings or Port section RTSP (camera-wise).
- Change the port from 554 to a random port (e.g. 12345).
- Save and restart the device.
Step 3: Locking devices in the router
If a smart device doesnโt need to access the internet (like a Yeelight bulb that you only control over a local area network), lock it. MAC-router:
- Find it. MAC-Device address in Mi Home (Device About section).
- In the router's web interface, go to Additional โ Access control.
- Add a lock rule to this MAC-Addresses with effect Prohibit access to WAN.
โ ๏ธ Note: If you use Xiaomi on a corporate network, port closures may conflict with company policies (e.g., lockdowns). VPN or RDP). Before the changes, agree with them. IT-department!