xref: /freebsd/share/man/man4/blackhole.4 (revision 9cbda59000e0f366b04c83d8d852c7c34b467722)
1849d3459SGeoff Rehmet.\"
2849d3459SGeoff Rehmet.\" blackhole - drop refused TCP or UDP connects
3849d3459SGeoff Rehmet.\"
4849d3459SGeoff Rehmet.\" Redistribution and use in source and binary forms, with or without
5849d3459SGeoff Rehmet.\" modification, are permitted provided that the following conditions
6849d3459SGeoff Rehmet.\" are met:
7849d3459SGeoff Rehmet.\" 1. Redistributions of source code must retain the above copyright
8849d3459SGeoff Rehmet.\"    notice, this list of conditions and the following disclaimer.
9849d3459SGeoff Rehmet.\" 2. Redistributions in binary form must reproduce the above copyright
10849d3459SGeoff Rehmet.\"    notice, this list of conditions and the following disclaimer in the
11849d3459SGeoff Rehmet.\"    documentation and/or other materials provided with the distribution.
12849d3459SGeoff Rehmet.\"
13849d3459SGeoff Rehmet.\"
147f3dea24SPeter Wemm.\" $FreeBSD$
15849d3459SGeoff Rehmet.Dd August 17, 1999
16849d3459SGeoff Rehmet.Dt BLACKHOLE 4
173d45e180SRuslan Ermilov.Os
18849d3459SGeoff Rehmet.Sh NAME
198b8f358eSMike Pritchard.Nm blackhole
20849d3459SGeoff Rehmet.Nd a
21849d3459SGeoff Rehmet.Xr sysctl 8
22849d3459SGeoff RehmetMIB for manipulating behaviour in respect of refused TCP or UDP connection
2359322008SRuslan Ermilovattempts
24849d3459SGeoff Rehmet.Sh SYNOPSIS
25235a25a6SDima Dorfman.Cd sysctl net.inet.tcp.blackhole[=[0 | 1 | 2]]
26235a25a6SDima Dorfman.Cd sysctl net.inet.udp.blackhole[=[0 | 1]]
27849d3459SGeoff Rehmet.Sh DESCRIPTION
28849d3459SGeoff RehmetThe
29849d3459SGeoff Rehmet.Nm
30849d3459SGeoff Rehmet.Xr sysctl 8
31849d3459SGeoff RehmetMIB is used to control system behaviour when connection requests
32849d3459SGeoff Rehmetare received on TCP or UDP ports where there is no socket listening.
33849d3459SGeoff Rehmet.Pp
34849d3459SGeoff RehmetNormal behaviour, when a TCP SYN segment is received on a port where
35849d3459SGeoff Rehmetthere is no socket accepting connections, is for the system to return
36b5e7e999SRuslan Ermilova RST segment, and drop the connection.
37b5e7e999SRuslan ErmilovThe connecting system will
38b5e7e999SRuslan Ermilovsee this as a
39b5e7e999SRuslan Ermilov.Dq Connection refused .
40b5e7e999SRuslan ErmilovBy setting the TCP blackhole
41235a25a6SDima DorfmanMIB to a numeric value of one, the incoming SYN segment
4245a033b1SGeoff Rehmetis merely dropped, and no RST is sent, making the system appear
43b5e7e999SRuslan Ermilovas a blackhole.
44b5e7e999SRuslan ErmilovBy setting the MIB value to two, any segment arriving
45b5e7e999SRuslan Ermilovon a closed port is dropped without returning a RST.
46b5e7e999SRuslan ErmilovThis provides some degree of protection against stealth port scans.
47849d3459SGeoff Rehmet.Pp
48849d3459SGeoff RehmetIn the UDP instance, enabling blackhole behaviour turns off the sending
49849d3459SGeoff Rehmetof an ICMP port unreachable message in response to a UDP datagram which
50b5e7e999SRuslan Ermilovarrives on a port where there is no socket listening.
51b5e7e999SRuslan ErmilovIt must be noted that this behaviour will prevent remote systems from running
52849d3459SGeoff Rehmet.Xr traceroute 8
53235a25a6SDima Dorfmanto a system.
54849d3459SGeoff Rehmet.Pp
55849d3459SGeoff RehmetThe blackhole behaviour is useful to slow down anyone who is port scanning
56235a25a6SDima Dorfmana system, attempting to detect vulnerable services on a system.
57849d3459SGeoff RehmetIt could potentially also slow down someone who is attempting a denial
58235a25a6SDima Dorfmanof service attack.
59849d3459SGeoff Rehmet.Sh WARNING
60849d3459SGeoff RehmetThe TCP and UDP blackhole features should not be regarded as a replacement
61849d3459SGeoff Rehmetfor
62849d3459SGeoff Rehmet.Xr ipfw 8
63b5e7e999SRuslan Ermilovas a tool for firewalling a system.
64b5e7e999SRuslan ErmilovIn order to create a highly secure system,
65849d3459SGeoff Rehmet.Xr ipfw 8
66235a25a6SDima Dorfmanshould be used for protection, not the blackhole feature.
67849d3459SGeoff Rehmet.Pp
68235a25a6SDima DorfmanThis mechanism is not a substitute for securing a system.
69235a25a6SDima DorfmanIt should be used together with other security mechanisms.
708b8f358eSMike Pritchard.Sh SEE ALSO
718b8f358eSMike Pritchard.Xr ip 4 ,
728b8f358eSMike Pritchard.Xr tcp 4 ,
738b8f358eSMike Pritchard.Xr udp 4 ,
748b8f358eSMike Pritchard.Xr ipfw 8 ,
75849d3459SGeoff Rehmet.Xr sysctl 8
76849d3459SGeoff Rehmet.Sh HISTORY
77849d3459SGeoff RehmetThe TCP and UDP
78849d3459SGeoff Rehmet.Nm
79849d3459SGeoff RehmetMIBs
80849d3459SGeoff Rehmetfirst appeared in
818b8f358eSMike Pritchard.Fx 4.0 .
829cbda590SRuslan Ermilov.Sh AUTHORS
839cbda590SRuslan Ermilov.An Geoffrey M. Rehmet
84