TCP和HTTP协议的路由跟踪

发布时间 2023-10-25 15:20:40作者: lbnnbs

方式1:

yum install -y traceroute

traceroute -T 或者 tcptraceroute,tcptraceroute 是 traceroute -T的别名

-T                     #使用TCP SYN包进行探测,等同于tcptraceroute,默认端口是80
-4                     #强制使用ipv4地址
-6                     #强制使用ipv6地址
-n                     #不要进行域名解析,以点分十进制形式显示地址

tcptraceroute -n www.xxx.com 443

方式2:

http80端口

curl --trace - http://www.xwjj.gov.cn

https443端口,忽略证书验证

curl --trace - https://www.xwjj.gov.cn:443 -k

https443端口,忽略证书验证,只返回头

curl --trace - https://www.xwjj.gov.cn:443 -k --head