Internet for VM without a Public IP

Kiran Kumar K S 21 Reputation points
2022-09-16T06:08:44.45+00:00

Hello,

I have a VM running on Azure. It does not have a Public IP. I am accessing the VM via VPN (Site-to-Site, On-Premises to Azure Virtual Network Gateway).

How can I allow the VM to access the internet? The NSG associated with the VMs NIC/Subnet has the default Internet Outbound rule.

I'm quite new to Azure.

Thanks in advance

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
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

Answer accepted by question author
  1. KapilAnanth 49,851 Reputation points Moderator
    2022-09-16T06:23:02.637+00:00

    Hi @Kiran Kumar K S ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
    I understand that you would like to understand more about outbound internet access from an Azure VM.

    You should be able to access internet just fine from the VM though it does not have a public IP.
    The outbound internet connections will use a random IP belonging to Azure. (This IP might change depending upon availability)

    This is documented here : https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/default-outbound-access
    241680-image.png

    P.S : Note that this is not recommended for production workloads.

    Kindly feel free to let us know should you require additional information

    Cheers,
    Kapil

    ------------------------------------------------------------------

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer.
    Here is how : https://learn.microsoft.com/en-us/answers/support/accepted-answers

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Andreas Baumgarten 129.5K Reputation points MVP Volunteer Moderator
    2022-09-16T06:28:53.657+00:00

    Hi @Kiran Kumar K S ,

    if you are running an Azure VM without an explicit public IP the default outbound access IP is used for internet access from the VM.
    https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/default-outbound-access

    By default the outbound internet access of a VM isn't limited and you should be able to access the internet from the VM.

    ----------

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

    Regards
    Andreas Baumgarten

    1 person found this answer helpful.
    0 comments No comments

  2. Kiran Kumar K S 21 Reputation points
    2022-09-16T08:17:28.363+00:00

    Thanks for the reply anonymous user-MSFT & @Andreas Baumgarten .

    I had actually come across the article.

    It's actually my mistake. I had checked only Ping from my Linux VM to the internet. It's disabled by Azure for some reason?

    nping worked and I've now verified internet access.

    Thanks again.


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.