【Xiaomi Router R2D Flashing】A computer in the LAN accesses the management interface and hard disk of the Xiaomi Router R2D

origin

In the past few days, the broadband at home has been upgraded from 300Mb to 1000Mb. The maximum wifi speed of the Xiaomi router R2D bought at 699 at first does not exceed 300Mb. I decided to replace the main router at home with WTA301 sent by China Telecom. After all, wifi6 is more fragrant than wifi4~

I didn't want to waste the Xiaomi router R2D, so I connected the computer and the Xiaomi router to WTA301. I didn't expect to find that the computers in the LAN could not access the management interface and shared hard disk of the Xiaomi router! ! ! Yonago, you managed to get my attention~~

I searched with Du Niang and found the most useful article on the method of accessing Xiaomi’s routing hard drive on the same network segment or external network . However, some steps in the article were written briefly, and it took me a little thought, so I recorded it~

Web environment

LAN gateway of WTA301 main router: 192.168.0.1
Xiaomi router: 192.168.0.2
Computer: 192.168.0.3

Purpose

  1. You can enter 192.168.0.2 on the computer browser to access the management interface of the Xiaomi router
    insert image description here

  2. Enter \192.168.0.2 in the [Run] window of the computer to access the hard disk of the Xiaomi router

operate

1. Download Xiaomi router development version ROM

1. Open the Xiaomi router official website

Download ROMs

2. Select the development version ROM, the author uses the Xiaomi router R2D

Select the development version ROM

3. Flash, refer to the official flash steps for specific steps

insert image description here

2. Brush into SSH

1. Open the Xiaomi router official website , click the [Open] button

insert image description here

2. Scroll the webpage and click the [Open SSH tool] button

insert image description here

3. Log in to the Xiaomi account, download the toolkit, remember the root password, and follow the official steps to swipe into SSH (see the position of icon 3 below)

insert image description here

3. Turn off the WAN firewall

1. Connect the computer to the LAN port of the Xiaomi router , use putty.exe to connect to the Xiaomi router (the default LAN gateway of the Xiaomi router is 192.168.31.1), and click the [open] button

insert image description here

2. Log in with the root user + password, the password of the root user is obtained in the third small step of flashing into SSH in this article

insert image description here

3. Modify the firewall configuration

vim /etc/config/firewall

Modify the configuration whose name is wan, change REJECT to ACCEPT to
use ps: vim operation, mention it casually, you will skip the
modified content, press [i] key
to save the content, press [wq] key
insert image description here

4. Restart the firewall service

/etc/init.d/firewall restart

insert image description here

Fourth, modify the samba service

1. Modify the samba service configuration

vim /etc/config/firewall

Put a space after interfaces = br-lan, and enter eth0.2
ps:br-lan refers to all ip in the local area network (can be represented by eth0.1) and its own loop (can be represented by lo)
eth0.2 refers to wan
insert image description here

2. Add the write permission of the computer

vim /userdisk/datacenterConfig/nonLoginMac.cfg

Enter the mac address of the computer in the format separated by:
insert image description here

3. Restart the samba service

If the external network IP of the Xiaomi router has changed, be sure to restart the samba service! ! !

/etc/init.d/samba restart

insert image description here

Five, look at the effect

1. Connect the computer to the LAN port of the main router , the ip is 192.168.0.3 in the environment, and directly enter 192.168.0.2 in the browser to access the management interface of the Xiaomi router

2. Enter \192.168.0.2 in the [Run] window of the computer to access the hard disk of the Xiaomi router

insert image description here

Guess you like

Origin blog.csdn.net/guggle15/article/details/129460507