XiaoMi Router 3 Turns On SHH and Install Shadowsocks
These instructions will get you a copy of the project up and running on your router for successful install Shadowsocks, Complete the function of accessing Google in local LAN.
XiaoMi Router 3 Information
Processor: MT7620A
ROM: 128MB SLC Nand Flash
RAM: 128MB DDR2
Wi-Fi protocols: 802.11n,2.4GHz 2x2 (speed up to 300Mbps);5GHz 2x2 (speed up to 867Mbps)
Operating system: MiWiFi OS(Based on OpenWRT)
ROM version number: 2.25.46
Open SSH
- Open SSH - Open SSH, login XiaoMi account,Check the root password and remember.
- SSH Toolkit Download
1. Please copy the downloaded tool bin file to the root directory of the U disk (FAT/FAT32 format) to ensure that the file name is miwifi_ssh.bin.
2. Disconnect the Power of the xiaomi router and insert the U disk into the USB interface.
3. Hold down the reset button and then reconnect the power. The indicator will turn yellow and the reset key will be released.
4. Wait 3-5 seconds after the installation is complete, the xiaomi router will automatically restart, after that,enjoy it.
$ ssh root@192.168.31.1
# Input the root password,
$ passwd # change root password recommanded
# Login to the router terminal Success
$ cd /tmp &&rm -rf miwifi.sh && curl -O https://raw.githubusercontent.com/chyidl/xmr3ss/master/miwifi.sh && chmod +x miwifi.sh && sh ./miwifi.sh
- copy shadowsocks-ssserver.service to /etc/systemd/system/shadowsocks-server.service
- edit /etc/shadowsocks.json to config shadowsocks
- exec sudo systemctl enable shadowsocks-server and systemctl start shadowsocks-server
- for google home
$ iptables -t nat -A PREROUTING -s 192.168.1.1/24 -p udp --dport 53 -j DNAT --to 192.168.1.1
$ iptables -t nat -A PREROUTING -s 192.168.1.1/24 -p tcp --dport 53 -j DNAT --to 192.168.1.1
$ iptables -I PREROUTING -t nat -p udp -d 8.8.4.4 --dport 53 -j REDIRECT --to-ports 1053
$ iptables -I PREROUTING -t nat -p udp -d 8.8.8.8 --dport 53 -j REDIRECT --to-ports 1053
#iptables rules forever avalid
$ iptables-save > /etc/iptables-script # save iptables rule
$ iptables-retore > /etc/iptables-script # recorver rule
$ echo '/usr/sbin/iptables-restart /etc/iptables-script' >> /etc/rc.local
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone who's code was used
- Inspiration
- etc