2 .\" blackhole - drop refused TCP or UDP connects
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
22 MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connection
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.tcp.blackhole_local Ns Op = Ns Brq "0 | 1"
28 .Cd sysctl net.inet.udp.blackhole Ns Op = Ns Brq "0 | 1"
29 .Cd sysctl net.inet.udp.blackhole_local Ns Op = Ns Brq "0 | 1"
34 MIB is used to control system behaviour when connection requests
35 are received on SCTP, TCP, or UDP ports where there is no socket listening.
37 The blackhole behaviour is useful to slow down an attacker who is port-scanning
38 a system in an attempt to detect vulnerable services.
39 It might also slow down an attempted denial of service attack.
41 The blackhole behaviour is disabled by default.
42 If enabled, the locally originated packets would still be responded to,
44 .Va net.inet.tcp.blackhole_local
46 .Va net.inet.udp.blackhole_local
47 (for UDP) are enforced.
49 Setting the SCTP blackhole MIB to a numeric value of one
50 will prevent sending an ABORT packet in response to an incoming INIT.
51 A MIB value of two will do the same, but will also prevent sending an ABORT packet
52 when unexpected packets are received.
54 Normal behaviour, when a TCP SYN segment is received on a port where
55 there is no socket accepting connections, is for the system to return
56 a RST segment, and drop the connection.
57 The connecting system will
59 .Dq Connection refused .
60 By setting the TCP blackhole
61 MIB to a numeric value of one, the incoming SYN segment
62 is merely dropped, and no RST is sent, making the system appear
64 By setting the MIB value to two, any segment arriving
65 on a closed port is dropped without returning a RST.
66 This provides some degree of protection against stealth port scans.
68 Enabling blackhole behaviour turns off the sending
69 of an ICMP port unreachable message in response to a UDP datagram which
70 arrives on a port where there is no socket listening.
71 It must be noted that this behaviour will prevent remote systems from running
75 The SCTP, TCP, and UDP blackhole features should not be regarded as a replacement
76 for firewall solutions.
77 Better security would consist of the
80 MIB used in conjunction with one of the available firewall packages.
82 This mechanism is not a substitute for securing a system.
83 It should be used together with other security mechanisms.
102 MIB first appeared in
105 .An Geoffrey M. Rehmet