If you want to block an IP for a particular site, then you could use apache directives in .htaccess file e.g. http://corz.org/serv/tricks/htaccess.php http://httpd.apache.org/docs/2.2/howto/access.html http://www.proxyutza.com/apache-deny-or-block-ip-using-htaccess-directives/ If you want to block access for all sites and ports on your server then you have to use the command line and iptables e.g iptables -I INPUT -s x.y.z.w -j DROP where x.y.z.w is the IP this command must run every time your system boots