Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Apache allows several approaches to blocking ip addresses.  You meant have several ip addresses you would like to block, or several hundred.  The approach outlined here is focused more on the latter.


This assumes you're using apache 2.4.  We'll using using the <RequireAll> directive inside a <Location /> directive so I'm assuming you're using a apache also as a reverse-proxy (like outlined here). 


Alternatively you can place it inside a <Proxy *> directive as well.

Let's first start with creating a file with the blocked ip addresses in there.  This file can be placed anywhere but for simplicity we'll keep it in /etc/apache2.  Create a file like this: