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.
23 .Nd drop TCP connections
51 command may be used to drop TCP connections from the command line.
57 will attempt to drop all TCP connections.
63 will attempt to drop all connections using the TCP congestion control algorithm
70 will attempt to drop all connections using the TCP stack
77 will attempt to drop all TCP connections being in the state
98 will attempt to drop all TCP connections using the congestion control algorithm
102 and using the TCP stack
105 Since TCP connections in the
107 state are not tied to any TCP stack, using the option
109 in combination with the
113 not dropping any TCP connection.
117 flag may be given in addition to the
123 options to list the tcpdrop invocation to drop all corresponding TCP
124 connections one at a time.
132 options are specified then only the connection between the given local
137 and the foreign address
138 .Ar foreign-address ,
143 Addresses and ports may be specified by name or numeric value.
144 Both IPv4 and IPv6 address formats are supported.
146 The addresses and ports may be separated by periods or colons
153 is causing congestion on a network link, one can drop the TCP session
155 .Bd -literal -offset indent
156 # sockstat -c | grep httpd
157 www httpd 16525 3 tcp4 \e
158 192.168.5.41:80 192.168.5.1:26747
161 The following command will drop the connection:
162 .Bd -literal -offset indent
163 # tcpdrop 192.168.5.41 80 192.168.5.1 26747
166 The following command will drop all connections but those to or from
167 port 22, the port used by
169 .Bd -literal -offset indent
170 # tcpdrop -l -a | grep -vw 22 | sh
173 To drop all TCP connections using the new-reno congestion control algorithm use:
174 .Bd -literal -offset indent
175 # tcpdrop -C new-reno
178 The following command will drop all connections using the TCP stack
180 .Bd -literal -offset indent
184 To drop all TCP connections in the LAST_ACK state use:
185 .Bd -literal -offset indent
186 # tcpdrop -s LAST_ACK
189 To drop all TCP connections using the congestion control algorithm new-reno and
190 the TCP stack rack and being in the LAST_ACK state use:
191 .Bd -literal -offset indent
192 # tcpdrop -C new-reno -S rack -s LAST_ACK
200 .An Markus Friedl Aq Mt markus@openbsd.org
201 .An Juli Mallett Aq Mt jmallett@FreeBSD.org