Sunday 18 November 2018

How to Block a specific IP Address using Routing Table in CentOS 7

The Linux routing table can block the incoming connection to prevent the Denial of Service (DoS) and save resource utilization. The Linux routing tables can used to block such IP addresses or whole subnet with reject route and null route.
Block a single IP address:

[root@linuxcnf ~]# route add -host reject

Remove blocked IP address:

[root@linuxcnf ~]# route del -host reject

Using route command can block and removed already block IP address. Change IP address and sub net according to the environment.

No comments:

Post a Comment