I struggled with this for awhile because the normal setup won't work if modrewrite is being used:
ORDER ALLOW, DENY
So the solution is something like this:
<Limit GET HEAD POST>
order allow,deny
deny from 12.43.12.0/24
allow from all
</LIMIT>
htaccess, ips, rewriteengine, modrewrite, enabled, solutioni, struggled,