加入收藏 | 设为首页 | 会员中心 | 我要投稿 宁德站长网 (https://www.0593zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 安全 > 正文

Tcptraceroute 基于TCP数据包的路由追踪器

发布时间:2022-04-22 08:59:58 所属栏目:安全 来源:互联网
导读:现代网络广泛使用防火墙,导致传统路由跟踪工具发出的(ICMP应答(ICMP echo)或UDP)数据包都被过滤掉了,所以无法进行完整的路由跟踪。尽管如此,许多情况下,防火墙会准许反向(inbound)TCP数据包通过防火墙到达指定端口,这些端口是主机内防火墙背后的
         现代网络广泛使用防火墙,导致传统路由跟踪工具发出的(ICMP应答(ICMP echo)或UDP)数据包都被过滤掉了,所以无法进行完整的路由跟踪。尽管如此,许多情况下,防火墙会准许反向(inbound)TCP数据包通过防火墙到达指定端口,这些端口是主机内防火墙背后的一些程序和外界连接用的。通过发送TCP SYN数据包来代替UDP或者ICMP应答数据包,tcptraceroute可以穿透大多数防火墙。
 
一、LIBPCAP:
 
        复制
        tar zxvf ~lonen/Testing-pt/libpcap-0.8.3.tar.gz  
 
        ./configure --without-flex --without-bison --prefix=/usr/local/libpcap
 
 三、TCPTRACEROUTE:
 
下载:tcptraceroute
 
http://down.51cto.com/data/161567 下载1.5.tar.gz
 
阅读安装帮助,牢记,养成阅读英文的习惯,工作效率也能够提高很多。真正的心得。
 
复制
-n  
    Display numeric output, rather than doing a reverse DNS lookup for each hop. By default, reverse lookups are never attempted on RFC1918   
 
address space, regardless of the -n flag.   
-N  
    Perform a reverse DNS lookup for each hop, including RFC1918 addresses.   
-f  
    Set the initial TTL used in the first outgoing packet. The default is 1.   
-m  
    Set the maximum TTL used in outgoing packets. The default is 30.   
-p  
    Use the specified local TCP port in outgoing packets. The default is to obtain a free port from the kernel using bind(2). Unlike with traditional   
 
traceroute(8), this number will not increase with each hop.   
-s  
    Set the source address for outgoing packets. See also the -i flag.   
 
-i 指定接口,网络接口  
-f 起初第几条开始,比如5,开始显示第5跳的结果  
-l traceroute包的长度  
-q 查询的数字号  
-t tos  
-m ***的TTL  
-s 源地址,如果服务器有两块网卡,就可以采用指定-s的源地址路由,在所有的tracert/traceroute都 有这样的基本功能  
-w等待的时间  
host 指定要TRACEROUTE的一个IP或者是域名 www.bloghacker.cn
 
四、真是有效的测试记录对比:
 
复制
[root@soft ~]# traceroute -w 2 -q 1 -f 5 www.singtel.com.sg  
traceroute to www.singtel.com.sg (203.208.248.10), 30 hops max, 38 byte packets  
5 219.158.4.66 (219.158.4.66) 27.322 ms  
6 219.158.3.198 (219.158.3.198) 27.664 ms  
7 203.208.151.17 (203.208.151.17) 92.729 ms  
8 GigabitEthernet6-0.sngtp-ar2.ix.singtel.com (203.208.183.19) 108.016 ms  
9 202.160.250.226 (202.160.250.226) 83.829 ms  
10 203.208.232.50 (203.208.232.50) 91.525 ms  
11 203.208.232.57 (203.208.232.57) 83.972 ms  

(编辑:宁德站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!