Navigate to Start->Administrative Tools->Windows Firewall with Advanced Security
In left navigation left click Inbound Rules
In the Right navigation left click New Rule…
Click Custom and Next
Click All programs and Next
Select Protocol Type and ports or choose Any and All
In Which remote IP addresses does this rule apply to click “These IP addresses” and click Add…
Enter public IP and click OK
Click Allow the connection and Next
Choose when rule applies and Next
Give the rule a name and description. Click Next.
You can also add a rule from the command line. The below example adds a rule to allow Remote Desktop services from public IP 184.108.40.206 with the rule name of RDesktopRule.
netsh advfirewall firewall add rule name="RDesktopRule" action=allow remoteip=220.127.116.11 protocol=TCP dir=in localport=3389