RHEL5下安装分区工具GParted,tcpkill清除异常tcp连接

大切诺基HEL5下安装分区工具GParted

在Linux系统中,蒙受TCP链接迟迟不能放出的景况,类似FIN_WAIT1、FIN_WAIT2的情景,释放时间不分明,何况对应的顺序已经关闭,相应的端口也不再监听,无法透过杀进度来减轻,这种场合下,为了火速恢复生机寻常,不得不动用重启服务器的点子加以解决,在经过各大网址物色找到Linux下dsniff包中包罗tcpkill命令,该命令能够将上述景况的TCP链接加以清除,进而免除服务注重启的意况,因为重启服务器有危机(机器大概宕机起不来),倘使高出节日假期日,机房职业人士不便利操作,就能够严重影响专门的学业健康运维,损失自不必说,本身评估吧,吼吼吼^_^

在linux系统中,碰着TCP链接迟迟无法释放的景色,类似FIN_WAIT1、FIN_WAIT2的事态,释放时间不分明,而且对应的顺序已经关闭,相应的端口也不再监听,不可能透过杀进度来缓和,这种场合下,为了火速苏醒平日,不得不动用重启服务器的秘技加以消除,在经过各大网址物色找到linux下dsniff包中包蕴tcpkill命令,该命令能够将上述意况的TCP链接加以清除,进而免除服务珍视启的景观。

六14个人本田UR-VHEL5服务器安装GParted分区工具,该服务器无法连外网,无法从Internet镜像中在线安装。 

个人在 昂科威HEL 6 和 SportageHEL 5.x系统中均做了设置,开首在SportageHEL
6中尝试以源码安装,由于信赖太多包,安装繁琐,最终接纳rpm的装置格局,最后成功安装,以往加以总括,整理该文书档案,将互连网部分小说加以汇总,希望能对各位同事有所帮衬,进程如下:

在dsniff集成工具包中有多少个tcpkill命令,能够消除这类难点:
下载地址:
此目录中得以找到相应系统的本子
wget

rpm -ivh dsniff-2.4-0.1.b1.el5.rf.x86_64.rpm

GParted依赖了重重的yum包,详见附属类小部件GParted_x86_64.zip。解压zip包后,在当前目录下实行如下命令:rpm
-Uvh gtkmm24-2.10.10-1.el5.x86_64.rpm
gtkmm24-devel-2.10.10-1.el5.x86_CA88新登入,64.rpm
glibmm24-2.12.8-1.el5.rf.x86_64.rpm
glibmm24-devel-2.12.8-1.el5.rf.x86_64.rpm
libsigc++20-devel-2.0.18-1.el5.x86_64.rpm
libsigc++20-2.0.18-1.el5.x86_64.rpm
cairomm-devel-1.2.4-1.el5.x86_64.rpm cairomm-1.2.4-1.el5.x86_64.rpm
uuid-1.6.1-3.el5.kb.x86_64.rpm uuid-devel-1.6.1-3.el5.kb.x86_64.rpm
e2fsprogs-devel-1.39-35.el5.x86_64.rpm
e2fsprogs-libs-1.39-35.el5.x86_64.rpm
perl-XML-Parser-2.34-5_4.0.el5.x86_64.rpm,全数注重包成功安装。 

1、SportageHEL5.x系统中安装比较简单:
wget

rpm -ivh dsniff-2.4-0.1.b1.el5.rf.i386.rpm
[root@tech02 tmp]# rpm -ivh dsniff-2.4-0.1.b1.el5.rf.i386.rpm
warning: dsniff-2.4-0.1.b1.el5.rf.i386.rpm: Header V3 DSA signature:
NOKEY, key ID 6b8d79e6
Preparing…               
###########################################
[100%]
   1:dsniff                
###########################################
[100%]
[root@tech02 tmp]# rpm -ql dsniff | grep bin
/usr/sbin/arpspoof
/usr/sbin/dnsspoof
/usr/sbin/dsniff
/usr/sbin/filesnarf
/usr/sbin/macof
/usr/sbin/mailsnarf
/usr/sbin/msgsnarf
/usr/sbin/sshmitm
/usr/sbin/sshow
/usr/sbin/tcpkill
/usr/sbin/tcpnice
/usr/sbin/urlsnarf
/usr/sbin/webmitm
/usr/sbin/webspy
以上就有tcpkill命令,表明安装成功!能够接纳了。
2、RHEL 6系统:
wget
ftp://ftp.univie.ac.at/systems/linux/Fedora/epel/6/i386/dsniff-2.4-0.9.b1.el6.i686.rpm
wget
ftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/i386/libnet-1.1.5-1.el6.i686.rpm
wget
ftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/i386/libnids-1.24-1.el6.i686.rpm
[root@RHEL601 tmp]# rpm -e libnet libnids –nodeps
[root@RHEL601 tmp]# rpm -ivh dsniff-2.4-0.9.b1.el6.i686.rpm
warning: dsniff-2.4-0.9.b1.el6.i686.rpm: Header V3 RSA/SHA256 Signature,
key ID 0608b895: NOKEY
error: Failed dependencies:
        libICE.so.6 is needed by dsniff-2.4-0.9.b1.el6.i686
        libSM.so.6 is needed by dsniff-2.4-0.9.b1.el6.i686
        libXmu.so.6 is needed by dsniff-2.4-0.9.b1.el6.i686
        libnet.so.1 is needed by dsniff-2.4-0.9.b1.el6.i686
        libnids.so.1.24 is needed by dsniff-2.4-0.9.b1.el6.i686
[root@RHEL601 tmp]# yum install libICE libSM libXmu -y
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package libICE.i686 0:1.0.6-1.el6 set to be updated
—> Package libSM.i686 0:1.1.0-7.1.el6 set to be updated
—> Package libXmu.i686 0:1.0.5-1.el6 set to be updated
–> Processing Dependency: libXt.so.6 for package:
libXmu-1.0.5-1.el6.i686
–> Running transaction check
—> Package libXt.i686 0:1.0.7-1.el6 set to be updated
–> Finished Dependency Resolution

安装完结后得以发掘系统多了一个tcpkill的吩咐,命令使用方式如下:
tcpkill -9 port ftp &>/dev/null
tcpkill -9 host 192.168.10.30 &>/dev/null
tcpkill -9 port 53 and port 8000 &>/dev/null
tcpkill -9 net 192.168.10 &>/dev/null
tcpkill -9 net 192.168.10 and port 22 &>/dev/null