Saturday, December 12, 2015

Block IP using blackole route

A null, also known as Blackhole, is a routing table entry that discards a matching packet without sending it further. It is mainly used for preventing/ blocking an unwanted IP to attack your system. It drops the IP using IPtables. for instance, if you want to block an IP address 192.168.0.1, you can write the command:
# ip route add blackhole 192.168.0.1/32

your system will now drop all packets coming from 192.168.0.1

No comments: