How can I close a port (seen open on netstat)?
15,725
Try using
lsof | grep portnumber
to get the process that has it opened.
You could also use the -i
option to let lsof
do the filtering for a TCP port
lsof -i TCP:portnumber
Related videos on Youtube
Author by
Chealion
Chealion - http://chealion.ca IT Manager at a television production company in Calgary, Alberta
Updated on September 17, 2022Comments
-
Chealion over 1 year
I used netstat and I see some ports open that I want closed. How do I close them?
The computer is a Mac running OS X
-
fardjad almost 14 yearsyou should ask this question in superuser
-
unknown almost 14 years
netstat -lp
will give you process/port -
Admin almost 14 years... did not work ... Mac OSX ***
-
unknown almost 14 years
-