Hello Cynthia Wahome
You can write a shell script to block the IP sample in the file attached
or you can block them from the IPTABLES platform
- login into the shell as a root user
- Run IP tables command ( iptables -A INPUT -s IP-ADDRESS -j DROP)
- To Limit or chuck access from an IP using a certain PORT eg 45 or 25
- # iptables -A INPUT -s 12.22.22.165 -p tcp --destination-port 45 -j DROP
- The above will simamisha all the packets coming from port 45 using the specified IP
Hope it helpz.