How to block internet access in azure virtual network?

leesh2143 41 Reputation points
2021-06-09T00:19:08.107+00:00

Hi, i'm alan.

I have a question about azure cloud network setting.

I just want to block or allow internet access in azure virtual network.

for example:

  • virtual network address space in 10.0.0.0/8
  • vm1 ip is 10.1.0.4 / external ip none.
  • vm2 ip is 10.2.0.5 / external ip none.

so, i just want to block internet access vm1, and then allow internet access vm2.
is it posibble in route table? or possible anything else(solution, service, etc...)?

so, i tried to route table override 0.0.0.0/0 to setting.
but, after setting then internet is block in virtual network only.
not allow internet service in specific ip address.

could you tell me some solution?

Thanks
Alan

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,146 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 108.7K Reputation points MVP
    2021-06-09T15:14:30.587+00:00

    Hi @leesh2143 ,

    you can use Azure Network Security Groups (NSGs) to limit internet outbound traffic.
    NSGs could be associated with subnets and/or VMs
    With Security Rules (for inbound and/or outbound traffic) it's possible to block outgoing internet traffic using the service tag Internet in the Security Rule.

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten


3 additional answers

Sort by: Most helpful
  1. Andreas Baumgarten 108.7K Reputation points MVP
    2022-04-18T21:42:54.507+00:00

    Hi anonymous user ,

    create a deny Security Rule for internet access to any destination ip with priority 200 (for instance).
    Create another Security Rule witch will allow internet access to particular destination IP (for instance priority 190 / lower number than the deny Security Rule).

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten


  2. Arthi Janakinathan 26 Reputation points
    2022-04-19T06:30:10.327+00:00

    How to avoid snipping in Azure Virtual desktop

    0 comments No comments

  3. satya prakash yadav 0 Reputation points
    2023-04-13T15:08:10.7666667+00:00

    Here are a few common methods you can disable or disconnect the VM's virtual network interface card (NIC) from the network, effectively blocking its internet access.

    0 comments No comments

Your answer

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