如何检测服务器IP有没有被TCP阻断

要检测服务器IP有没有被TCP阻断,只需要用tcpping工具ping一下你的服务器IP有没有丢包就能判定了,安装tcpping命令如下:

一、先安装tcptraceroute软件包:

Debian/Ubuntu系统命令如下:

[email protected]:~# sudo apt-get install tcptraceroute

CentOS/REHL系统命令如下:

[email protected]:~# sudo yum install tcptraceroute

二、到tcpping网站下载可执行软件包后直接给执行权限即可运行:

[email protected]:~# cd /usr/bin
[email protected]:~# sudo wget http://www.vdberg.org/~richard/tcpping
[email protected]:~# sudo chmod 755 tcpping

三、运行tcpping命令测试itkylin.com网站IP的线路质量:

[email protected]:~# tcpping www.itkylin.com
seq 0: tcp response from 104.27.152.194 (104.27.152.194) 0.996 ms
traceroute to www.itkylin.com (104.27.152.194), 255 hops max, 60 byte packets
seq 1: tcp response from 104.27.152.194 (104.27.152.194) 1.379 ms
traceroute to www.itkylin.com (104.27.152.194), 255 hops max, 60 byte packets
seq 2: tcp response from 104.27.152.194 (104.27.152.194) 1.769 ms
traceroute to www.itkylin.com (104.27.152.194), 255 hops max, 60 byte packets
seq 3: tcp response from 104.27.152.194 (104.27.152.194) 1.178 ms
traceroute to www.itkylin.com (104.27.152.194), 255 hops max, 60 byte packets
seq 4: tcp response from 104.27.152.194 (104.27.152.194) 1.431 ms
traceroute to www.itkylin.com (104.27.152.194), 255 hops max, 60 byte packets
seq 5: tcp response from 104.27.152.194 (104.27.152.194) 1.719 ms

使用tcping ip 端口 若返回的结果一会能通一会不通的就是tcp问题了。