Ping not working for ubuntu virtual machines on azure
ICMP (Ping) is blocked in Azure so by design this will fail. You can get this to work depending on how you are setting up your network and what you are trying to ping. See https://social.msdn.microsoft.com/Forums/en-US/0669112c-a6dd-4290-bcde-9ce7b9d60d80/how-do-i-enable-pinging-a-vm for more details:
•Ping external address from Azure VM - does not work as Azure does not
permit outbound ICMP•Ping Azure VM from external address - does not work as Azure does not
permit inbound ICMP•Ping between Azure VMs using internal IP (DIP) - works, but guest OS
firewall must be configured to allow it as by default ICMP is blocked
by the guest.•Ping between Azure VM and on-premise through Azure Connect
(point-to-point IPSec VPN tunnel) or Virtual Network Gateway
(site-to-site IPSec VPN tunnel) - works, but guest OS firewall must be
configured to allow it as by default ICMP is blocked by the guest.To allow ICMP on a Windows VM, from an elevated command prompt, run:
netsh advfirewall firewall add rule name="ICMPv6" dir=in action=allow
enable=yes protocol=icmpv6 netsh advfirewall firewall add rule
name="ICMPV4" dir=in action=allow enable=yes protocol=icmpv4
UPDATE 2021: As of 2021, you can ping to your azure virtual machine by opening the ICMP port.
Just go to Azure Portal > Virtual Machines > Select your Virtual Machine > Networking > Add inbound port rule > Select ICMP under Protocol (customize as per your needs) > Add
Can not ping to Azure VM
The remote computer refused the network connection.
According to the error, you need check whether your app is running firstly.Based on my experience, if Azure NSG or Firewall block the port 80, you should get error Request timed out
.
You could use netstat -ant|grep 80
Please ensure port 80 is listening like below:
tcp 0 0 :::80 :::* LISTEN
Note: port 80 should listening on tcp not tcp6.
Also, you could use telnet
to check whether the port 80 is open on your public IP.
telnet yourip 80
Why I can't ping Azure VM from my local PC
ICMP protocol is not permitted through the Azure load balancer (inbound or outbound) which means that you can't do a simple ping to your VM. There is a : user voice request for this to be enabled here.
This blog here describes how you can use a port ping as an alternative.
There is some documentation on how to set up an Instance Level IP, which would circumnavigate the load balancer and give direct communication to the Virtual Machine, but I haven't tried this approach (I'm giving it a go right now, will report back)
Can't PsPing to Azure VM
You should check whether your port is listening. According to your description, it seems that port 80 is not listening on your VM. You could use the following command to check.
netstat -ant|findstr 80
Please ensure the port 80 is listening on tcp, the result should be like below:
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING InHost
Also, you should check your NSG. NSG could be associated to a subnet or a VM nic.
Azure VM: Can't access/ping port 80
I believe that Azure will block ping requests
http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/7ce4e4c5-c714-492f-8cd6-424c01552195
Azure Linux server not responding
If you've already used the machine, you already have all the information you need to connect to the Virtual Machine via SSH. If you created the VM using the Quick Create option in the management portal, you created a password-based VM - easy.
If you cannot connect using the same ssh
command you used before, then perhaps the machine is hung or went down.
In the portal, find the VM, select it, and use the Restart option to reset it. Try connecting again to the machine in a few minutes.
Related Topics
Elf Header or Installation Issue with Bcrypt in Docker Container
How to Configure Bash to Handle Crlf Shell Scripts
How to Build an App for an Old Linux Distribution, and Avoid the Fatal: Kernel Too Old Error
Bash Echo with an $ Character Outside the String
Automatic Login on Angstrom Linux
How to Configure a Systemd Service to Restart Periodically
What Is Preemption/What Is a Preemtible Kernel? What Is It Good For
How to Get Perf to Find Symbols in My Program
How to Define a Bash Alias as a Sequence of Multiple Commands
Delete a Column from a Delimited File in Linux
Linking a C Library and Its Supporting Library in Swift (Linux)
Explicitly Invoke Sig_Dfl/Sig_Ign Handlers on Linux