我無法找到答案,我將嘗試實現一個簡單的事情: 一旦tcp連接建立到我的linux服務器,讓我們說ssh/tcp 22或x11/tcp 6000顯示 - >我怎麼關閉這個連接而沒有查殺進程(sshd/x11 display server)。 我也看到一些建議使用iptables,但它不適用於我,連接仍然可見netstat -an。如果有人能指出我正確的方向,那麼 會很好。在Linux上關閉建立的TCP連接
我試過到目前爲止
tcpkill: kills the process, not good for me
iptables: does not close the established connection, but prevent further connections.
感謝adavnce DJ
嘗試使用hping3 –
使用調試程序附加到進程,然後在適當的文件描述符上調用'shutdown()',緊跟'close()'或close'()'。然後希望該過程能夠處理該問題。 –