MS Azure / 无法 ping 云虚拟机

huangapple go评论66阅读模式
英文:

MS Azure / Not able to ping VM

问题

我在Ms Azure中部署了一个虚拟机,并创建了一个新的“Allow ICMP”规则,以允许通过Azure门户对新创建的虚拟机进行ping。

我还在虚拟机上添加了一个防火墙规则,允许传入的ICMP流量。在完成以上两个步骤后,我能够从本地笔记本电脑ping通虚拟机。

现在,为了测试,我更新了虚拟机上的防火墙规则,拒绝传入流量,这导致我无法从本地笔记本电脑ping通虚拟机。

问题是,

> 重新启用虚拟机上的允许传入ICMP流量的防火墙规则后,ping仍然无法正常工作。

为什么在这种情况下会出现这种情况?我是否需要在Azure门户上删除并重新创建ICMP规则?还是我需要重新部署我的虚拟机?

英文:

I have deployed a VM in Ms Azure and created a new "Allow ICMP" rule to allow ping to newly created VM on Azure portal.

I have also added a FW rule on VM to allow incoming ICMP traffic.
I was able to ping VM from my local laptop after above 2 steps.

Now, For testing, I have updated FW rule on VM to deny incoming traffic, which has stopped ping from my local laptop.

Problem is,

> Ping is not working after re-enabling FW rule on VM to allow incoming
> ICMP traffic.

Why this is the case here? Do I need to delete and re-create ICMP rule on Azure portal? OR Do I need to redeploy my VM?

答案1

得分: 1

I tried the same in my environment created virtual machine and allowed ICMP Nsg like below:

MS Azure / 无法 ping 云虚拟机

Ping requests to the virtual machine is supported and the firewall rule can be modified to permit incoming ICMP traffic. However, sometimes modifications to firewall rules might not be immediately or correctly implemented.

When I ping, it shows the request timed out.

MS Azure / 无法 ping 云虚拟机

Go to Remote desktop -> search bar, type Windows Firewall with Advanced Security -> inbound security -> Enabled ICMPv4 -> Apply and ok like below:

MS Azure / 无法 ping 云虚拟机

MS Azure / 无法 ping 云虚拟机

Enabled ICMP like below:

MS Azure / 无法 ping 云虚拟机

Now when I tried to ping, it pings successfully like below:
MS Azure / 无法 ping 云虚拟机

I tried to deny incoming traffic and after re-enabling FW rule on VM to allow incoming ICMP traffic ping work successfully like below:

MS Azure / 无法 ping 云虚拟机

If still issue persists,

  • Check whether the rule is enabled and allowing traffic on the correct port so that the firewall rule setting on the virtual machine is set up properly to allow incoming ICMP traffic. Verify the rule is active and the modifications have been saved.
  • Ensure that NSG is associated with your VM to allow traffic. Make sure no conflicting or overriding rules that could be blocking the traffic. You can also try to disable and re-enable the rule or redeploy the VM.
英文:

I tried the same in my environment created virtual machine and allowed ICMP Nsg like below:

MS Azure / 无法 ping 云虚拟机

Ping requests to the virtual machine is supported and the firewall rule can be modified to permit incoming ICMP traffic. However, sometimes modifications to firewall rules might not be immediately or correctly implemented.

When I ping, it shows the request timed out.

MS Azure / 无法 ping 云虚拟机

Go to Remote desktop -> search bar, type Windows Firewall with Advanced Security -> inbound security -> Enabled ICMPv4 -> Apply and ok like below:

MS Azure / 无法 ping 云虚拟机

MS Azure / 无法 ping 云虚拟机

Enabled ICMP like below:

MS Azure / 无法 ping 云虚拟机

Now when I tried to ping, it pings successfully like below:
MS Azure / 无法 ping 云虚拟机

I tried to deny incoming traffic and after re-enabling FW rule on VM to allow incoming ICMP traffic ping work successfully like below:

MS Azure / 无法 ping 云虚拟机

If still issue persists,

  • Check whether the rule is enabled and allowing traffic on the correct port so that the firewall rule setting on the virtual machine is set up properly to allow incoming ICMP traffic. Verify the rule is active and the modifications have been saved.
  • Ensure that NSG is associated with your VM to allow traffic. Make sure no conflicting or overriding rules that could be blocking the traffic. You can also try to disable and re-enable the rule or redeploy the VM.

huangapple
  • 本文由 发表于 2023年5月20日 22:59:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/76295859.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定