Is it possible to ping 8.8.8.8 without a public IP associated with an Azure VM?

Niket Kumar Singh 410 Reputation points
2024-10-16T10:34:18.13+00:00

I am currently working with two Azure VMs (one running Linux and the other running Windows) that are located in the same virtual network. While I can access the internet from both machines (browsing, running sudo apt update, and using curl), I'm facing issues with ICMP pings.

Current Situation:

  • VMs: Both VMs are in the same Azure virtual network.
  • Internet Access: Internet access is available; I can browse and run updates.
  • Ping: I can ping other machines within the same virtual network, but I'm unable to ping external addresses like 8.8.8.8 or google.com.

Firewall Settings:

  • The firewall is disabled on both VMs.
  • I have added inbound rules for ICMP on both VMs.

Understanding:

From my research, I understand that:

  • Outbound ICMP Pings are possible only when the VM has a dedicated public IP associated with its NIC.
  • Neither NAT Gateway nor Load Balancer outbound rules can help with this issue.
  • The suggested workaround is to use TCP Ping (like Telnet or Test-NetConnection) instead of ICMP Ping.

Questions:

  1. Is it possible to enable ICMP pinging to external IPs (like 8.8.8.8) from an Azure VM without a public IP?
  2. Are there any additional configurations or settings I should consider to achieve this?

Any guidance or suggestions would be greatly appreciated!

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.
2,577 questions
Azure Network Watcher
Azure Network Watcher
An Azure service that is used to monitor, diagnose, and gain insights into network performance and health.
177 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
798 questions
0 comments No comments
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 48,081 Reputation points Microsoft Employee
    2024-10-16T11:43:48.1433333+00:00

    @Niket Kumar Singh ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    Your observation is correct.

    Outbound ICMP Pings are possible only when the VM has a dedicated public IP associated with its NIC.

    To address your queries,

    1. Is it possible to enable ICMP pinging to external IPs (like 8.8.8.8) from an Azure VM without a public IP?
      1. No, it's not possible
      2. You should have a dedicated Public IP Attached to it
    2. Are there any additional configurations or settings I should consider to achieve this?
      1. Should you require this, please assign a Public IP to the VM's NIC

    Hope this clarifies.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.