Forum Moderators: DixonJones
Welcome to WebmasterWorld [webmasterworld.com]!
Your question is a little general...
The two main modules used to block unwelcome visitors on Apache are mod_access and mod_rewrite. Many server setups deny user access to mod_rewrite, but many allow access to mod_access.
mod_access code takes the form:
<Files *>
deny from 12.34.56.78
</Files>
and mod_rewrite code takes the form:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^12\.34\.56\.78$
RewriteRule .* - [F]
If both those types of code cause 500 Server errors on your server setup, then you'll need a better host!
You might want to take a look at your server error log after you get a 500 error; It often will tell you what the problem is.
If you mean "IP address ranges" - meaning more than one IP address - when you say "partial IPs," then that's fairly easy; You just leave off the last group of digits and any trailing "$" in the examples above.
Ref: Introduction to mod_rewrite [webmasterworld.com]
HTH,
Jim