Not able to restrict access to vm only by certain ips by creating inbound rules

Athira Chandran 20 Reputation points
2025-10-21T06:36:16.35+00:00

We had migrated our vm from subscription to other but now when we set inbound rule to restrict access only by certain IP's, we are not able to access the vm. As a test, we allow all IPs and that's working fine.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ganesh Patapati 10,385 Reputation points Microsoft External Staff Moderator
    2025-10-21T13:42:56.1666667+00:00

    Hello Athira Chandran

    Can you please share the few follow-up questions that could help clarify the situation:

    1. What specific inbound rules have you configured (IP addresses/ranges)?
    2. Can you confirm if your current IP address is listed in the allowed rules?
    3. Have you checked the priority order of your rules in the Network Security Group?
    4. Are there any logs that indicate which rule is responding with the block?
    5. Can you please share the Screenshots of NSG rules created by you in the Private Messages.

    Meantime,

    1. Ensure that the IP addresses you've allowed in your inbound rules are accurate and not blocking your own current IP. You can use whatismyip.com to confirm your current IP address and verify if it's included in the allowed list.
    2. Remember that Azure processes rules in order of priority. If you have a broader deny rule that is higher in priority than your specific allow rules, it might be blocking access. Make sure your allow rules are at a higher priority.
    3. a) Go to your VM in the Azure Portal and navigate to the "Support + Troubleshooting" section. b) Use the Connection Troubleshoot feature to test inbound connectivity from one of the allowed IPs to see if there are any issues detected.
    4. If your VM has an internal firewall (like Windows Firewall), make sure it's also configured to allow the IPs you're trying to permit.

    References:

    ---I hope this was helpful!

    If the above is unclear or you are unsure about something, please add a comment below.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.