If working with routing everyone familiar with it should know what a nullroute does if installed in the routing table. Sometimes this is needed to exclude specific IP prefixes from accessing a host IP using onboard tools. In this example it is shown how to add a "null route" used by Cisco IOS, on a linux host, here it is called "blackhole route":

user % ip route add blackhole 192.0.2.0/24

Display the routing table using iproute2

user % ip route

default via 203.0.113.1 dev eth0 metric 2 blackhole 192.0.2.0/24 127.0.0.0/8 dev lo scope host 203.0.113.0/24 dev eth0 proto kernel scope link src 203.0.113.10

and display with netstat

user % netstat -rn

Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 203.0.113.1 0.0.0.0 UG 0 0 0 eth0 192.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 * 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 203.0.113.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

This way it is possible to exclude specific IP prefixes from reaching its target IP.