Unable to ping a windows machine from linux machine

Buvanesh Bharathwaj 0 Reputation points
2023-10-24T03:35:30.7+00:00

I am facing similar issue. I created 2 azure vnets with each vnet having 2 vms (1 linux and 1 windows machine) and established vnet peering. I am able to ping between linux to linux, windows to windows and windows to linux machines but couldn't ping from a linux machine to a windows machine, either within or outside the vnet. I have opened icmp port at nsg of the nic. Can someone help me out on this.

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,197 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 23,341 Reputation points Microsoft Employee
    2023-10-24T23:05:21.9766667+00:00

    @Buvanesh Bharathwaj

    Thank you for reaching out.

    I understand that you are unable to ping a Windows machine from a Linux machine in Azure, even though they have established VNet peering and opened the ICMP port at the NSG of the NIC. You can ping between Linux to Linux, Windows to Windows, and Windows to Linux machines, but not from a Linux machine to a Windows machine, either within or outside the VNet.

    In order to troubleshoot this issue, you can follow the steps below and see if that helps in resolving the issue.

    • First let's check if the issue is due to networking in Azure. For this you can follow the troubleshooting document here using this you can check if any NSG inbound and outbound rules set are not blocking this connectivity and if there is no routing issue.
    • If the check above is successful, then issue might be likely due to the networking settings within the VMs. In order to help validate this you can run a packet capture at both the VMs simultaneously and check if the ICMP_ECHO packets are reaching the windows VM. You can use Wireshark tool to perform packet capture at the Windows VM and tcpdump for Linux VM.
    • You can also check the routes on the VM. Run the sudo route -n command to check if the correct routes are present in the route table of your Linux VM and route PRINT for the Windows VM.

    Hope this helps! Please let me know if the issue persists, we will gladly continue with our discussion. Thank you!


    ​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments