If you have apf firewall installed then you can simply use the command
apf -d xx.xx.xx.xx where xx.xx.xx.xx is the ip address that you wish to block.
Alternatively you can use IPtables to block the IP as follows :
iptables -I INPUT -s xx.xx.xx.xx -j DROP where xx.xx.xx.xx is the ip address that needs to be blocked.
One more option is you can use route command to block ip addresses on a server.
I hope any of the above methods should solve your purpose
