Instead of using iptables firewall to block the attacker’s ip, you also can use null route. To implement this on your linux system, you just need to run below command :
Reject the target ip address:
[root@server ~]# route add -host IP-ADDRESS reject
[root@server ~]# route add -host 192.168.2.5 reject