Forked from phainamikaze/gist:82a57d398e37da2e7f24fb1037420f66
Created
May 23, 2024 09:08
-
-
Save growtopiajaw/961dec0e5f11600b0e84309972b05092 to your computer and use it in GitHub Desktop.
Alibaba Cloud Tech Share – Install Cloud Hosted Router (CHR) RouterOS MikroTik
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Minimal requirements: | |
64bit CPU with virtualization support | |
128 MB or more RAM for the CHR instance | |
128 MB disk space for the CHR virtual hard drive | |
You can use Elastic Compute Engine Starter Package Plan/ Entry Level Using Ubuntu 16.04 64bit | |
1. Open Putty, Login to your ECS using IP address root. (SSH port 22) | |
2. Paste this script to your terminal | |
wget https://download2.mikrotik.com/routeros/6.40.5/chr-6.40.5.img.zip -O chr.img.zip && \ | |
gunzip -c chr.img.zip > chr.img && \ | |
mount -o loop,offset=33554944 chr.img /mnt && \ | |
ADDRESS=`ip addr show eth0 | grep global | cut -d' ' -f 6 | head -n 1` && \ | |
GATEWAY=`ip route list | grep default | cut -d' ' -f 3` && \ | |
echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1] | |
/ip route add gateway=$GATEWAY | |
" > /mnt/rw/autorun.scr && \ | |
umount /mnt && \ | |
echo u > /proc/sysrq-trigger && \ | |
dd if=chr.img bs=1024 of=/dev/vda && \ | |
reboot | |
3. Restart your ECS. | |
4. Login to your CHR using webfig or WinBox. | |
5. Change your username and password for safety. | |
Done!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment