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

link|improve this question
1  
you should ask this question in superuser – fardjad Jul 24 '10 at 6:29
netstat -lp will give you process/port – unknown Jul 24 '10 at 6:36
... did not work ... Mac OSX *** – Xofo Jul 24 '10 at 7:02
1  
feedback

migrated from stackoverflow.com Jul 24 '10 at 7:46

This question came from our site for professional and enthusiast programmers.

1 Answer

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown