Sudden High CPU Usage on a Mikrotik Router
A branch office router's CPU usage suddenly spiking to 100% and cutting off internet access.
Problem
The Mikrotik router at a branch office suddenly spiked to 100% CPU usage, cutting off internet access for the entire office.
Cause
The Winbox management port (8291) had been left open on the WAN interface; the router was being continuously scanned and probed from the internet. The RouterOS version also hadn't been updated in a long time.
Solution
Added drop rules in the input chain for management ports (winbox, ssh, www) on the WAN interface and restricted access to trusted IPs only, used /tool profile to identify the process consuming CPU, and upgraded RouterOS to the latest version.
/ip firewall filter add chain=input action=drop in-interface=WAN protocol=tcp dst-port=8291
/ip firewall filter add chain=input action=drop in-interface=WAN protocol=tcp dst-port=22
/ip firewall filter add chain=input action=drop in-interface=WAN protocol=tcp dst-port=80,443
/tool profile