TCP traceroute works fine but not UDP

networkingpingunix

So I ran into this issue where doing

traceroute some-server.abc.com

returned *** for multiple lines and finally reached maximum hops limit.

Doing a traceroute -T some-server.abc.com works perfectly fine. I checked the man pages and by default traceroute uses UDP protocol and -T forces it to use TCP probe packets.

What can be the possible reasons for such behaviour.
Also note that ping works fine with this host.

Best Answer

Quote from traceroute Wikipedia page:

On Unix-like operating systems, the traceroute utility uses User Datagram Protocol (UDP) datagrams by default, with destination port numbers ranging from 33434 to 33534. The traceroute utility usually has an option to instead use ICMP Echo Request (type 8) packets, like the Windows tracert utility does, or to use TCP SYN packets.[1][2] If a network has a firewall and operates both Windows and Unix-like systems, more than one protocol must be enabled inbound through the firewall for traceroute to work and receive replies.

Most likely reason why traceroute UDP packets are not getting through is firewall.

Related Topic