How To Cut Existing Network Connection In Linux?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/cut-existing-network-connection-linux/
PINTEREST
PINTEREST
INSTAGRAM

Today’s applications creates a lot of network connection to the different servers. These connection may legit or unwanted connection. If you are looking a tool that will end the network connection between two host cutter is one of the best solution. Keep in mind that we assume the Linux box sits between hosts or one host in one side.

Install Tcpkill

We will use tcpkill for cutting network connections. Tcpkill tool is provided by dsniff package

Ubuntu,Debian

CentOS,Fedora

List Connections

We will first list all connection with netstat command. We want TCP connections and numbered ip addresses.

Kill Connection

We will kill connection by providing target connection tcpdump style filter. Tcpdump style filter is the syntax used in tcpdump to filter network traffic. In our situation is very easy. We just provide the ip address and host keyword.

  • -i ens3 specifies that we want to use ens3 interfaces for kill operation
  • port 22 is our target port where connections will be killed. We kill ssh server so we will disconnect

Our connection is killed and our ssh session ended 🙂

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/cut-existing-network-connection-linux/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  Tcpdump Tutorial With Examples

Leave a Reply

Your email address will not be published.