Example of a .htaccess file for Window's Apache 2.4 Webserver

This is a costume list of banned IPs & subnets created by SHC.
Post Reply
southhawkct
Site Admin
Posts: 388
Joined: Sun Oct 05, 2014 9:29 pm
Status: Offline

Example of a .htaccess file for Window's Apache 2.4 Webserver

Post by southhawkct »

Here's an example of a my .htaccess file that allows all web traffic with the exception of certain ip addresses.

Code: Select all

order allow,deny
deny from 1.6.0.0/15
deny from 1.22.0.0/15
deny from 1.38.0.0/15
deny from 1.186.0.0/15
deny from 5.56.18.0/24
deny from 5.56.20.0/24
deny from 5.56.21.128/25
deny from 5.56.23.0/25
deny from 5.104.224.15/32
deny from 5.104.224.141/32
deny from 5.104.224.142/31
allow from all
I ban by country IP's in these .htaccess files and i get them from
http://www.ip2location.com/blockvisitorsbycountry.aspx

Hope this helps! 8-)
---
South Hawk Computing LLC Owner :ugeek:
Any advice / recommendations given on this forum should ONLY be preformed at the user's own risk. South Hawk LLC does not offer any guarantees or warranties when a user attempts to try these fixes on their own. We are NOT responsible for any damages that may or may not occur to your devices. :geek:

Post Reply