How to close TCP and UDP ports via windows command line

后端 未结 17 1628
忘掉有多难
忘掉有多难 2020-12-07 06:43

Does somebody knows how to close a TCP or UDP socket for a single connection via windows command line?

Googling about this, I saw some people asking the same thing.

17条回答
  •  鱼传尺愫
    2020-12-07 07:34

    You can't close sockets on your server without owning those sockets hence you can't actually close the socket down without having code running in the process that owns the server socket.

    However, there is another option which is telling the client to close its socket. Sending a RST TCP packet to the port the client is connecting on will cause the client to drop their connection. You can do that with RST scanning using nmap.

    http://nmap.org/

提交回复
热议问题