D&D Forums - MyBB Plugins & Themes
How to ban IP to prevent spam in MyBB - Printable Version

+- D&D Forums - MyBB Plugins & Themes (https://developement.design/forum)
+-- Forum: MyBB General Discussions (https://developement.design/forum/forumdisplay.php?fid=23)
+--- Forum: Tricks & Tutorials (https://developement.design/forum/forumdisplay.php?fid=11)
+--- Thread: How to ban IP to prevent spam in MyBB (/showthread.php?tid=27962)



How to ban IP to prevent spam in MyBB - AmazOuz - 09-27-2022

Every forum suffers from spam either in the start or after it has started gaining users. Sometimes spammers use bots with multiple IP’s and when you know those IP’s, you can ban them so that you can prevent spam easily.

MyBB has this feature inbuilt and it is very useful. Yet lot of people don’t know about this and go for various custom plugins which may or may not be required. In this tutorial we will use the Ban IP feature of MyBB to prevent spam. I have previously shared a tutorial on stopping forum spam which includes the list of plugins that are very useful in prevention of forum spam.

This tutorial is simple and is easy to follow. Follow these steps to ban IP to prevent spam in MyBB;
1. Go to Your Admin CP > Configuration > Banning (From left hand side). You will see a page like this
2. You will see a box where you can add IP address, write the IP address of the spammer and MyBB has banned that IP.
3. Now suppose you want to ban multiple IP’s or a range, then enter the 127.0.0.* (notice the *, it is a wildcard that says anything in this area). This will ban all the IP’s In that particular range.

[Image: ipban.png?w=1366&ssl=1]

Suppose you want to use a different method to ban IP apart from MyBB way. We can use .htaccess to also ban IP. Simple steps to do so :-
1. Go to cpanel and create a file called .htaccess
2. Edit that file and write below code in that

Code:
order allow,deny
deny from 255.0.0.0
deny from 123.45.6.1
allow from all

255.0.0.0 and 123.45.6.1 are the IP of spammer. You can add as many IP you want. Notice how easy MyBB makes it for you.
Hope this tutorial helps you ban IP to prevent spam in MyBB

Source : WallBB (https://community.mybb.com/user-105159.html)