View Full Version : blocking a domain from visiting my server

12-23-2011, 08:45 AM
hello wizards -

due to virus-like activity, i have actually started to monitor the apache logs.

in my access_log file, i see regular visits from


unfortunately, every time it visits me, it uses a different IP number.

any idea how i can block this domain from visiting me?


12-23-2011, 11:16 AM
Are all of the IP's coming from Iraq as well? You can run the IP's through a site like this one in order to tell: http://www.iplocation.net/.

If so, and if you are not getting legitimate traffic from Iraq, you could use http://www.countryipblocks.net/ in order to block the range of IP's from Iraq. I would recommend choosing the .htaccess deny method, and then entering in the range of IP's it gives you into a .htaccess file in the document root of your website.

06-03-2012, 01:32 PM
you could use a .htaccess file to block by referrer and/or user agent (as well as other things).

06-03-2012, 01:39 PM
I think you meant .htaccess file. :) That is what Nathan was speaking of in his post.

06-03-2012, 01:56 PM
yes, wildjoker, i did- thanks for pointing out my error. as usual, your dedication and attentiveness is very much appreciated.