0

My web application is getting more and more hits from unknown sources trying to access secure pages, such as admin panel, etc. So, I want to block IP address from certain countries using this source. I've listed all the IPs I want to block in the httpd.conf file, and now it contains nearly 10,000 lines.

Will this decrease the performance of the apache2 web server?

And is there any difference between the two following approaches:

1)

Require not ip 192.168.5.1 192.168.6.1 192.168.7.3

2)

Require not ip 192.168.5.1
Require not ip 192.168.6.1
Require not ip 192.168.7.3
2
  • 2
    Seems to me like Apache is the wrong place to do this. IPTables on the server or your firewall are likely better suited to the task. Especially with 10000 addresses.
    – GregL
    Mar 19, 2015 at 11:29
  • You should use RewriteMap as is shown at this link: stackoverflow.com/questions/15579620/… Mar 20, 2015 at 19:55

1 Answer 1

0

Maybe you might wanna try this this via fail2ban. It adds your IPs to your Firewall and scanns your logfiles for intruders without you having to manually manage all this. Just activate your specific predefined filter or write your own.

If you wanna stick to some blocklist method you might read this. http://cup.wpcoder.de/fail2ban-ip-blacklist/

Of course you would have to have a root-server and linux for this. I had many methods over the years and by using fail2ban your attacker is gonna be completely blocked off without producing any work for your inner serversoftware.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .