Share via


Restrict to RDP from other countries

Question

Monday, August 13, 2018 3:15 PM

Hello, I need a help from you  regarding Microsoft Azure VM's. I have a Server placed in Azure and i want to specify that only users from specific country can login and work, other countries should be block and i want to allow for some exception countries also.

I wanna to know the user can RDP from US and Australia only, from other countries it should be block.

One more thing can I specifically allow public IP in Microsoft Azure VM for RDP ? If yes, please share a article for my help.

Thanks a lot and waiting for your quick response.

All replies (4)

Monday, August 13, 2018 6:23 PM

You can use Network Security Groups to limit the access to your VM

/en-us/azure/virtual-network/security-overview

NSGs will allow you to specific IP address or IP ranges that will have the ability to make a connection to your VM. 

We do not have anything that lets you pick the IP location to block however if you want to lookup what IP address's are associated with a specific country you then could only allow that range. 


Wednesday, August 15, 2018 8:21 AM

Just checking in if you have had a chance to see the previous response. If this answers your query, do click “Mark as Answer” and Up-Vote for the same.


Sunday, March 24, 2019 10:46 AM

is there anyway  to block by country instead of specific ip ranges? - thanks


Monday, March 25, 2019 6:12 AM

Hi, 

As Micah answered you can do this using NSGs. At the following link, you can find IP address ranges by country.

If you don't want to create many NSG rules for every country you can simply create few rules for the address ranges that you want to allow RDP and create one more to block all the other IP ranges.

example :

Allow XXX.XXX.XXX.XXX/29

Deny All 0.0.0.0/0

Please, If you think your question has been answered click "Mark as Answer" if just helped click "Vote as helpful". This can be beneficial to other community members reading this forum thread.