|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!在linux体系中,碰到TCP链接迟迟不克不及释放的情形,相似FIN_WAIT1、FIN_WAIT2的状况,释放时光不肯定,并且对应的法式曾经封闭,响应的端口也不再监听,没法经由过程杀过程来处理,这类情形下,为了疾速恢复正常,不能不采取重启办事器的办法加以处理,在经由各年夜网站搜刮找到linux下dsniff包中含有tcpkill敕令,该敕令可以将上述状况的TCP链接加以消除,进而免去办事重视启的情形。
在dsniff集成对象包中有一个tcpkill敕令,可以处理这类成绩:
下载地址:http://pkgs.repoforge.org/dsniff/此目次中可以找到响应体系的版本
wgethttp://pkgs.repoforge.org/dsniff/dsniff-2.4-0.1.b1.el5.rf.x86_64.rpm
rpm-ivhdsniff-2.4-0.1.b1.el5.rf.x86_64.rpm
装置完成后可以发明体系多了一个tcpkill的敕令,敕令应用办法以下:
tcpkill-9portftp&>/dev/null
tcpkill-9host192.168.10.30&>/dev/null
tcpkill-9port53andport8000&>/dev/null
tcpkill-9net192.168.10&>/dev/null
tcpkill-9net192.168.10andport22&>/dev/null
装置:
1、RHEL5.x体系中装置比拟简略:
wgethttp://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/dsniff-2.4-0.1.b1.el5.rf.i386.rpm
rpm-ivhdsniff-2.4-0.1.b1.el5.rf.i386.rpm
[root@tech02tmp]#rpm-ivhdsniff-2.4-0.1.b1.el5.rf.i386.rpm
warning:dsniff-2.4-0.1.b1.el5.rf.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID6b8d79e6
Preparing…###########################################[100%]
1:dsniff###########################################[100%]
[root@tech02tmp]#rpm-qldsniff|grepbin
/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、RHEL6体系:
wgetftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/i386/dsniff-2.4-0.9.b1.el6.i686.rpm
wgetftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/i386/libnet-1.1.5-1.el6.i686.rpm
wgetftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/i386/libnids-1.24-1.el6.i686.rpm
[root@RHEL601tmp]#rpm-elibnetlibnidsCnodeps
[root@RHEL601tmp]#rpm-ivhdsniff-2.4-0.9.b1.el6.i686.rpm
warning:dsniff-2.4-0.9.b1.el6.i686.rpm:HeaderV3RSA/SHA256Signature,keyID0608b895:NOKEY
error:Faileddependencies:
libICE.so.6isneededbydsniff-2.4-0.9.b1.el6.i686
libSM.so.6isneededbydsniff-2.4-0.9.b1.el6.i686
libXmu.so.6isneededbydsniff-2.4-0.9.b1.el6.i686
libnet.so.1isneededbydsniff-2.4-0.9.b1.el6.i686
libnids.so.1.24isneededbydsniff-2.4-0.9.b1.el6.i686
[root@RHEL601tmp]#yuminstalllibICElibSMlibXmu-y
Loadedplugins:rhnplugin
ThissystemisnotregisteredwithRHN.
RHNsupportwillbedisabled.
SettingupInstallProcess
ResolvingDependencies
C>Runningtransactioncheck
―>PackagelibICE.i6860:1.0.6-1.el6settobeupdated
―>PackagelibSM.i6860:1.1.0-7.1.el6settobeupdated
―>PackagelibXmu.i6860:1.0.5-1.el6settobeupdated
C>ProcessingDependency:libXt.so.6forpackage:libXmu-1.0.5-1.el6.i686
C>Runningtransactioncheck
―>PackagelibXt.i6860:1.0.7-1.el6settobeupdated
C>FinishedDependencyResolution
DependenciesResolved
====================================================================================================
PackageArchVersionRepositorySize
====================================================================================================
Installing:
libICEi6861.0.6-1.el6Server52k
libSMi6861.1.0-7.1.el6Server26k
libXmui6861.0.5-1.el6Server58k
Installingfordependencies:
libXti6861.0.7-1.el6Server168k
TransactionSummary
====================================================================================================
Install4Package(s)
Upgrade0Package(s)
Totaldownloadsize:305k
Installedsize:668k
DownloadingPackages:
―――――――――――――――――――――――――――――――――-
Total2.4MB/s|305kB00:00
Runningrpm_check_debug
RunningTransactionTest
TransactionTestSucceeded
RunningTransaction
Warning:RPMDBalteredoutsideofyum.
db4-devel-4.7.25-17.el6.i686hasmissingrequiresofdb4=(’0′,’4.7.25′,’17.el6′)
db4-devel-4.7.25-17.el6.i686hasmissingrequiresofdb4-cxx=(’0′,’4.7.25′,’17.el6′)
db4-devel-4.7.25-17.el6.i686hasmissingrequiresoflibdb_cxx-4.7.so
libnet-devel-1.1.5-1.el6.i686hasmissingrequiresoflibnet=(’0′,’1.1.5′,’1.el6′)
libnet-devel-1.1.5-1.el6.i686hasmissingrequiresoflibnet.so.1
libnids-devel-1.24-1.el6.i686hasmissingrequiresoflibnids=(’0′,’1.24′,’1.el6′)
libnids-devel-1.24-1.el6.i686hasmissingrequiresoflibnids.so.1.24
rrdtool-1.4.4-1.el5.rf.i386hasmissingrequiresofgettext
rrdtool-1.4.4-1.el5.rf.i386hasmissingrequiresofperl(Time::HiRes)
rrdtool-1.4.4-1.el5.rf.i386hasmissingrequiresofruby
rrdtool-1.4.4-1.el5.rf.i386hasmissingrequiresofxorg-x11-fonts-Type1
Installing:libICE-1.0.6-1.el6.i6861/4
Installing:libSM-1.1.0-7.1.el6.i6862/4
Installing:libXt-1.0.7-1.el6.i6863/4
Installing:libXmu-1.0.5-1.el6.i6864/4
Installed:
libICE.i6860:1.0.6-1.el6libSM.i6860:1.1.0-7.1.el6libXmu.i6860:1.0.5-1.el6
DependencyInstalled:
libXt.i6860:1.0.7-1.el6
Complete!
[root@RHEL601tmp]#rpm-ivhlibnet-1.1.5-1.el6.i686.rpmlibnids-1.24-1.el6.i686.rpmdsniff-2.4-0.9.b1.el6.i686.rpm
warning:libnet-1.1.5-1.el6.i686.rpm:HeaderV3RSA/SHA256Signature,keyID0608b895:NOKEY
Preparing…###########################################[100%]
1:libnet###########################################[33%]
2:libnids###########################################[67%]
3:dsniff###########################################[100%]
[root@RHEL601tmp]#tcpkill
Version:2.4
Usage:tcpkill[-iinterface][-1..9]expression
小我在任务中仅仅用到了相似tcpkill-9host192.168.10.30&>/dev/null的敕令(注:该IP地址为长途IP)。
因为其时处置此类成绩是没有来得及做记载,故临时就不写应用实例了,今后再碰到此类情形,再加以弥补。同时dsniff包中还含有很多敕令,有兴致的可以持续加以研讨。
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们! |
|