1*bfb6cb13Schristos.\" $NetBSD: tcpdrop.8,v 1.1 2007/06/25 23:34:52 christos Exp $ 2*bfb6cb13Schristos.\" 3*bfb6cb13Schristos.\" Copyright (c) 1989, 1993 4*bfb6cb13Schristos.\" The Regents of the University of California. All rights reserved. 5*bfb6cb13Schristos.\" 6*bfb6cb13Schristos.\" This code is derived from software contributed to Berkeley by 7*bfb6cb13Schristos.\" Herb Hasler and Rick Macklem at The University of Guelph. 8*bfb6cb13Schristos.\" 9*bfb6cb13Schristos.\" Redistribution and use in source and binary forms, with or without 10*bfb6cb13Schristos.\" modification, are permitted provided that the following conditions 11*bfb6cb13Schristos.\" are met: 12*bfb6cb13Schristos.\" 1. Redistributions of source code must retain the above copyright 13*bfb6cb13Schristos.\" notice, this list of conditions and the following disclaimer. 14*bfb6cb13Schristos.\" 2. Redistributions in binary form must reproduce the above copyright 15*bfb6cb13Schristos.\" notice, this list of conditions and the following disclaimer in the 16*bfb6cb13Schristos.\" documentation and/or other materials provided with the distribution. 17*bfb6cb13Schristos.\" 3. Neither the name of the University nor the names of its contributors 18*bfb6cb13Schristos.\" may be used to endorse or promote products derived from this software 19*bfb6cb13Schristos.\" without specific prior written permission. 20*bfb6cb13Schristos.\" 21*bfb6cb13Schristos.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22*bfb6cb13Schristos.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23*bfb6cb13Schristos.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24*bfb6cb13Schristos.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25*bfb6cb13Schristos.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26*bfb6cb13Schristos.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27*bfb6cb13Schristos.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28*bfb6cb13Schristos.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29*bfb6cb13Schristos.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30*bfb6cb13Schristos.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31*bfb6cb13Schristos.\" SUCH DAMAGE. 32*bfb6cb13Schristos.\" 33*bfb6cb13Schristos.\" $OpenBSD: tcpdrop.8,v 1.6 2006/01/03 14:52:17 jmc Exp $ 34*bfb6cb13Schristos.\" 35*bfb6cb13Schristos.\" Copyright (c) 2004 Markus Friedl <markus@openbsd.org> 36*bfb6cb13Schristos.\" 37*bfb6cb13Schristos.\" Permission to use, copy, modify, and distribute this software for any 38*bfb6cb13Schristos.\" purpose with or without fee is hereby granted, provided that the above 39*bfb6cb13Schristos.\" copyright notice and this permission notice appear in all copies. 40*bfb6cb13Schristos.\" 41*bfb6cb13Schristos.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 42*bfb6cb13Schristos.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 43*bfb6cb13Schristos.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 44*bfb6cb13Schristos.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 45*bfb6cb13Schristos.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 46*bfb6cb13Schristos.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 47*bfb6cb13Schristos.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 48*bfb6cb13Schristos.\" 49*bfb6cb13Schristos.Dd June 23, 2007 50*bfb6cb13Schristos.Dt TCPDROP 8 51*bfb6cb13Schristos.Os 52*bfb6cb13Schristos.Sh NAME 53*bfb6cb13Schristos.Nm tcpdrop 54*bfb6cb13Schristos.Nd drop a TCP connection 55*bfb6cb13Schristos.Sh SYNOPSIS 56*bfb6cb13Schristos.Nm tcpdrop 57*bfb6cb13Schristos.Ar laddr 58*bfb6cb13Schristos.Ar lport 59*bfb6cb13Schristos.Ar faddr 60*bfb6cb13Schristos.Ar fport 61*bfb6cb13Schristos.Sh DESCRIPTION 62*bfb6cb13SchristosThe 63*bfb6cb13Schristos.Nm 64*bfb6cb13Schristoscommand drops the TCP connection specified by the local address 65*bfb6cb13Schristos.Ar laddr , 66*bfb6cb13Schristosport 67*bfb6cb13Schristos.Ar lport 68*bfb6cb13Schristosand the foreign address 69*bfb6cb13Schristos.Ar faddr , 70*bfb6cb13Schristosport 71*bfb6cb13Schristos.Ar fport . 72*bfb6cb13SchristosAddresses and ports can be specified by name or numeric value. 73*bfb6cb13Schristos.Sh EXAMPLES 74*bfb6cb13SchristosIf a connection to 75*bfb6cb13Schristos.Xr httpd 8 76*bfb6cb13Schristosis causing congestion on a network link, one can drop the TCP session 77*bfb6cb13Schristosin charge: 78*bfb6cb13Schristos.Bd -literal -offset indent 79*bfb6cb13Schristos$ fstat | grep 'httpd.*internet.*\*(Lt--' 80*bfb6cb13Schristoswww httpd 21307 3* internet stream tcp \e 81*bfb6cb13Schristos 0xd1007ca8 192.168.5.41:80 \*(Lt-- 192.168.5.1:26747 82*bfb6cb13Schristos.Ed 83*bfb6cb13Schristos.Pp 84*bfb6cb13SchristosThe following command will drop the connection: 85*bfb6cb13Schristos.Bd -literal -offset indent 86*bfb6cb13Schristos# tcpdrop 192.168.5.41 80 192.168.5.1 26747 87*bfb6cb13Schristos.Ed 88*bfb6cb13Schristos.Sh SEE ALSO 89*bfb6cb13Schristos.Xr fstat 1 , 90*bfb6cb13Schristos.Xr netstat 1 91