[TUT] How to ban a certain IP from your site [XAMPP]

keiller

Mr Tutorial Man
Jun 9, 2012
492
108
Jordans+IP%20Banning%20Tutorial

Hello,

Today we will be learning how to ban a certain IP from your site. This tutorial will only work for XAMPP, so please do not attempt if you are using IIS.

#1 - Go to .htaccess and add this code;

PHP:
## USER IP BANNING
<Limit GET POST>
order allow,deny
deny from 127.0.0.1
allow from all
</Limit>

Where it says "deny from 127.0.0.1" replace the "127.0.0.1" with the persons IP. This should deny them access to your site.

Save, and your done.
 

Wassim

♕ The Awesomeness Within...
Sep 22, 2011
2,449
931
Jordans+IP%20Banning%20Tutorial

Hello,

Today we will be learning how to ban a certain IP from your site. This tutorial will only work for XAMPP, so please do not attempt if you are using IIS.

#1 - Go to .htaccess and add this code;

PHP:
## USER IP BANNING
<Limit GET POST>
order allow,deny
deny from 127.0.0.1
allow from all
</Limit>

Where it says "deny from 127.0.0.1" replace the "127.0.0.1" with the persons IP. This should deny them access to your site.

Save, and your done.
What if you want to Ip ban more then 1 person do you just remake a new

PHP:
## USER IP BANNING
<Limit GET POST>
order allow,deny
deny from 127.0.0.1
allow from all
</Limit>

or you like add it next to it like so;

PHP:
## USER IP BANNING
<Limit GET POST>
order allow,deny
deny from 127.0.0.1
deny from 123.4.5.1
allow from all
</Limit>
?
 

keiller

Mr Tutorial Man
Jun 9, 2012
492
108
What if you want to Ip ban more then 1 person do you just remake a new

PHP:
## USER IP BANNING
<Limit GET POST>
order allow,deny
deny from 127.0.0.1
allow from all
</Limit>

or you like add it next to it like so;

PHP:
## USER IP BANNING
<Limit GET POST>
order allow,deny
deny from 127.0.0.1
deny from 123.4.5.1
allow from all
</Limit>
?

Yes.
The second one.
 

keiller

Mr Tutorial Man
Jun 9, 2012
492
108
Yes? please be more specific

The second code what you said.. Just put them together..

e.g: If i wanted to block 3 peoples IP's i would do this:

PHP:
## USER IP BANNING
<Limit GET POST>
order allow,deny
deny from 127.0.0.1
deny from 123.4.5.1
deny from 656.5.3.3
allow from all
</Limit>
 

Users who are viewing this thread

Top