PDA

View Full Version : Best way to block Cyveillance


Rotsky
04-26-2006, 02:57 AM
I'm noticed that Cyveillance is snooping around a couple of my sites. I don't much care for the way this company does business so would like to block them. Any suggestions for the best methods?

I know the control panel has IP blocking, but it seems one can only enter one IP at a time, and Cyveillance has a lot of them (request: it would be a great help if one could enter a block of IPs in the format 38.0.0.0/8).

Next option is .htaccess, but is it best to just deny them - eg:

Deny from 38.0.0.0/8

or use something like

RewriteCond %{REMOTE_ADDR} ^65\.118\.41\.(19[2-9]|2[01][0-9]|22[0-3])$
RewriteRule .* - [F]

If the latter, how would you write the rule to block 38.0.0.0/8? Is this valid?

RewriteCond %{REMOTE_ADDR} ^38\.[0-2][0-9][0-9]\.[0-2][0-9][0-9]\.[0-2][0-9][0-9]$

All of this would go in the .htaccess in public_html, but I guess I'd have to repeat it in any other .htaccess files I have in other dirs, is that right?

Any thoughts welcome.

areidmtm
04-26-2006, 09:07 AM
in the IP deny, should be able to block an enite range or put the domain name in and that will resolve the IP address to what ever it is at that time.

Do a whois look up and find the IP net range and put in the IP that looks like this: 192.5.0.0

I think that might work

Rotsky
04-26-2006, 09:42 AM
I've already used whois and dig to discover at least some of the IPs they're using. Using the domain name in the 'Deny IP' feature doesn't work because it just returns a single IP. By Cyveillance owns, for example, the whole 38.x.x.x block plus other ranges - eg, 65.118.41.192 - 65.118.41.223 (or 65.118.41.192/27 if you prefer).

I've answered a couple of my own questions:
* using
RewriteCond %{REMOTE_ADDR} ^38\.
will block that range in .htaccess, and I now know that .htaccess files effectively 'inherit' down through the directory tree, so I only need do all this in the .htaccess file in the public_html dir. However, I've noticed a lot of people seem to suggest using rewrites, as above, rather than just using 'Deny from' and I'm curious to know which is better.

areidmtm
04-26-2006, 10:17 AM
I've noticed a lot of people seem to suggest using rewrites, as above, rather than just using 'Deny from' and I'm curious to know which is better.

The RewriteCond is processed before Deny From in Apache. I think that is why most people like using RewriteCond over Deny From.