![]() |
|
|
Article Options |
|
Block User Ip From Your (.htaccess)
by
Rating:
Hi All, well all of our forums have some bad members who want to do bad things in our forum so if you want to block him from cpanel he can access again so i thought of this thing blocking Member Ip From (htaccess) file. What Does this do? This Will Block The User IP Or Proxy If You Want From Viewing Your Site. How It Works? Make A New File Using Note Pad and put this code on it:
This One Will Block The User Ip Who IS Using This IP:
If You Want To Add More Ip's Just put it between:
After Adding This To Notepad Save it like this name:
then upload it using your ftp and name it to:
Also upload it in ASCII format. Also You Can Add Domains To Block list .Enjoy It No members have liked this post.
Last edited by Terminatoronly : 02 Feb 2007 at 12:35. |
||||||||||||||||||||
|
Views: 5903
|
||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Thanks. First install!
![]() No members have liked this post.
|
|
#3
|
||||
|
||||
|
yeah
first install i hope you like the hack ![]() No members have liked this post.
|
|
#4
|
|||
|
|||
|
is this considered a hack nowadays? anyways i would also add the codes to protect the admincp folder and definitly the code to block the common shell extensions. very handy file
No members have liked this post.
|
|
#5
|
|||
|
|||
|
First of all, I wouldn't consider this to do anything with vBulletin whatsoever, second of all, apparently this only works with cPanel or what?
No members have liked this post.
|
|
#6
|
||||
|
||||
|
first i would like to say thanks for your replies and i know its not a product or plugin to add to vbulletin but this one is much better than the hacks that i find for blocking ip and for StrifeX question well this one its not about cpanel its about ur .htaccess file with this file you can protect your forum like lets say you want to protect your forum (admincp) the index file you can protect it from this file and you can protect config file so you can be safe with this file and i would like to tell you all that i posted this one because most of us need this file so i thought its handy for you but if you dont i am happy for your replies
![]() No members have liked this post.
|
|
#7
|
||||
|
||||
|
.htaccess is for Apache.
While it is possible to install Apache on a Windows server...why? Why wouldn't you just use Apache instead? First, .htaccess files are very powerful tools, and they (along with .htpasswd) are also probably one of the most underrated server tools available to a web admin running Apache. But I think using them falls outside of vBulletin modifications, simply because many vBulletin admins don't run Apache. And even though I personally dislike Windows ASP servers, there are plenty of admins that do like (or don't have a choice when it comes to) Windows servers. While it is possible to install Apache on top of Windows in order to make use of .htaccess...why? I love using .htaccess files....as there are a bunch of other uses for .htaccess in addition to blocking IPs or password (.htpasswd) protecting folders. For example, If you have a "troll" board that is directly linking to your site or board, and they are clicking through that link they and coming over and infesting your board with their nonsense...you can use an .htaccess file to send anyone clicking through that link to anywhere you want (it doesn't work if they copy and paste the link in their browser window instead of clicking through it, but most trolls are not that smart). Many a time I have forwarded links posted to my board from trolls, to complety different web sites (and/or servers for that matter) that can contain malicious (or prank) scripts. You really want to see the "troll fur fly"? Watch as other trolls click through that link and are sent to a real nasty web page, causing either harm or the appearance of harm to their computer.Trust me,they are not too happy with the troll that posted that link which just screwed up their computer (remember they have been redirected to an entirely different web site and server). Anyway, I've seen "troll' turn against "troll" as they start attacking and/or banning each other. For example...
If Troll "A" posts a direct link on www.Troll_Bulletin_Board.com to your board at www.My_Bulletin_Board.net and you put the above code in an .htaccess file in your root folder (just like .htpasswd you can put it in any folder you want to protect), when Troll "B" and "C" click on that link...they be sent directly to www.Malicious_Website.org instead. Troll's "B" and "C" will not be happy with Troll ""A"" since he/she posted a link to a site that either screwed up their computer, or gave them a scare that something messed up their computer. Here are some other great ways to use .htaccess
Regardless, you can do some great stuff with .htaccess...but since not every vBulletin owner can use it, I'm not sure that this lends itself to a vBulletin hack. Also for web admins that are running Apache and can use .htaccess, be careful...because .htaccess is powerful stuff. Banning IP ranges can knock out a whole (small) country or a part of a (large) country (state, city, Etc.) if you're not carful. Be sure you know what you are doing. ![]() No members have liked this post.
Last edited by The Finman : 16 Jan 2007 at 20:14. |
|
#8
|
||||
|
||||
|
I hope I didn't come off as criticizing, as that wasn't what I was trying to do. Just offering a different insight.
![]() Cheers! ![]() No members have liked this post.
|
|
#9
|
||||
|
||||
|
Ok The Finman thanks for your reply i think that this thread is not good maybe i will report it
No members have liked this post.
|
|
#10
|
|||
|
|||
|
well it can be handy for a lot of people who dont know .htaccess and what it can do. Since it is the easiest way to incease basic security I would keep it. I would however try to add more instructions to your post that can apply directly to a vbulletin forum (securing files/folders, .htpassword file, blocking certain files, blacklist referring domains). Additionally i would upload an example file that people can edit and then upload.
No members have liked this post.
|
|
#11
|
||||
|
||||
|
Moved to articles section as this isn't actually a vbulletin modification.
__________________
Cable Forum - DigiGuide Please Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum. Senior vBulletin Developer : Please do not PM me about custom work - I work for Internet brands and no longer have the time to undertake any. No members have liked this post.
|
|
#12
|
||||||||||||
|
||||||||||||
|
Originally Posted by Terminatoronly
No problem as I am actually quite happy you brought this topic up. As Forza stated, this really is a subject that needs discussion, since I believe the majority of web admins & owners (at least the ones I know) are running Apache. The links I provided show the various ways that .htaccess can be applied. Maybe a good place to start is the discussion of what does what and where, as my .htaccess code is slightly different, yet both work. To block IPs and IP ranges, Terminatoronly uses...
It appears that he is blocking not just an IP, but an IP range of 188.156.187.0 through 188.156.187.255. If an IP is static (meaning the user's IP does not change - such as most cable & DSL) then one should simply use the specific IP address such as 188.156.187.244. Most "dial up" ISPs use dynamic IPs. Basically meaning that the user is assigned an IP from a block range available from that ISP while logged in. Upon log out, that user relinquishes that IP to the ISP and then it can be assigned to another user within that ISP's range. I know I am probably covering well known knowledge, but sometimes I find that people don't realize just how much banning a block range can effect them and their guests. Banning IP ranges can not only restrict users that may not have done anything to you, but you may also inadvertently knock out search engine spiders, crawlers, good bots, good users, Etc. I really advise against banning IP ranges unless the problem is really that serious, and you have a reasonable idea of just how many other users you may knock out in the process...especially AOL users since AOL routes them through their own proxy servers, and banning even one range of AOL users you can take out a HUGE chunk of other visitors you may wish to have. I use a variation of Terminatoronly's .htaccess file for banning IPs at the server base. For example...
If someone else wants to hop in and list additional variations (other than mine or Terminatoronly), then please jump on in...as there is ALOT more variations than why are listed so far. Also, here is another variation you might want to try, as it shows how two different uses for .htaccess files can be combined. From my other post I showed you how to block (actually completely redirect ) people linking to your board or site that are not friendly.
Let's combine them real quick!
The above code actually combines the IPs and Referral Links .htaccess code variations, and then sends the trolls (via their IPs), and users/trolls/whatever (clicking through links to your board) to wherever you want to bounce them to. First, before someone jumps in ans says I should have included "this" or excluded "that" in my .htaccess code above...I am not using the above (or attached) .htaccess file as the "be all and end all" of how to accomplish blocking IPs, IP Ranges, Referral Links, Etc. I am simply showing you one possibility, just as Terminatoronly showed you his variation. I've included a real good beginner's tutorial... http://www.javascriptkit.com/howto/htaccess.shtml as some of the Apache tutorials are about as much fun as watching paint dry. http://httpd.apache.org/docs/1.3/howto/htaccess.html Anyway, I'm sure a lot of Apache users already have a good grounding of what can be done with .htaccess, but maybe some may not be. Also, there are a good deal of variations that can be used for different effects, and I would really encourage Apache users who already use .htaccess to list the way they use them and why. ![]() I'll try and pop back in later...but yeah, I think it would be great if people would post their own uses and variations of htaccess files. ![]() No members have liked this post.
Last edited by The Finman : 16 Jan 2007 at 23:55. Reason: forgot zip file attachment |
||||||||||||
|
#13
|
||||
|
||||
|
oh sorry for posting in the wrong section
No members have liked this post.
|
|
#14
|
||||
|
||||
|
Originally Posted by The Finman
The *.zip file in the above post appears to be corrupt.. I'm unable to view it, sadly... Iwas hoping to learn abit more than my current knowledge of .htaccess.
Thanks for the article, btw, I've been scouring the net for articles - and there was a gr8 one here the whole time LoL
__________________
What's this "antimisandry.com" thing about then? Advertise using 'forumrules' and recode signatures on 1st & 2nd posts I need help with setting up a usergroup permissions plugin, if anyone is able to assist. No members have liked this post.
|
|
#15
|
||||
|
||||
|
Originally Posted by Terminatoronly
Hey guys,
How to redirect banned users (with this method) to an customized error page? Is this possible ? thanks No members have liked this post.
|
![]() |
«
Previous Article
|
Next Article
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Article Options | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 03:21.

.



