tracetcp
Bình thường chúng ta sẽ hay dùng câu lệnh: tracert -d <IP>
C:\Users\ThangTran>tracert -d 35.94.124.235 Tracing route to 35.94.124.235 over a maximum of 30 hops 1 <1 ms <1 ms <1 ms 10.40.50.1 2 1 ms 1 ms 1 ms 203.205.57.105 3 34 ms 34 ms 34 ms 183.91.12.157 4 37 ms 37 ms 36 ms 175.100.193.233 5 34 ms 34 ms 34 ms 120.29.216.33 6 189 ms 189 ms 189 ms 180.87.168.58 7 183 ms 185 ms 184 ms 180.87.168.114 8 84 ms 84 ms 84 ms 116.0.67.83 9 * * * Request timed out. 10 * * * Request timed out. 11 193 ms 190 ms 193 ms 63.243.251.1 12 194 ms 194 ms 194 ms 64.86.123.26 13 * * * Request timed out. 14 * * * Request timed out. 15 * * * Request timed out. 16 * * * Request timed out. 17 * * * Request timed out. 18 * * * Request timed out. 19 * * * Request timed out. 20 * * * Request timed out. 21 * * * Request timed out. 22 * * * Request timed out. 23 * * * Request timed out. 24 * * * Request timed out. 25 * * * Request timed out. 26 * * * Request timed out. 27 * * * Request timed out. 28 * * * Request timed out. 29 * * * Request timed out. 30 * * * Request timed out. Trace complete.
Nếu các router chặn gói ICMP thì bạn sẽ nhận về timeout như kết qua bên trên.
Nên mình tự hỏi có thể trace bằng gói TCP không nhỉ thì có nhé.
https://github.com/0xcafed00d/tracetcp

Click to download và sau đó bạn giải nén ra nhé.
https://github.com/0xcafed00d/tracetcp/releases/tag/v1.0.3
Bạn có thể gặp error nếu bạn chưa cài winpcap
http://www.winpcap.org/
C:\Users\ThangTran>tracetcp.exe 35.94.xxx.xxx:443 Tracing route to 35.94.xxx.xxx [ec2-35-94-xxx-xxx.us-west-2.compute.amazonaws.com] on port 443 Over a maximum of 30 hops. 1 1 ms 1 ms 0 ms 10.40.50.1 2 9 ms 3 ms 3 ms 203.205.57.105 [static.cmcti.vn] 3 39 ms 38 ms 36 ms 183.91.12.157 [static.cmcti.vn] 4 43 ms 38 ms 43 ms 175.100.193.233 5 * 37 ms 37 ms 120.29.216.33 [ix-hge-0-0-0-2-730.ecore1.hk2-hongkong.as6453.net] 6 192 ms 191 ms 191 ms 180.87.168.58 [if-bundle-8-2.qcore1.hk2-hongkong.as6453.net] 7 * * * Request timed out. 8 92 ms 96 ms 87 ms 116.0.67.34 [if-et-16-2.hcore1.kv8-chiba.as6453.net] 9 * * * Request timed out. 10 * * * Request timed out. 11 205 ms 192 ms 196 ms 63.243.251.1 [if-ae-0-2.tcore1.sv1-santaclara.as6453.net] 12 190 ms 193 ms 186 ms 64.86.123.94 [if-ae-20-2.tcore1.00s-seattle.as6453.net] 13 * * * Request timed out. 14 * 193 ms * 108.166.228.51 15 Destination Reached in 183 ms. Connection established to 35.94.124.235 Trace Complete.
Ngoài ra mình còn thấy tác giả code thêm tcp mà bằng golang.
https://github.com/0xcafed00d/tracetcp-go
Bạn có thể tìm hiểu thêm.
tcptraceroute
Refer to: https://networkhunt.com/how-to-run-tcp-traceroute-in-centos-linux/
Bạn có thể run yum install tcptraceroute -y
trên centos
Hoặc apt install tcptraceroute -y
trên ubuntu
Hoặc apk add tcptraceroute -y
trên alpine
sudo tcptraceroute google.com 443 Selected device en0, address 192.168.10.63, port 60749 for outgoing packets Tracing the path to api.opendns.com (67.215.92.210) on TCP port 443 (https), 30 hops max 1 192.168.10.254 1.893 ms 1.787 ms 1.123 ms 2 * * * 3 te-0-7-0-11-sur02.lowell.ma.boston.comcast.net (68.85.161.117) 11.768 ms 36.209 ms 11.473 ms 4 be-21-ar01.needham.ma.boston.comcast.net (68.85.106.45) 14.006 ms 12.382 ms 21.340 ms 5 be-7015-cr01.newyork.ny.ibone.comcast.net (68.86.90.217) 40.690 ms 67.974 ms 41.689 ms 6 ae12.edge1.newyork2.level3.net (4.68.127.1) 42.198 ms 19.511 ms 22.600 ms 7 ae-32-80.car2.sanjose1.level3.net (4.69.152.132) 121.049 ms 130.360 ms 125.898 ms 8 ae-32-80.car2.sanjose1.level3.net (4.69.152.132) 124.555 ms 139.251 ms 136.524 ms 9 open-dns-in.car2.sanjose1.level3.net (4.28.12.198) 86.392 ms 99.180 ms 88.102 ms 10 vlan130.fw1.sjc.opendns.com (67.215.78.6) 89.775 ms 88.160 ms 90.077 ms 11 google.com (142.250.183.206) [open] 126.455 ms 87.454 ms 89.881 ms