How kill TCP connection in Linux?

How kill TCP connection in Linux?
Answer
On Linux systems:
  1. Find the offending process: netstat -np.
  2. Find the socket file descriptor: lsof -np $PID.
  3. Debug the process: gdb -p $PID.
  4. Close the socket: call close($FD)
  5. Close the debugger: quit.
  6. Profit.
 

Tìm kiếm

Back
Top