FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Bannig IPs

 


DanielXP
How do you ban ip using DirectAdmin?

i have never used it before and used to using Cpanel IP DENY
n0obie4life
Open up .htaccess in the public_html folder.

Code:
order allow, deny
deny from 192.168.0.2
allow from all


Of course edit the ip address accordingly.
DanielXP
i don't relly want to do that its a little work but to much!
n0obie4life
DanielXP wrote:
i don't relly want to do that its a little work but to much!


But that's what cPanel deny does =\.

You asked for that and that's what I gave you.
DanielXP
is there not a script you can make to put on my site so i login into it and it puts the code in on its own?
n0obie4life
DanielXP wrote:
is there not a script you can make to put on my site so i login into it and it puts the code in on its own?


No.

Alternatively you can do what phpBB does, search for matches in the IP address with the banlist.

Code:
<?php

$banned_ip = "192.168.0.1";

if ( $_SERVER["REMOTE_ADDR"] == $banned_ip )
{
echo "you are banned";
}

?>
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.