Why can I ping an IP address but not 'traceroute' it?
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Take control of your privacy with Proton's trusted, Swiss-based, secure services.
Choose what you need and safeguard your digital life:
Mail: https://go.getproton.me/SH1CU
VPN: https://go.getproton.me/SH1DI
Password Manager: https://go.getproton.me/SH1DJ
Drive: https://go.getproton.me/SH1CT
Music by Eric Matyas
https://www.soundimage.org
Track title: Mysterious Puzzle
--
Chapters
00:00 Why Can I Ping An Ip Address But Not 'Traceroute' It?
00:49 Answer 1 Score 2
00:59 Answer 2 Score 26
01:41 Accepted Answer Score 57
02:31 Answer 4 Score 4
02:51 Thank you
--
Full question
https://superuser.com/questions/278952/w...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#networking
#avk47
ACCEPTED ANSWER
Score 57
Try using a different method in your traceroute, for example TCP SYN or ICMP instead of the default UDP method.
For example note the difference between ICMP and TCP:
x@x:~$ ping -qc4 94.254.2.51
PING 94.254.2.51 (94.254.2.51) 56(84) bytes of data.
--- 94.254.3.90 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3009ms
rtt min/avg/max/mdev = 7.781/7.807/7.836/0.067 ms
x@x:~$ sudo traceroute -I 94.254.2.51
traceroute to 94.254.2.51 (94.254.2.51), 30 hops max, 40 byte packets
1 <REDACTED>
2 <REDACTED>
3 <REDACTED>
4 <REDACTED>
5 netnod-ix-ge-a-sth-1500.bahnhof.net (194.68.123.85) 1.307 ms 1.299 ms 1.432 ms
6 sto-cr1.sto-cr3.bahnhof.net (85.24.151.165) 7.166 ms 7.364 ms 7.336 ms
7 sto-cr3.gav-cr1.bahnhof.net (85.24.151.195) 7.251 ms 7.099 ms 7.220 ms
8 zitius-a322-gw-c.bahnhof.net (85.24.153.249) 7.059 ms 7.074 ms 7.145 ms
9 h-2-51.A322.priv.bahnhof.se (94.254.2.51) 7.619 ms 7.750 ms 8.070 ms
x@x:~$ sudo traceroute -T 94.254.2.51
traceroute to 94.254.2.51 (94.254.2.51), 30 hops max, 40 byte packets
1 <REDACTED>
2 <REDACTED>
3 <REDACTED>
4 <REDACTED>
5 netnod-ix-ge-a-sth-1500.bahnhof.net (194.68.123.85) 1.621 ms 1.683 ms 1.817 ms
6 sto-cr1.sto-cr3.bahnhof.net (85.24.151.165) 8.530 ms 7.861 ms 7.820 ms
7 sto-cr3.gav-cr1.bahnhof.net (85.24.151.195) 7.724 ms 7.539 ms 7.486 ms
8 zitius-a322-gw-c.bahnhof.net (85.24.153.249) 7.572 ms 7.537 ms 7.553 ms
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
ANSWER 2
Score 26
Traceroute is based on ICMP or UDP packets. It effectively pings each router on the path between you and censored.censored. It increases the Time-To-Live (TTL) for each subsequent packet it sends (from 1-30 normally) expecting that as each packet is sent with an increased TTL from the last, the next router in the path will return an error code.
If hop 6 isn't responding, it's probably specifically blocking ICMP/UDP messages. Ping therefore works because the routers between you and it are just passing the ICMP/UDP packets through to it rather than responding to them, as they do with a traceroute.
ANSWER 3
Score 4
Sometimes it's worth using ping
to get traceroute-like information:
#!/bin/bash
for TTL in 1 2 3 4 5 6 7 8 9 10 11 12
do
ping -c 1 -n -t $TTL a.b.c.d
done
By calling ping with a -t $TTL argument, you can sometimes elude the firewall, and find out IP addresses and so forth of routers behind firewalls.
ANSWER 4
Score 2
Traceroute relies on ICMP messages, which some routers might be configured to not respond to.