vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - AdminCP Firewall ~ Protect your AdminCP! (https://vborg.vbsupport.ru/showthread.php?t=296383)

RichieBoy67 09-13-2013 08:11 PM

Would also suggest renaming your admincp and modcp.

Bubble #5 09-18-2013 12:40 AM

Quote:

Originally Posted by DemOnstar (Post 2442761)
Then log in...Next go to your plugin manager and disable the mod from there..
After that you will either need to remove what you added to the config.php, comment it out or replace the word 'true' with 'false'. But that again is a guess...

Hope that helps...

It has banned me from my own forum. It won't let me log in....

(plugins are disabled).

ozzy47 09-18-2013 12:48 AM

This may work.

Open your config.php and below<?php add this line:

PHP Code:

 define('CPFIREWALLDISABLEIPDENY'true); 

So it looks like this:
PHP Code:

<?php
define
('CPFIREWALLDISABLEIPDENY'true);
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 4.1.4


Bubble #5 09-18-2013 12:58 AM

THANKS Ozzy :up:

I was able to get in using the "return;" function :)

ozzy47 09-18-2013 01:01 AM

What return function?

Bubble #5 09-18-2013 01:11 AM

I'll send you a PM ;)

DemOnstar 09-18-2013 02:54 AM

Quote:

Originally Posted by Bubble #5 (Post 2446378)
It has banned me from my own forum. It won't let me log in....

This is the reason I don't use it. My IP changes all of the time.. I guess if your IP is fixed, then it is a suitable app.

I see now you have access, curious to know what the return function is too..

Bubble #5 09-18-2013 03:31 AM

Quote:

Originally Posted by DemOnstar (Post 2446404)
This is the reason I don't use it. My IP changes all of the time.. I guess if your IP is fixed, then it is a suitable app.

Would be nice if there was a password of some kind that would allow the main admin to bypass being banned and log in.

Quote:

I see now you have access, curious to know what the return function is too..
You've got mail :)

DemOnstar 09-18-2013 10:24 AM

Quote:

Originally Posted by Bubble #5 (Post 2446411)
Would be nice if there was a password of some kind that would allow the main admin to bypass being banned and log in.

Agreed.. Splendid idea!:up:

ozzy47 09-18-2013 10:28 AM

What I posted in post #83 above will allow you to disable the product and get into the ACP should you get locked out by this product. :)

Paul M 09-18-2013 10:44 AM

Just adding the genereric disable hooks define to your config.php would also allow you back in.

PHP Code:

// Disable Hooks
define('DISABLE_HOOKS',true); 


DemOnstar 09-18-2013 01:07 PM

Installed.

DemOnstar 09-18-2013 01:20 PM

Quote:

Originally Posted by Paul M (Post 2446460)
Just adding the genereric disable hooks define to your config.php would also allow you back in.

PHP Code:

// Disable Hooks
define('DISABLE_HOOKS',true); 


I did just that...

There is however a slim, coincidental hole with this idea as it will disable all the spam stuff, the protection stuff and everything else for the brief period where one has to do the changes in config.php and then gain access again to add another IP..

There is a vulnerability here... I like the password idea.

ozzy47 09-18-2013 08:29 PM

Quote:

Originally Posted by Paul M (Post 2446460)
Just adding the genereric disable hooks define to your config.php would also allow you back in.

PHP Code:

// Disable Hooks
define('DISABLE_HOOKS',true); 


Paul, If I understand this mod correctly, it does not use hooks, it can not be disabled that way.

So the way to disable it is the way I said in post #83 and as theOP described in post #2

DemOnstar 09-19-2013 04:04 AM

Quote:

Originally Posted by Paul M (Post 2446460)
Just adding the generic disable hooks define to your config.php would also allow you back in.

PHP Code:

// Disable Hooks
define('DISABLE_HOOKS',true); 


Quote:

Originally Posted by ozzy47 (Post 2446557)
Paul, If I understand this mod correctly, it does not use hooks, it can not be disabled that way.

So the way to disable it is the way I said in post #83 and as theOP described in post #2

I just added both to my config.php and left them commented out..
In that case, when the inevitable day comes where I have to use them, I know they are there...:)

I guess next I have to protect the includes folder..

Bubble #5 09-19-2013 05:28 AM

Quote:

Originally Posted by DemOnstar (Post 2446490)
There is a vulnerability here... I like the password idea.

At a minimum it should have a password, but after thinking about it I'd prefer if the admin could fill out their own security question in the ACP, and then answer it. There are scripts that can guess passwords, but who's going to know the answer to your own security question but you?

