First of all create the file with named as below
#vi ip.blocked
First of all create the file with named as below
then put the ips in ip.blocked as
192.168.0.1
216.288.55.147
Etc…
Then create file block and paste the below shell script.
then press x! to save file
And we need to chmod execution for block file.
And run
After that save iptables
Enjoy!!!!!!