RDP (Remote Desktop Protocol) — is a Microsoft proprietary protocol that enables remote connections to other computers.
To configure, open «Control Panel → System and Security».
Next, go to the «Windows Defender Firewall» menu.
Let's go to the«Advanced Settings» menu.
In the window that appears, select Inbound Rules.
Next, we find the active rule «Remote Desktop - User Mode (TCP-in)».
In Properties of this rule there is the Scope tab where you can specify addresses or address ranges from which you will be able to connect via RDP. In order to filter external connections by IP addresses, you will need to add into the Remote IP address list all IP addresses, address ranges and subnets from which you will allow RDP connections to this computer.
After adding each desired IP address, press OK to make changes.