Networking Forums

Networking Forums > Computer Networking > Windows Networking > Close Established Connections From The Command Line

Reply
Thread Tools Display Modes

Close Established Connections From The Command Line

 
 
לורן שייפר
Guest
Posts: n/a

 
      08-04-2005, 12:00 PM
Hi Everybody !

Win2003.
Does anybody know of a utility (Microsoft or 3rd party) or some script
(vbs\wsh etc) that will allow an admin to close ESTABLISHED connections FROM
THE COMMAND LINE ?

Netstat output example:
Proto Local Address Foreign Address State
TCP xxx.xxx.xxx.xxx:1186 xxx.xxx.xxx.xxx:80 CLOSE_WAIT
TCP xxx.xxx.xxx.xxx:4854 xxx.xxx.xxx.xxx:5631 LISTENING
TCP xxx.xxx.xxx.xxx:4854 xxx.xxx.xxx.xxx:5631 ESTABLISHED

The empathies is closing the connection, NOT the active process\service.

The above is needed in order to run a batch file on the server (via a remote
control utility in a console like mode-the server is the host-remote is
WinXP) which includes closing the established connection (The process closes
the active remote control session and waits for another connection), and
running several commands.
True-this can be done by killing\closing the application or by stopping the
service, but the solution suggested is
Quicker (less then 1 second to close the connection vs. a few seconds to
close the application\stop the service),
Has much less potential for problems (Who among us hasn't came across a
program\service which refused to load, with little or no error message, and
started pulling out what little hair he had left...),
And imho, is more precise, concise and to-the-point.

I've googled long and deep and found no such utility.
(Hopefully) It exists in in some small corner of some small
integration\networking package.
Has any body seen\heard of such a utility ?

P.S: Unfortunately, I haven't mastered the scripting writing art to date.
If somebody could help out with a small\no-nonsense script (which closes a
single existing established connection in one constant port without any need
for user input\command line switches) I'd be very much obliged.

Thanks,
Loren Shiafer.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Monitoring - Connections Active/Connections Established PeteL Windows Networking 1 03-30-2010 11:32 AM
Close TCP connections ? wpher56 Windows Networking 3 04-24-2009 07:24 PM
how to add an ip to a NIC (from the command line)? gst Windows Networking 1 10-01-2008 02:42 PM
CLOSE_WAIT issue (Software fails to close connections) flarosa Linux Networking 1 03-19-2008 10:33 PM
Network connections between XP and W98 machines don't always close readily Bruiser Windows Networking 0 10-12-2003 11:43 PM



1 2 3 4 5 6 7 8 9 10 11