我有两个虚拟主机在 Azure 上运行。一种是 Windows 2008,第二种是 RedHat Linux。
我希望能够 ping 这些主机(从位于 Azure 网络之外的笔记本电脑)。 怎么做?
我已经在这些主机上打开了一些端口。我可以远程登录到这些端口。但我希望能够 ping 主机,因为我想知道它们是否还活着,以及延迟时间。
我用 google 搜索过,但不知道是否可以 ping(或不可以)以及如何进行。
谢谢
最佳答案
摘自这篇博文:https://blogs.msdn.microsoft.com/mast/2014/06/22/use-port-pings-instead-of-icmp-to-test-azure-vm-connectivity/ ,您需要使用 port ping
而不是使用 psping
等工具的简单 ping
。
Because the ICMP protocol is not permitted through the Azure load balancer, you will notice that you are unable to ping an Azure VM from the internet, and from within the Azure VM, you are unable to ping internet locations.
Testing from on-premises to the Azure VM shows the same behavior. The ICMP traffic is blocked by the Azure load balancer and the ping requests timeout. But if you instead do a port ping, they will succeed (assuming the VM is running, isn’t blocking the port in the guest firewall, and the port has a configured endpoint for the VM).
关于linux - 如何为 Azure 上运行的虚拟机启用 ping?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39611763/