Ban User IP Mod by Davio for v3.3.03 of the Snitz Forums Last Modified: October 10, 2001
You will be able to ban users by thier ip address or ban a range of ip addresses. This is by no way a permanent solution to stop spammers from spamming your forum. This used along with other prevent methods is used as a deterant to spammers or mis-behaving users.
UPDATE: October 10 - Ban Message is now Formated to allow you to use forum code to format the ban message. For the 3.3 version only.
August 23 - Added the option to set your own ban message in the Ban Users Config. For the 3.3.03 version only.
April 26 - Changed the datatype for C_STRBANIP and C_STRBANIPRANGE in the install file from "byte" to "int". Byte isn't supported on SQL servers. For the 3.1 SR4 version only.
SETUP Read the Readme.txt file or the WinZip comments. The setup instructions for the Snitz Forums 3.3 version are different from the 3.1 SR4 version of this mod.
Since I have only access to an Access database, it would be good if I got back some input from SQL and MySql users also.
I needed to move this from archives since I had updated the mod since September 2 (that the last date we backed up the database). And the link needed to be updated.
Da_stimulator suggested to me perhaps adding a Cookie to the banned persons computer which might, for the less computer sauvy banned people, be able to block the dialup users as well. Workable?
quote: Da_stimulator suggested to me perhaps adding a Cookie to the banned persons computer which might, for the less computer sauvy banned people, be able to block the dialup users as well. Workable?
more than workable, doable.... I have a banning system that does that right now, courtesy of IH of http://www.someplacesomewhere.com
I like this one a lot but I've made some smaller tweaks to optimize the code but this should get you somewhere:
note that you can get easily trapped in Ban mode. It does several things like read all IP's that a person has ever posted with in topics and replies and adds them to the ban database, writes a separate cookie and populates the database on reattempts, you can ban by members names too. hard to explain everything that is going on but it is a very useful tool.
Dayve, that is a very intresting script. I am always open to improving the ban ip mod.
Skipping through the code, I am not understanding what more the script is doing than placing a cookie on the banned users computer and storing thier ip. I think I see it is setting another cookie when they try to get to the forums again. Is it also renaming the new cookie to something else? How is the script better than the current one here?
quote: Dayve, that is a very intresting script. I am always open to improving the ban ip mod.
Skipping through the code, I am not understanding what more the script is doing than placing a cookie on the banned users computer and storing thier ip. I think I see it is setting another cookie when they try to get to the forums again. Is it also renaming the new cookie to something else? How is the script better than the current one here?
- David
it collects the username and all ip's this person has ever used in any topic or reply as well. I have modified mine to also collect the registration ip which I record when a a new member registers. This used with email password mod has really made things difficult for malicious spamming which I had incurred about a month ago.
not quite sure I said it was better but you can easily catch someone in a loop of bans. there is also an embedded check for administrators ip's (only recommended for those with static IP's!!) that will ban a person if they somehow logged in as me but did not meet the required ip address hard coded in the script. Although this is really not needed I use it as an additional tier of protection.
im interested in dayve addon too I read the topic on that site but he stated that you need to creat a new table called FORUM_BAN, with two string fields: M_NAME, M_IP
quote: im interested in dayve addon too I read the topic on that site but he stated that you need to creat a new table called FORUM_BAN, with two string fields: M_NAME, M_IP
how can i do that?
this gets asked quite a lot of times. There are several options:
if your database is small in size, download it from your host and using access, created the table and fields.
learn how to create .dbs files which I have done before and are quite easy to do
if none of the above options seem easy to you then I would recommend that if you want to continue doing mods and tweaks to your forum that you should really try learning. don't take this is a wrong tone or anything, it is just really important that you take control over your database before your database takes control of you!!
Sorry I haven't taken time to actually read through your script, but one initial thought came to mind reading this post.
Using all IP's from the messages the user has posted sounds prone to problems to me, especially with say the likes of AOL users who's IP rotates regularly even during the same session.
quote: Sorry I haven't taken time to actually read through your script, but one initial thought came to mind reading this post.
Using all IP's from the messages the user has posted sounds prone to problems to me, especially with say the likes of AOL users who's IP rotates regularly even during the same session.
you get the same problem if you ban a range of ip's which is just an occupational hazzard that I am willing to take. haven't had any problems yet, but then again, I don't get many AOL users...
Yes thats true. But with searching all of the Posts made by that poster your banning individual IP's accross perhaps a couple of C class ranges, just seems an odd approach to me.
quote: Yes thats true. But with searching all of the Posts made by that poster your banning individual IP's accross perhaps a couple of C class ranges, just seems an odd approach to me.
doesn't seem at all odd to me. think of the odds first of all, especially on a small scale forum such as mine. now I might reconsider on a larger forum but larger forums have the luxury of more administrators and moderators to police the forum, such as Snitz Community. Smaller forums such as myself with controversal topics at time tend to draw in problematic situations with malicious spammers. I will take my chances. I guess this is something everyone needs to make a personal choice with.