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 TCP or UDP connection
25 .Cd sysctl net.inet.tcp.blackhole
26 .Cd sysctl net.inet.udp.blackhole
28 .Cd sysctl -w net.inet.tcp.blackhole=[0 | 1 | 2]
29 .Cd sysctl -w net.inet.udp.blackhole=[0 | 1]
34 MIB is used to control system behaviour when connection requests
35 are received on TCP or UDP ports where there is no socket listening.
37 Normal behaviour, when a TCP SYN segment is received on a port where
38 there is no socket accepting connections, is for the system to return
39 a RST segment, and drop the connection. The connecting system will
40 see this as a "Connection reset by peer". By turning the TCP black
41 hole MIB on to a numeric value of one, the incoming SYN segment
42 is merely dropped, and no RST is sent, making the system appear
43 as a blackhole. By setting the MIB value to two, any segment arriving
44 on a closed port is dropped without returning a RST. This provides
45 some degree of protection against stealth port scans.
47 In the UDP instance, enabling blackhole behaviour turns off the sending
48 of an ICMP port unreachable message in response to a UDP datagram which
49 arrives on a port where there is no socket listening. It must be noted
50 that this behaviour will prevent remote systems from running
54 The blackhole behaviour is useful to slow down anyone who is port scanning
55 your system, in order to try and detect vulnerable services on your system.
56 It could potentially also slow down someone who is attempting a denial
57 of service against your system.
60 The TCP and UDP blackhole features should not be regarded as a replacement
63 as a tool for firewalling your system. In order to create a highly
64 secure system, you should use
66 to protect your system, and not the blackhole feature.
68 This mechanism is not a substitute for securing your system,
69 but should be used together with other security mechanisms.
78 .An Geoffrey M. Rehmet