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

Share:
15,725

Related videos on Youtube

Chealion
Author by

Chealion

Chealion - http://chealion.ca IT Manager at a television production company in Calgary, Alberta

Updated on September 17, 2022

Comments

  • Chealion
    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