...
Click the dropdown “Services” from the top-right menu.
Find the “EC2” service section.
Click the “Security Groups” option located in the left menu.
Click “Create Security Group”
Here, you’ll set the information and rules for the group.
Click “Add Rule” in the “Inbound” tab.
Next, set “Type” under “All Traffic”, “Source” under “Custom” and the host/IP address for whitelisting in the text box.
Once you have added a description, click “Create”.
From the “EC2 Dashboard”, click “Running Instances”.
Select the instance for which you want the rule to run.
Click the dropdown “Actions”.
Go to “Networking” and click “Change Security Groups”.
Select the security group you have created.
Click “Assign Security Group”.
How to Whitelist an IP on Azure
...
VPC firewall rules