xref: /freebsd/share/man/man4/blackhole.4 (revision d3d381b2b194b4d24853e92eecef55f262688d1a)
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$
15.Dd September 6, 2015
16.Dt BLACKHOLE 4
17.Os
18.Sh NAME
19.Nm blackhole
20.Nd a
21.Xr sysctl 8
22MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connection
23attempts
24.Sh SYNOPSIS
25.Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2"
26.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2"
27.Cd sysctl net.inet.udp.blackhole Ns Op = Ns Brq "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 SCTP, TCP, or UDP ports where there is no socket listening.
34.Pp
35The blackhole behaviour is useful to slow down an attacker who is port-scanning
36a system in an attempt to detect vulnerable services.
37It might also slow down an attempted denial of service attack.
38.Ss SCTP
39Setting the SCTP blackhole MIB to a numeric value of one
40will prevent sending an ABORT packet in response to an incoming INIT.
41A MIB value of two will do the same, but will also prevent sending an ABORT packet
42when unexpected packets are received.
43.Ss TCP
44Normal behaviour, when a TCP SYN segment is received on a port where
45there is no socket accepting connections, is for the system to return
46a RST segment, and drop the connection.
47The connecting system will
48see this as a
49.Dq Connection refused .
50By setting the TCP blackhole
51MIB to a numeric value of one, the incoming SYN segment
52is merely dropped, and no RST is sent, making the system appear
53as a blackhole.
54By setting the MIB value to two, any segment arriving
55on a closed port is dropped without returning a RST.
56This provides some degree of protection against stealth port scans.
57.Ss UDP
58Enabling blackhole behaviour turns off the sending
59of an ICMP port unreachable message in response to a UDP datagram which
60arrives on a port where there is no socket listening.
61It must be noted that this behaviour will prevent remote systems from running
62.Xr traceroute 8
63to a system.
64.Sh WARNING
65The SCTP, TCP, and UDP blackhole features should not be regarded as a replacement
66for firewall solutions.
67Better security would consist of the
68.Nm
69.Xr sysctl 8
70MIB used in conjunction with one of the available firewall packages.
71.Pp
72This mechanism is not a substitute for securing a system.
73It should be used together with other security mechanisms.
74.Sh SEE ALSO
75.Xr ip 4 ,
76.Xr sctp 4 ,
77.Xr tcp 4 ,
78.Xr udp 4 ,
79.Xr ipf 8 ,
80.Xr ipfw 8 ,
81.Xr pfctl 8 ,
82.Xr sysctl 8
83.Sh HISTORY
84The TCP and UDP
85.Nm
86MIBs
87first appeared in
88.Fx 4.0 .
89.Pp
90The SCTP
91.Nm
92MIB first appeared in
93.Fx 9.1 .
94.Sh AUTHORS
95.An Geoffrey M. Rehmet
96