Avatar of beer9
beer9
Flag for India asked on

How to kill network connection in Solaris/BSD ?

I got some 500+ connection on one specific port.. Is there a network tool using that I can kill all of them at once ?
I am asking coz I cant' identify the application as it runs above > 1024 port.
Unix OS

Avatar of undefined
Last Comment
beer9

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Maciej S

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
omarfarid

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Brian Utterback

Why do you want to kill them? What problem are they causing? If the applications are using that port, then killing the
port is definitely an abnormal event and will cause the applications to be very annoyed at the least. There is a way to
kill network connections on Solaris, but it uses an undocumented ioctl, and Sun doesn't like to publicize it too much, because it is a "last resort" kind of thing.
Maciej S

OT
blu: it can be used to disconnect annoying users for example ;)
beer9

ASKER
blu, yup.. i want to kill the unwanted and annoying application which is causing load to my bandwidth..
How to use 'ioctl' as the last resort ?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
omarfarid

did you try lsof? If it is not installed then you can download and install from sunfreeware.com.
necati_cehreli

Did you check bigadmin ? They have a great article for that issue :

http://www.sun.com/bigadmin/content/submitted/tcpdrop.jsp

beer9

ASKER
sure I will check tcpdrop and lsof.. just for more info, is it possible to use 'fuser' to get this information.. ??
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
necati_cehreli

Yes, you can also use fuser for that purpose. Example :

fuser ssh/tcp
beer9

ASKER
$fuser ssh/tcp
ssh/tcp: fuser: No such file or directory

Though I can see sshd daemon is running in my system.
omarfarid

the fuser on solaris does not support ports.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
beer9

ASKER
Thank you! :)