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