First we have to open up the Windows Defender Firewall panel from the control panel , or by directly typing Windows Defender Firewall with Advanced Security in Windows Start.
- Advanced Settings
- You need to look for Remote Desktop - User Mode (TCP-IN) and (UDP-IN)
3. Double click , Click "Scope" , after that Remote Addresses
Add your specific IP Addresses that should be allowed to connect to RDP , so you can be at safe that no is trying to brute force your accounts , Apply and OK, and that way your RDP connection is now only allowed through these IP Addresses that you have added
If the RDP is local , local addresses can be added also.
For more assistance and help check the forum topic here : https://www.seedthe.net/topic/22-firewall-rdp-connection-through-windows-firewall/?tab=comments#comment-22