xref: /dflybsd-src/share/man/man4/blackhole.4 (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino.\"
2*86d7f5d3SJohn Marino.\" blackhole - drop refused TCP or UDP connects
3*86d7f5d3SJohn Marino.\"
4*86d7f5d3SJohn Marino.\" Redistribution and use in source and binary forms, with or without
5*86d7f5d3SJohn Marino.\" modification, are permitted provided that the following conditions
6*86d7f5d3SJohn Marino.\" are met:
7*86d7f5d3SJohn Marino.\" 1. Redistributions of source code must retain the above copyright
8*86d7f5d3SJohn Marino.\"    notice, this list of conditions and the following disclaimer.
9*86d7f5d3SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright
10*86d7f5d3SJohn Marino.\"    notice, this list of conditions and the following disclaimer in the
11*86d7f5d3SJohn Marino.\"    documentation and/or other materials provided with the distribution.
12*86d7f5d3SJohn Marino.\"
13*86d7f5d3SJohn Marino.\"
14*86d7f5d3SJohn Marino.\" $FreeBSD: src/share/man/man4/blackhole.4,v 1.4.2.4 2001/12/17 11:30:11 ru Exp $
15*86d7f5d3SJohn Marino.\" $DragonFly: src/share/man/man4/blackhole.4,v 1.3 2006/02/17 19:37:09 swildner Exp $
16*86d7f5d3SJohn Marino.Dd August 17, 1999
17*86d7f5d3SJohn Marino.Dt BLACKHOLE 4
18*86d7f5d3SJohn Marino.Os
19*86d7f5d3SJohn Marino.Sh NAME
20*86d7f5d3SJohn Marino.Nm blackhole
21*86d7f5d3SJohn Marino.Nd a
22*86d7f5d3SJohn Marino.Xr sysctl 8
23*86d7f5d3SJohn MarinoMIB for manipulating behaviour in respect of refused TCP or UDP connection
24*86d7f5d3SJohn Marinoattempts
25*86d7f5d3SJohn Marino.Sh SYNOPSIS
26*86d7f5d3SJohn Marino.Cd sysctl net.inet.tcp.blackhole[=[0 | 1 | 2]]
27*86d7f5d3SJohn Marino.Cd sysctl net.inet.udp.blackhole[=[0 | 1]]
28*86d7f5d3SJohn Marino.Sh DESCRIPTION
29*86d7f5d3SJohn MarinoThe
30*86d7f5d3SJohn Marino.Nm
31*86d7f5d3SJohn Marino.Xr sysctl 8
32*86d7f5d3SJohn MarinoMIB is used to control system behaviour when connection requests
33*86d7f5d3SJohn Marinoare received on TCP or UDP ports where there is no socket listening.
34*86d7f5d3SJohn Marino.Pp
35*86d7f5d3SJohn MarinoNormal behaviour, when a TCP SYN segment is received on a port where
36*86d7f5d3SJohn Marinothere is no socket accepting connections, is for the system to return
37*86d7f5d3SJohn Marinoa RST segment, and drop the connection.  The connecting system will
38*86d7f5d3SJohn Marinosee this as a "Connection reset by peer".  By setting the TCP blackhole
39*86d7f5d3SJohn MarinoMIB to a numeric value of one, the incoming SYN segment
40*86d7f5d3SJohn Marinois merely dropped, and no RST is sent, making the system appear
41*86d7f5d3SJohn Marinoas a blackhole.  By setting the MIB value to two, any segment arriving
42*86d7f5d3SJohn Marinoon a closed port is dropped without returning a RST.  This provides
43*86d7f5d3SJohn Marinosome degree of protection against stealth port scans.
44*86d7f5d3SJohn Marino.Pp
45*86d7f5d3SJohn MarinoIn the UDP instance, enabling blackhole behaviour turns off the sending
46*86d7f5d3SJohn Marinoof an ICMP port unreachable message in response to a UDP datagram which
47*86d7f5d3SJohn Marinoarrives on a port where there is no socket listening.  It must be noted
48*86d7f5d3SJohn Marinothat this behaviour will prevent remote systems from running
49*86d7f5d3SJohn Marino.Xr traceroute 8
50*86d7f5d3SJohn Marinoto a system.
51*86d7f5d3SJohn Marino.Pp
52*86d7f5d3SJohn MarinoThe blackhole behaviour is useful to slow down anyone who is port scanning
53*86d7f5d3SJohn Marinoa system, attempting to detect vulnerable services on a system.
54*86d7f5d3SJohn MarinoIt could potentially also slow down someone who is attempting a denial
55*86d7f5d3SJohn Marinoof service attack.
56*86d7f5d3SJohn Marino.Sh WARNING
57*86d7f5d3SJohn MarinoThe TCP and UDP blackhole features should not be regarded as a replacement
58*86d7f5d3SJohn Marinofor
59*86d7f5d3SJohn Marino.Xr ipfw 8
60*86d7f5d3SJohn Marinoas a tool for firewalling a system.  In order to create a highly
61*86d7f5d3SJohn Marinosecure system,
62*86d7f5d3SJohn Marino.Xr ipfw 8
63*86d7f5d3SJohn Marinoshould be used for protection, not the blackhole feature.
64*86d7f5d3SJohn Marino.Pp
65*86d7f5d3SJohn MarinoThis mechanism is not a substitute for securing a system.
66*86d7f5d3SJohn MarinoIt should be used together with other security mechanisms.
67*86d7f5d3SJohn Marino.Sh SEE ALSO
68*86d7f5d3SJohn Marino.Xr ip 4 ,
69*86d7f5d3SJohn Marino.Xr tcp 4 ,
70*86d7f5d3SJohn Marino.Xr udp 4 ,
71*86d7f5d3SJohn Marino.Xr ipfw 8 ,
72*86d7f5d3SJohn Marino.Xr sysctl 8
73*86d7f5d3SJohn Marino.Sh HISTORY
74*86d7f5d3SJohn MarinoThe TCP and UDP
75*86d7f5d3SJohn Marino.Nm
76*86d7f5d3SJohn MarinoMIBs
77*86d7f5d3SJohn Marinofirst appeared in
78*86d7f5d3SJohn Marino.Fx 4.0 .
79*86d7f5d3SJohn Marino.Sh AUTHORS
80*86d7f5d3SJohn Marino.An Geoffrey M. Rehmet
81