I've search around and all the suggestions just say to kill the process. But I'm surprised I can't find any simple way to force a "connection" to close, without killing a pid associated with it.
iptables seems like a terrible solution, as i don't want add rules to block a whole service, or kill all connections. I just want to kill or force closed one existing connection, and not affect any other connections or future connections.
Ideally, the processes on both sides would see just the connection close, or at worst, stop responding.
Best Answer
If you know something about the connection (ip, host, port), you can use this command:
Sources: