The Unix command
traceroute traces the IP addresses of the nodes from a source node to a destination node. Every node in between has an incoming and an outgoing interface.
traceroute -n dst on
src will show the IP addresses of src, dst and all incoming interfaces of the hops in between.
But how to trace the outging IP addresses?
I tried the
ping -R suggestion but it does not seem to work. This is the traceroute to a public web server:
$ ping -n -c 1 -R 184.108.40.206 PING 220.127.116.11 (18.104.22.168) 56(124) bytes of data. 64 bytes from 22.214.171.124: icmp_req=1 ttl=57 time=47.4 ms RR: 192.168.2.111 169.254.1.1 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 10.71.3.253 22.214.171.124 --- 126.96.36.199 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 47.441/47.441/47.441/0.000 ms
And this is the IP address of my dial-up connection.
$ curl -s https://toolbox.googleapps.com/apps/browserinfo/info/ | jq -r .remoteAddr 188.8.131.52
But it has not been recorded by the ping command. What can be the reason?