DemOnstar 09-19-2013 10:33 AM

Quote:

Originally Posted by Bubble #5 (Post 2446643)
At a minimum it should have a password, but after thinking about it I'd prefer if the admin could fill out their own security question in the ACP, and then answer it. There are scripts that can guess passwords, but who's going to know the answer to your own security question but you?

This is a better idea..... Agreed. +1

DemOnstar 09-19-2013 10:35 AM

I had an email..

A user has logged into the AdminCP using an unauthorized IP address.

Ok, I had to check but it doesn't seem to be the case..
Perhaps re-wording the mail to

A user has attempted to log into the AdminCP using an unauthorized IP address.

I will try to do this myself...

EDIT: It was easy, it is all in languages and phrases...Shall see if it shows up the next time...:up:

bigs15 09-20-2013 06:54 PM

Mine is dynamic Ip so how does this mod help me?

obglobal.net 09-21-2013 04:15 AM

Could someone please help me with instructions on how to install this? I'd really like to add this mod as I've been hacked twice in the last 2 weeks.

Thanks very much.

DemOnstar 09-21-2013 05:13 AM

Quote:

Originally Posted by obglobal.net (Post 2447000)
Could someone please help me with instructions on how to install this? I'd really like to add this mod as I've been hacked twice in the last 2 weeks.

Thanks very much.

Download

Go to your admincP/Plugin and Products/Manage Products/Add/Import Product.
:confused:

obglobal.net 09-21-2013 07:41 AM

Quote:

Originally Posted by DemOnstar (Post 2447006)
Download

Go to your admincP/Plugin and Products/Manage Products/Add/Import Product.
:confused:

Good gracious! Is that it? Thanks for the heads up, bro! I thought it was gonna be a far more detailed process.

Awesome!

obglobal.net 09-21-2013 07:57 AM

I just tried to set it up with my own IP and everything and it's blocked me from the ACP!


Sorry, you don't have permission to access the administrative controls on this page.

If you need to access this page, ask your lead administrator to enable your permissions for this page using the Administrator Permissions section of the control panel.

ozzy47 09-21-2013 08:12 AM

This may work.

Open your config.php and below<?php add this line:

PHP Code:

 define('CPFIREWALLDISABLEIPDENY'true); 

So it looks like this:
PHP Code:

<?php
define
('CPFIREWALLDISABLEIPDENY'true);
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 4.1.4


obglobal.net 09-21-2013 08:21 AM

Quote:

Originally Posted by ozzy47 (Post 2447024)
This may work.

Open your config.php and below<?php add this line:

PHP Code:

 define('CPFIREWALLDISABLEIPDENY'true); 

So it looks like this:
PHP Code:

<?php
define
('CPFIREWALLDISABLEIPDENY'true);
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 4.1.4


Thanks very much, Ozzy47. I read post #83 and have been looking for where I find config.php.

I searched the vb.org forums and apparently it's in forum/includes, but I don't know where to find that, either. I couldn't find it in cPanel.

I use FileZilla - it should be in there, right? :up:

ozzy47 09-21-2013 08:32 AM

Correct, it will be in what ever folder your forums resides in, so something like this, /public_html/forums/includes

obglobal.net 09-21-2013 08:46 AM

Quote:

Originally Posted by ozzy47 (Post 2447028)
Correct, it will be in what ever folder your forums resides in, so something like this, /public_html/forums/includes

I'll check that out, bro. You're a good dude. TYVM.

obglobal.net 09-21-2013 10:39 AM

Quote:

Originally Posted by ozzy47 (Post 2447028)
Correct, it will be in what ever folder your forums resides in, so something like this, /public_html/forums/includes

Man. It was hidden away in there. I found it, though. So does this code work? You've tried it, have you?

obglobal.net 09-21-2013 10:58 AM

Quote:

Originally Posted by ozzy47 (Post 2447024)
This may work.

Open your config.php and below<?php add this line:

PHP Code:

 define('CPFIREWALLDISABLEIPDENY'true); 

So it looks like this:
PHP Code:

<?php
define
('CPFIREWALLDISABLEIPDENY'true);
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 4.1.4


Hey, bro. It didn't work, unfortunately. I edited the config.php as you said, then put the original config.php back in the includes folder afterward as I got an error message saying that without a config.php file I couldn't access the ACP.

Any more tips? I could certainly use them. :D

Thanks, man.

I tried the "disbale hooks" code that was in here as well, and that didn't work either.

Ahhhhhh! haha

DemOnstar 09-21-2013 11:32 AM

Quote:

