xref: /openbsd-src/usr.sbin/tcpdrop/tcpdrop.8 (revision de8cc8edbc71bd3e3bc7fbffa27ba0e564c37d8b)
1.\"	$OpenBSD: tcpdrop.8,v 1.13 2014/08/28 08:22:42 jmc Exp $
2.\"
3.\" Copyright (c) 2004 Markus Friedl <markus@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: August 28 2014 $
18.Dt TCPDROP 8
19.Os
20.Sh NAME
21.Nm tcpdrop
22.Nd drop a TCP connection
23.Sh SYNOPSIS
24.Nm tcpdrop
25.Ar local-addr
26.Ar local-port
27.Ar remote-addr
28.Ar remote-port
29.Nm tcpdrop
30.Ar local-addr : Ns Ar local-port
31.Ar remote-addr : Ns Ar remote-port
32.Sh DESCRIPTION
33The
34.Nm
35command drops the TCP connection specified by the local address
36.Ar local-addr ,
37port
38.Ar local-port
39and the foreign address
40.Ar remote-addr ,
41port
42.Ar remote-port .
43Addresses and ports can be specified by name or numeric value.
44.Sh EXAMPLES
45If a connection to
46.Xr httpd 8
47is causing congestion on a network link, one can drop the TCP session
48in charge:
49.Bd -literal -offset indent
50$ fstat | grep 'httpd.*internet.*<--'
51www      httpd      21307    3* internet stream tcp \e
52	0xd1007ca8 192.168.5.41:80 <-- 192.168.5.1:26747
53.Ed
54.Pp
55Either of the following commands will drop the connection:
56.Bd -literal -offset indent
57# tcpdrop 192.168.5.41 80 192.168.5.1 26747
58
59# tcpdrop 192.168.5.41:80 192.168.5.1:26747
60.Ed
61.Sh SEE ALSO
62.Xr fstat 1 ,
63.Xr netstat 1
64.Sh HISTORY
65The
66.Nm
67program first appeared in
68.Ox 3.6 .
69.Sh AUTHORS
70.An -nosplit
71The
72.Nm
73program was written by
74.An Markus Friedl Aq Mt markus@openbsd.org .
75