Is it possible to send traceroutes from Linux Azure VM?

Maksym Bondarenko picture Maksym Bondarenko · Mar 16, 2017 · Viewed 8.2k times · Source

I have created a Linux Azure VM. And I want to send traceroutes from it to my home ip address. However traceroute times out on every hop. I have configured the VM to have public static IP address. And to have inbound and outbound rules for all ports.

Does anybody know what else needs to be configured there in order to successfully send a traceroute?

An interesting fact is that traceroutes succeed from Windows Server Azure VM, but not from Linux Ubuntu 16.04.

The VM has a static IP attached in both cases: Linux and Windows.

One more detail: On Windows Azure VM first 5 hops do not reply, but other ones do. On Linux Azure VM every hop doesn't reply.

Answer

Malt picture Malt · Mar 30, 2017

Jason Ye - MSFT's information is correct, but his answer doesn't actually answer your question.

Traceroue doesn't work on Azure since Azure, by default blocks all ICMP traffic. Since traceroute identifies hops by receiving an ICMP packet (ICMP Time to Live expired) from each hop, you don't see any hops.

This is the same reason why ping doesn't work to from the Internet to machines within Azure.

To work around that, you can give your VM an instance IP address.