Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

MyBB 

[Tutorial] Protecting your forum

Information: http://community.mybb.com/thread-44977.html
Extra Secure: http://community.mybb.com/thread-131553.html

MyBB is ofcourse very secure, but it can still be hacked because of laziness...

This will teach you BASIC MyBB protection.

1. Admin Directory

Anyone should know that it is very important to rename the administator directory...
If they can't find it how should they hack it.

Go to your filehost and then find the folder called "admin" and change the name to something else not obvious like "administrator"...

Then, search for the config.php file in the "inc" directory.
Look for this code:

Code
/**
* Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.
*/

$config['admin_dir'] = 'admin';

And change the 'admin' part to the name you changed the directory to.

2. .htaccess
Renaming the directory is not enough to fully stop it.
This code will check the users IP that is trying to acces the admin page.

Create a .htaccess file in your administrator folder and add this code:
Code
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^12\.345\.678\.9
RewriteRule .* http://www.mybbwebhost.com [R=301,L]

Change the "12\.345\.678\.9" to your IP address with the format and change the "http://www.mybbwebhost.com" to the URL you want them to be redirected.

If you have more admin's then add this code instead:
Code
ErrorDocument 403 http://www.mybbwebhost.com
Order deny,allow
Deny from all
Allow from 123.45.67.899
Allow from 998.76.54.321

Change the "123.45.67.899" and "998.76.54.321" to your IP addresses, if you have more add more lines.
And ofcourse change the "http://www.mybbwebhost.com" to the URL you want them to be redirected.

3. Deny externall config access

Create a .htacces file in your "inc" folder and add this code:
Code
<files config.php>
Order deny,allow
deny from all
</files>

This will deny any EXTERNALL access, the forums will still run normally.
Good tutorial, You could also do things like password protecting your admin directory
Very nice tutorial my friend, how long did it take you to write all this?
(Mar 27, 2015 08:55 PM)Comedic Wrote:  Very nice tutorial my friend, how long did it take you to write all this?

Around 45 minutes, I just like MyBB but its horrible how so many forums get hacked easily...

It's not the softwares fault but mostly the owner's.
This should help a lot of new MyBB forums as i know there are quite a few exploits that are easily able to use on new forums or even some older forums if the owners are unaware of how to defend against them.
(Mar 28, 2015 12:56 AM)ThorAndOdin Wrote:  This should help a lot of new MyBB forums as i know there are quite a few exploits that are easily able to use on new forums or even some older forums if the owners are unaware of how to defend against them.

Yes, you should also look if you have any plugins that are exploitable.
Nice guide. This one has some extra points as well, for a read.
http://community.mybb.com/thread-131553.html
Giving credits to the original author would be nice.
http://community.mybb.com/thread-44977.html

OT: Still useful you post this, so other members can secure their forums.
Signature space for rent. Send me a PM or buy it here.
[Image: ux8AIrU.png]
Pretty helpful for a lot of newbie board owners out there.
Good post.
[Image: Go9NL9v.png]
(Mar 28, 2015 06:40 AM)Michael Wrote:  Giving credits to the original author would be nice.
http://community.mybb.com/thread-44977.html

OT: Still useful you post this, so other members can secure their forums.

Its from there, but I worded it myself and did not just copy and paste.

Will add these 2 posts to the main thread!
This is an excellent tutorial if you're hosting your forum on shared hosting. If you're hosting on a VPS/VDS or a dedicated node, it would get a lot more complex.

Great tut.
(Apr 10, 2015 08:40 AM)Kogan Wrote:  This is an excellent tutorial if you're hosting your forum on shared hosting. If you're hosting on a VPS/VDS or a dedicated node, it would get a lot more complex.

Great tut.

Yeah, these are only the basic things.

Thanks a lot!
This is a good tutorial. Thank you for sharing this!
(Apr 10, 2015 09:18 AM)PsykD Wrote:  This is a good tutorial. Thank you for sharing this!

Thanks a lot for your feedback, PsykD!
Pretty helpful for a lot of newbie board owners out there.
Good post.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by FooterFeb 15, 2025 06:34 AM 0 101 Feb 15, 2025 06:34 AM
Last Post: Footer
by Carl EliasJan 18, 2014 03:32 PM 11 194 Jan 18, 2014 03:32 PM
Last Post: Carl Elias
by ҠostyNov 27, 2012 05:56 AM 4 97 Nov 27, 2012 05:56 AM
Last Post: 3lit3