In OSX if I type netstat I can see certain things that have an established connection. I don't want to change any settings to close these, I just want to be able to close whatever I ports I choose in the terminal. How do you do that?
You can't close an open socket just like this. Ideally, you would just kill the process that has established the connection.
Check your connections with
Or, to get the port, e.g.
Then, just kill the process. For example:
Note though that this won't prevent the connections from being made – something you have to specify in your Firewall preferences.
Can also use the use the
The number 11774 is the pid.
The number 1613 is the pid and "tor" is the process name.
Once you have the pid just end it using the kill or killall command