My computer is connected to the LAN behind a ROS (RouterOS) router, with port 3389 (Remote Desktop Protocol - RDP) mapped to the ROS public IP on port 2059. Someone is brute-forcing my remote desktop connection, and my goal is to add the attacking IP address to a blacklist after three failed password attempts. Below are my ROS firewall rules, but even I am being added to the blacklist before I even reach the password entry screen when I try to remote connect myself. My objective is specifically to blacklist the IP only after three failed password attempts.
Below are all of my current ROS (RouterOS) firewall rules. Could you please help me modify them or rewrite a new set of rules that can meet my requirement?
A partial configuration does not help that much. You might want post at minimum your full firewall rules or ideally the redacted export if you want any meaningful help.
The critical question is are the current rules shown above getting hit? Open ports at some level always expose some risk...now using a different port is helpful but perhaps you change the port which may minimize the risk somewhat. The other thing to consider is using a "whitelist" and/or require VPN to access RDP.