command may be used to drop TCP connections from the command line.
is specified then
will attempt to drop all active connections.
flag may be given to list the tcpdrop invocation to drop all active
connections one at a time.
is not specified then only the connection between the given local
and the foreign address
will be dropped.
Addresses and ports may be specified by name or numeric value.
Both IPv4 and IPv6 address formats are supported.
The addresses and ports may be separated by periods or colons
instead of spaces.
If a connection to
is causing congestion on a network link, one can drop the TCP session
# sockstat -c | grep httpd
www httpd 16525 3 tcp4 \
The following command will drop the connection:
# tcpdrop 192.168.5.41 80 192.168.5.1 26747
The following command will drop all connections but those to or from
port 22, the port used by
# tcpdrop -l -a | grep -vw 22 | sh