linux - 如何为 Azure 上运行的虚拟机启用 ping?

标签 linux windows azure redhat

我有两个虚拟主机在 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/

相关文章:

java - 在 AWS EC2 Linux 上的 Java 进程中运行 PhantomJS

c++ - 了解位运算及其效果

javascript - 使用Rhino JavaScript引擎的Windows应用程序?

azure - 如何在VM之外访问安装在Azure VM(VM角色)上的sql服务器?

azure - 在 .Net Core Function Orchestrator 中调用 JavaScript Azure Function 作为事件函数

linux - "Minus"使用Linux命令对两个文件进行操作

linux - 如何从网站上获取所有热链接图像?

java - Azure 数据工厂 - 无法验证 invalid_grant

linux - 无法使用 Eclipse 在 Windows 上编译 Linux

c# - 从 Windows 到 Linux 构建 C# 应用程序