You should block at the firewall. Either on the server or if you are using a cloud provider, block at the network level. You can use iptables if you are using a linux distro....