LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to kill a connection ? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-kill-a-connection-290472/)

sys7em 02-15-2005 07:41 AM

How to kill an inet (specific) connection ?
 
When I do netstat I get:

tcp 0 0 195.39.198.199:1647 weber.techno-link.:ircd ESTABLISHED
tcp 0 5 195.39.198.199:iad3 baym-cs370.msgr.ho:1863 ESTABLISHED
tcp 0 0 195.39.198.199:8000 host73.kuzelnet.:mloadd ESTABLISHED
tcp 0 0 192.168.0.1:3128 nfs.srv.net:3481 ESTABLISHED
tcp 0 0 192.168.0.1:netbios-ssn nfs.srv.net:3685 ESTABLISHED

and I want to kill the baym-cs370.msgr.ho connection ...howto do that ?

Thanks in advance..

druuna 02-15-2005 07:54 AM

Hi,

Use netstat -p to get the PID, kill the PID.

lsof -i,if installed, can also be used to get the PID (better layout, just my opinion)

Hope this helps.

masand 02-15-2005 08:00 AM

i ahve made a program for my project

have a look here
currently we are in the process of genralizing it to any server/cleint setup

have a look at
masand.sourceforge.net
i haven't uploaded the full code,if you would like to have that i can send u personlly


regards

LordDark 02-15-2005 05:22 PM

Sure, if you want more information... write netstat -pela and this describe all that your machine is in execute... select the process that you want and write
kill it (kill 32197 for example)


All times are GMT -5. The time now is 06:58 PM.