Originally Posted by obglobal.net (Post 2447058)
I edited the config.php as you said, then put the original config.php back in the includes folder afterward as I got an error message saying that without a config.php file I couldn't access the ACP.

Rather confusing.. You say you edited the config.php and then put back the original..
If you put back the original then the edited config.php should be the one to replace the original.:confused:

ozzy47 09-21-2013 11:39 AM

Yeah there was no need to load the original config file, just remove the line you added.

obglobal.net 09-21-2013 11:44 AM

Oh, man. I don't know what I've done.

Sorry to bother you, fellas, and thanks for hitting me back.

Whatever happened the first time, it didn't work.

Should I just try and repeat the process, do you think?

DemOnstar 09-21-2013 11:48 AM

Repeat the process if it is less confusing.. Save the edited version with the
Code:

define('CPFIREWALLDISABLEIPDENY', true);
Upload and let us know what happened.

One more thing, in options/settings/AdminCP firewall

Allowed IP's
Enter the IP's that are allowed to access the AdminCP. These can be single IP's or CIDR ranges. One IP or range per line.

Have you included your IP?

obglobal.net 09-21-2013 11:50 AM

Quote:

Originally Posted by DemOnstar (Post 2447066)
Repeat the process if it is less confusing.. Save the edited version with the
Code:

define('CPFIREWALLDISABLEIPDENY', true);
Upload and let us know what happened.

One more thing, in options/settings/AdminCP firewall

Allowed IP's
Enter the IP's that are allowed to access the AdminCP. These can be single IP's or CIDR ranges. One IP or range per line.

Have you included your IP?

Yeah, I put my IP in.

I just added the original "disable hooks" code and got this: Parse error: syntax error, unexpected '<' in /home/obglobal/public_html/includes/config.php on line 206.

Which is what I got the first time.

Thanks a lot for getting back to me, I appreciate it very much.

obglobal.net 09-21-2013 11:54 AM

I got it! Oh, thank Christ!

I actually had to delete the <? at the end of the config.php.

Any opinions on that?

Thanks so much, dudes, I was sh*tting bricks for a while there.

DemOnstar 09-21-2013 11:58 AM

Currently mine looks like this at the very top

Code:

<?php
// This to disable AdminCP Firewall.
//define('CPFIREWALLDISABLEIPDENY', true);
// This to Disable Hooks
//define('DISABLE_HOOKS',true); 
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.2.1
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ?2000-2013 vBulletin Solutions Inc. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

I haven't yet tried it as you can see, it is still commented out using // at the beginning of the order..

I have a fixed IP for the moment, perhaps now I should go and try from another IP to see if I get the same errors as you...?

Got's me thinking brother...

DemOnstar 09-21-2013 11:59 AM

Quote:

Originally Posted by obglobal.net (Post 2447068)
I got it! Oh, thank Christ!

I actually had to delete the <? at the end of the config.php.

Any opinions on that?

Thanks so much, dudes, I was sh*tting bricks for a while there.

What made you think of deleting the <?

obglobal.net 09-21-2013 12:00 PM

Quote:

Originally Posted by DemOnstar (Post 2447069)
Currently mine looks like this at the very top

Code:

<?php
// This to disable AdminCP Firewall.
//define('CPFIREWALLDISABLEIPDENY', true);
// This to Disable Hooks
//define('DISABLE_HOOKS',true); 
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 4.2.1
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ?2000-2013 vBulletin Solutions Inc. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

I haven't yet tried it as you can see, it is still commented out using // at the beginning of the order..

I have a fixed IP for the moment, perhaps now I should go and try from another IP to see if I get the same errors as you...?

Got's me thinking brother...

You're a good dude, DS. Same goes for Ozzy47. Thanks for everything, for real.

Man, I think I just lost half a dozen years off my life.

Anyway, this mod is awesome, but I need a fixed IP for it to work as intended, is that right?

obglobal.net 09-21-2013 12:02 PM

Quote:

Originally Posted by DemOnstar (Post 2447070)
What made you think of deleting the <?

It said there was a parse error on line 207, an unexpected <

So I just deleted that and the question mark next to it and put the code under the <? at the top of the page instead. Pot luck, undeniably.

I went back in and deleted the code and all's swell.

:up:

DemOnstar 09-21-2013 12:03 PM

Fixed IP or any IP that is recorded in the

Allowed IP's
Enter the IP's that are allowed to access the AdminCP. These can be single IP's or CIDR ranges. One IP or range per line.

I am guessing here....


All times are GMT. The time now is 12:53 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01563 seconds
  • Memory Usage 1,857KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (12)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete