The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Debian
.
google unix.com



Debian Debian GNU/Linux is a free distribution of the GNU/Linux operating system.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
check ssh connection to remote host praveenbvarrier Shell Programming and Scripting 6 10-06-2008 12:46 PM
FTP - Connection Closed By Remote Host mouglybean IP Networking 1 10-26-2004 09:15 AM
Connection to host lost goose UNIX for Dummies Questions & Answers 2 06-04-2002 07:32 PM
Not on System Console; Connection to host lost. andrec UNIX for Dummies Questions & Answers 3 07-27-2001 02:02 PM
connection to host lost nbiketi UNIX for Dummies Questions & Answers 1 04-25-2001 11:45 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-26-2004
saabir saabir is offline
Registered User
  
 

Join Date: Sep 2002
Location: UK
Posts: 65
Killing host connection

Hi All
Is there a command (or set of commands) that can be used to kill a connection listed in the netstat table? Say there is a host connected to a certain port on your machine, and it is listed via a 'netstat -an', is there a way to issue some commands to 'disconnect' or kill that connection?

I know in HP-UX this can be performed with the ndd command, but how about Linux?

I am using Debian woody kernel 2.4.22.

Thanks!
  #2 (permalink)  
Old 03-26-2004
druuna
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
.....

Last edited by druuna; 05-21-2009 at 09:13 AM..
  #3 (permalink)  
Old 03-26-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Knowing the pid won't help if the connection is in FINWAIT2.
  #4 (permalink)  
Old 03-26-2004
druuna
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
.....

Last edited by druuna; 05-21-2009 at 09:13 AM..
  #5 (permalink)  
Old 03-26-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Quote:
Originally posted by druuna
True.

But am I incorrect by stating that the connection is no longer active and the 'closing negotiations' are sent. Killing a connection in FINWAIT2 state seems pointless (to me, that is ).
Well, yeah but that's because you do things correctly.

People write servers that connect to pc's. The pc's are powered off. Then someone wants to kill and restart the server. Because connections are in FINWAIT2, the bind fails.

To get into this state they had to:
1. bypass inetd so that one global bind() is not performed at startup.

2. connect to clients that fail to do a proper shutdown.

3. write goofy code so that the server needs to be restarted

4. forget to set SO_REUSEADDR which would instruct the kernel to ignore the FINWAIT2 connections during a bind()

Believe or not, this happens all the time. Go figure. Many OS's will now time out FINWAIT2 connections which is not good. Other OS's have a way to manually close a FINWAIT2 connection. This is what I think the OP wants.
  #6 (permalink)  
Old 03-26-2004
druuna
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
.....

Last edited by druuna; 05-21-2009 at 09:14 AM..
Closed Thread

Bookmarks

Tags
linux, linux commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0