1 .\" $OpenBSD: tcpdrop.8,v 1.5 2004/05/24 13:57:31 jmc Exp $
3 .\" Copyright (c) 2009 Juli Mallett <jmallett@FreeBSD.org>
4 .\" Copyright (c) 2004 Markus Friedl <markus@openbsd.org>
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 .Nd drop TCP connections
53 command may be used to drop TCP connections from the command line.
59 will attempt to drop all TCP connections.
65 will attempt to drop all connections using the TCP congestion control algorithm
72 will attempt to drop all connections using the TCP stack
79 will attempt to drop all TCP connections being in the state
100 will attempt to drop all TCP connections using the congestion control algorithm
104 and using the TCP stack
107 Since TCP connections in the
109 state are not tied to any TCP stack, using the option
111 in combination with the
115 not dropping any TCP connection.
119 flag may be given in addition to the
125 options to list the tcpdrop invocation to drop all corresponding TCP
126 connections one at a time.
134 options are specified then only the connection between the given local
139 and the foreign address
140 .Ar foreign-address ,
145 Addresses and ports may be specified by name or numeric value.
146 Both IPv4 and IPv6 address formats are supported.
148 The addresses and ports may be separated by periods or colons
155 is causing congestion on a network link, one can drop the TCP session
157 .Bd -literal -offset indent
158 # sockstat -c | grep httpd
159 www httpd 16525 3 tcp4 \e
160 192.168.5.41:80 192.168.5.1:26747
163 The following command will drop the connection:
164 .Bd -literal -offset indent
165 # tcpdrop 192.168.5.41 80 192.168.5.1 26747
168 The following command will drop all connections but those to or from
169 port 22, the port used by
171 .Bd -literal -offset indent
172 # tcpdrop -l -a | grep -vw 22 | sh
175 To drop all TCP connections using the new-reno congestion control algorithm use:
176 .Bd -literal -offset indent
177 # tcpdrop -C new-reno
180 The following command will drop all connections using the TCP stack
182 .Bd -literal -offset indent
186 To drop all TCP connections in the LAST_ACK state use:
187 .Bd -literal -offset indent
188 # tcpdrop -s LAST_ACK
191 To drop all TCP connections using the congestion control algorithm new-reno and
192 the TCP stack rack and being in the LAST_ACK state use:
193 .Bd -literal -offset indent
194 # tcpdrop -C new-reno -S rack -s LAST_ACK
202 .An Markus Friedl Aq Mt markus@openbsd.org
203 .An Juli Mallett Aq Mt jmallett@FreeBSD.org