PDA

View Full Version : Ban by Referer


filburt1
08 Jun 2003, 17:02
This hack bans IP addresses preemtively based on the HTTP_REFERER. Use this hack when users from a certain domain are registering and abusing your forums.

For example, consider the domain "vbulletin.org" is blacklisted. Users who are not registered (or at least not logged in) may click a link at vB.org to your forums. Because you have blacklisted the domain, their IP is immediately banned. You are also e-mailed when it happens.

This is not for the feint-of-heart to configure. You need to know PHP. If you don't know basic PHP, don't ask how to install this hack. Instead (no offense intended), learn the basics of PHP.

I used it recently at my forums, much to my amusement at times when the trolls suddenly disappeared and kept saying their IP was banned "even though they never visited before."

Dan
08 Jun 2003, 17:05
interesting hack filburt

Dean C
08 Jun 2003, 18:06
Now you could have done this nice and easily with admincp options ;)

- miSt

007
08 Jun 2003, 18:19
Looks interesting. I was actually thinking about this a few days ago. I might try it out. Doesn't seem too hard..

S.Shady
08 Jun 2003, 20:20
Nice hack. Ill go learn PHP now :)

i will probly end up using it but as of now we dont need it

MentaL
08 Jun 2003, 20:39
actually this is a good hack :)

1] stops leaching of sites you suspect
2] stops people linking to your site from a site which you dont want linked from (this works perfect for me)

i think its good :) :neato:

blackice912
09 Jun 2003, 00:46
So instant ban? That's cruel :p I like it.

filburt1
09 Jun 2003, 00:54
Yep, they're banned before they can even try anything. The IPs are included in the normal IP ban option so you can remove them later there.

S.Shady
09 Jun 2003, 01:41
--off-on topic--

also good for if you and anouther site get into a site battle. those are fun to be in but hosts sh*t them selfs becuase each site messes each opther up. not in fun or playing in hatred. our old site battle lasted a year with ttt.com ttt is shortend of the url.

--/off-on topic--

xug
11 Jun 2003, 12:10
I'm just starting to learn php but need to ask you guys a question so I can go on because I'm stuck on the array()

Should the script look like:

$baddomains = array('www.domain1.com','www.domain2.com');

Thank you for any help.

xug
16 Jun 2003, 01:04
Bump, sorry, but I really would like to know the answer on my above question.

Erwin
16 Jun 2003, 02:21
Isn't there a risk of banning potential members who are just coming over to have a look at your forums, and may join and be a good member?

Gary King
17 Jun 2003, 02:11
NOTE: HTTP_REFERRER isn't always reliable ;)

Although, this will not really affect much, since the majority of the people will still send in the right referrer.

partang2
23 Jun 2003, 22:16
06-11-03 at 01:10 PM xug said this in Post #10 (http://www.vbulletin.org/forum/showthread.php?postid=407471#post407471)
I'm just starting to learn php but need to ask you guys a question so I can go on because I'm stuck on the array()

Should the script look like:

$baddomains = array('www.domain1.com','www.domain2.com');

Thank you for any help.

Hey! Can someone answer this??

Gary King
23 Jun 2003, 23:11
Today at 06:16 PM partang2 said this in Post #14 (http://www.vbulletin.org/forum/showthread.php?postid=412051#post412051)
Hey! Can someone answer this??

www.php.net/manual/en/function.array.php

And that line is perfectly fine.

partang2
24 Jun 2003, 06:04
Finaly.... Thanks

filburt1
24 Jun 2003, 11:34
Today at 02:04 AM partang2 said this in Post #18 (http://www.vbulletin.org/forum/showthread.php?postid=412120#post412120)
Finaly.... Thanks

I suggest you rethink your attitude. As a free site we're under no obligation to provide any support at all, so you can at least be genuinely thankful...:)

partang2
24 Jun 2003, 14:29
You can read..? Read the last word in my post one more time please: T-H-A-N-K-S

filburt1
24 Jun 2003, 14:30
And the first word of your post:
Today at 02:04 AM partang2 said this in Post #18 (http://www.vbulletin.org/forum/showthread.php?postid=412120#post412120)
Finaly
Just a friendly note. :)

partang2
24 Jun 2003, 14:34
Oh.... "Finaly".... Hm... bad word... Well, sorry if I hurted someones feelings. It was not something I wanted to do.