3
1
I used to do this in the Windows world with tool called TCPView: just select a established connection (ESTABLISHED), then select "Close Connection". I can't find a way to this on Mac OSX or Linux (I need both). The only way I know of is to kill the process that has the port open.
My main use case is to simulate interruptions in connectivity to test failover, like unplugging a cable or losing a router or middleware situations.
Killing the process is not good enough? – terdon – 2013-02-26T14:28:34.243