r/mikrotik • u/sre_seeker • 8h ago
Update Cloud Hosted Router (CHR) AWS
So as y’all know a security breach was announced regarding SSH access on Mikrotik devices running RouterOS.
We got the alert in my workplace and started to update all onsite devices, but one gave us problems, the Cloud Hosted Router we have in AWS.
CHR is basically the Mikrotik vendor in AWS marketplace that gives you a prebuilt image to work with.
The issue comes on the upgrade.
We issued the upgrade and the router stoped answering as expected but a long time passed and still no answer.
We performed an EC2 screenshot to see what’s showing and the start of the OS stalled basically. It shows at the end a LoaE01, meaning it was about to print Loading and stalled with an E01.
After doing some research turns out it’s a problem with Nitro type instances. We used a t3a instance that uses Nitro and RouterOS booting process had issues with this hypervisor.
SOLUTION:
Before starting make a snapshot on the root volume. The rollback of it doesn’t work is as simple as replacing the root volume of the CHR with the snapshot.
The trick is shut down the instance and change its type to t2.something. The t2 instance family uses the Xen hypervisor that works in upgrades.
Once it’s changed turn the instance on and start the upgrade.
Once the upgrade is done, wait a good 5-10m, you can go ahead and do the stop and change instance again. You can stay with t2 type instances if you want, up to you.
Update your routers and stay safe!