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)

liamwli 03-20-2013 11:00 PM

AdminCP Firewall ~ Protect your AdminCP!
 
1 Attachment(s)
This is a mod I made to increase the security of your forum!

It has the following features:
  • Email alert when an Admin logs into the CP
  • IP Checking for Admins
  • E-Mail if the IP isn't whitelisted
  • Block user access to the AdminCP if the IP isn't whitelisted
  • E-Mail if someone fails an AdminCP login
Those features will allow you to secure your AdminCP - and the only upload required is the product file!

So, what are you waiting for? Install now ;)

Update History
Version 1.3.3:
PHP error should be fixed

Version 1.3.2:
Fixed - PHP error message when logging into AdminCP :)
Branding Removed

Version 1.3.1:
Fixed - text would be displayed on login failure page if failure email turned off or not from admincp

Version 1.3:
Added - Ability to have an email sent when someone fails an admincp login.
Added - Branding. Sorry! Any donation of ?2.50 or more will allow you to remove it :)

Version 1.2:
Added - Ability to specify IP's as CIDR ranges
Added - Ability to set both IP email and IP deny
Added - IP email will now tell you if any forum members registered using the unauthorized IP
Changed - Updated Admin Help Pages

Version 1.1:
Added - Ability to specify multiple email addresses
Added - Help entries for the admin options
Changed - IP's are separated with a line break now, not a comma.

Mark as Installed if Installed and Nominate for MOTM if you think this mod deserves it!

-----------

Donating

I kindly accept donations for my work. Donating will allow you to remove the branding. You can donate via paypal using the link on the right, or using bitcoin. Please PM me if you wish to donate using bitcoin.

This modification is free to modify and distribute with attribution. I no longer own a vBulletin license.

liamwli 03-21-2013 08:34 PM

FAQ

Q. What if my IP changes? How can I get into the AdminCP!

A. Just add this line to your config.php file:

Code:

define('CPFIREWALLDISABLEIPDENY', true);
Q. You say the mod will deny a user access to the AdminCP. How does it do this - what is shown to the user?

A. The user will see the standard AdminCP no permission message, called by print_cp_no_permission().

Q. Can I reuse this mods code?

A. Please PM me.

synseal 03-22-2013 12:04 AM

1 Attachment(s)
This works very well!.

Installed and set up, tested, received email when I logged in as I had it set to send on every log in.

Tried behind a proxy received the unauthorized email with username and IP address, also got the not authorized message.

Working fine 4.2 with vbseo.

Thank you!

liamwli 03-22-2013 11:32 AM

Quote:

Originally Posted by synseal (Post 2411495)
This works very well!.

Installed and set up, tested, received email when I logged in as I had it set to send on every log in.

Tried behind a proxy received the unauthorized email with username and IP address, also got the not authorized message.

Working fine 4.2 with vbseo.



Thank you!

No worries, glad it works well for you :up: :)

Srdar 03-22-2013 02:00 PM

Can multiple email addresses be notified on logins?

liamwli 03-22-2013 03:28 PM

Quote:

Originally Posted by Srdar (Post 2411576)
Can multiple email addresses be notified on logins?

I'll add this by the end of the day GMT :)

liamwli 03-22-2013 05:40 PM

Quote:

Originally Posted by Srdar (Post 2411576)
Can multiple email addresses be notified on logins?

This has been added to the latest version :)

Liam

Srdar 03-22-2013 06:05 PM

Installed and working great

TheSupportForum 03-23-2013 12:36 AM

would it be possible if it checks the IP address of registered members

for example if user gets denied message, the email will include the IP address and a registered member if it matches

dizzynation 03-23-2013 02:07 AM

Seems like a great MOD, I will have to go to all the locations I go to now and get the IP's before I install though :)

Thanks!

ForceHSS 03-23-2013 03:02 AM

And what if your ip chances each time you restart your pc

TheSupportForum 03-23-2013 09:26 AM

Quote:

Originally Posted by ForceHSS (Post 2411685)
And what if your ip chances each time you restart your pc

yes that can happen only if you dont have static IP and the fact that your ISP doesnt control your IP

the only way to fool the system would be to clear all cookies and the forum will keep the cookie so even an IP change won't matter its picked up by the cookie

liamwli 03-23-2013 10:45 AM

Quote:

Originally Posted by ForceHSS (Post 2411685)
And what if your ip chances each time you restart your pc

Then I suggest you use the email on login system and remain vigilant to those logins ;)

I will also try and make it so you can enter IP's as a CIDR mask - so as to whitelist multiple IP's at the same time

Quote:

Originally Posted by TheSupportForum (Post 2411662)
would it be possible if it checks the IP address of registered members

for example if user gets denied message, the email will include the IP address and a registered member if it matches

Hmm, clever! I'll see what I can do ;)

Liam

BadgerDog 03-23-2013 01:42 PM

Installed for testing with thanks on 4.1.3 ...

Regards,
Doug

FTG LIQUID CL 03-23-2013 02:42 PM

Sounds nice ,I will give it a try!

avitor 03-23-2013 03:19 PM

thanks for so nice mod

whats upend if i don't have access to that ip anymore ? and i want to change it to my new ip
can i log in to admin cp from other ip? how to do that ?
cheers

liamwli 03-23-2013 03:21 PM

Quote:

Originally Posted by avitor (Post 2411760)
thanks for so nice mod

whats upend if i don't have access to that ip anymore ? and i want to change it to my new ip
can i log in to admin cp from other ip? how to do that ?
cheers

That's FAQ 1 ;)

See the second post :)

SuperTaz 03-24-2013 01:21 AM

Nice mod. Installed. :)

liamwli 03-24-2013 01:03 PM

Quote:

Originally Posted by TheSupportForum (Post 2411662)
would it be possible if it checks the IP address of registered members

for example if user gets denied message, the email will include the IP address and a registered member if it matches

That is in the newest version :)

Quote:

Originally Posted by ForceHSS (Post 2411685)
And what if your ip chances each time you restart your pc

I have now added the ability to set IP CIDR ranges :)

franzes80 03-24-2013 02:09 PM

very well!!Works on vb 4.20 Pl3 thank you

liamwli 03-24-2013 02:10 PM

Quote:

Originally Posted by franzes80 (Post 2411947)
very well!!Works on vb 4.20 Pl3 thank you

Please don't forget to mark as installed :)

Liam

elfenny 03-24-2013 07:24 PM

Quote:

Originally Posted by liamwli (Post 2411473)
FAQ

Q. What if my IP changes? How can I get into the AdminCP!

A. Just add this line to your config.php file:

Code:

define('CPFIREWALLDISABLEIPDENY', true);

this is going to end config.php?

I use multiple ip

liamwli 03-24-2013 07:31 PM

Quote:

Originally Posted by elfenny (Post 2412033)
this is going to end config.php?

I use multiple ip

It would go anywhere in the config.php file, but on it's own line.

You can also disable the IP deny system in the options, which is recommended if your admins don't have static IP's.

TheSupportForum 03-24-2013 07:33 PM

Hi liamwli

in your next version can you do login attempts too, so it logs if someone also tries to login

liamwli 03-24-2013 07:51 PM

Quote:

Originally Posted by TheSupportForum (Post 2412036)
Hi liamwli

in your next version can you do login attempts too, so it logs if someone also tries to login

Hmm, I'll certainly try....

TheSupportForum 03-24-2013 10:01 PM

with new version i get

Warning: Invalid argument supplied for foreach() in [path]/login.php(119) : eval()'d code on line 4
but testing it, the email does work on sending the correct info

https://vborg.vbsupport.ru/external/2013/04/56.png

liamwli 03-24-2013 10:13 PM

Quote:

Originally Posted by TheSupportForum (Post 2412067)
with new version i get

Warning: Invalid argument supplied for foreach() in [path]/login.php(119) : eval()'d code on line 4
but testing it, the email does work on sending the correct info

https://vborg.vbsupport.ru/external/2013/04/56.png

Hmmm. Strange. What PHP version are you using, and when does this occur?

TheSupportForum 03-24-2013 10:29 PM

post edited.................


found Solution

main admin account did not have IP inserted and error now goes

and nominated for MOTM

this is a script that i need to find many time, thanks for your development of this

liamwli 03-24-2013 10:59 PM

Quote:

Originally Posted by TheSupportForum (Post 2412073)
post edited.................


found Solution

main admin account did not have IP inserted and error now goes

and nominated for MOTM

this is a script that i need to find many time, thanks for your development of this

Ah, something I wouldn't have tested ;-) Glad you got it fixed and thanks for the nomination!

Liam

dean3862 03-25-2013 03:24 AM

i cant get this to work i added 5 ip s an i get this

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.

what do i put between the ips ? to separate ips......

TheSupportForum 03-25-2013 03:29 AM

Quote:

Originally Posted by dean3862 (Post 2412103)
i cant get this to work i added 5 ip s an i get this


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.



what do i put between the ips ? to separate ips......

IP address per line

liamwli 03-25-2013 08:17 AM

Quote:

Originally Posted by TheSupportForum (Post 2412104)
IP address per line

Correct :)

See FAQ 1 if you can't access the admincp.

BadgerDog 03-26-2013 10:48 AM

Anyone else seeing this error with v1.2 when logging into the AdminCP?

Warning: Invalid argument supplied for foreach() in [path]/includes/functions_login.php(377) : eval()'d code on line 78

I only noticed it this morning when logging in from my IPad?

Thanks... :)

Regards
Doug

liamwli 03-26-2013 11:14 AM

Quote:

Originally Posted by BadgerDog (Post 2412353)
Anyone else seeing this error with v1.2 when logging into the AdminCP?

Warning: Invalid argument supplied for foreach() in [path]/includes/functions_login.php(377) : eval()'d code on line 78

I only noticed it this morning when logging in from my IPad?

Thanks... :)

Regards
Doug

Make sure all user accounts have an IP specified. Check the main admin account mainly.

BadgerDog 03-26-2013 11:57 AM

Quote:

Originally Posted by liamwli (Post 2412357)
Make sure all user accounts have an IP specified. Check the main admin account mainly.

Ok, but what's the point when I as an Admin, could possibly be logging in from various remote random IP addresses? I don't know in advance what they may be?

Are you saying that this mod will always generate HTML errors unless the IP address of the person logging in is always in the mod's data field?

Regards
Doug

liamwli 03-26-2013 02:01 PM

Quote:

Originally Posted by BadgerDog (Post 2412363)
Ok, but what's the point when I as an Admin, could possibly be logging in from various remote random IP addresses? I don't know in advance what they may be?

Are you saying that this mod will always generate HTML errors unless the IP address of the person logging in is always in the mod's data field?

Regards
Doug

I'm not referring to the mod settings, I'm referring to the user manager. Edit the main admin user and see if there is a value in the IP field.

BadgerDog 03-26-2013 04:05 PM

Quote:

Originally Posted by liamwli (Post 2412375)
I'm not referring to the mod settings, I'm referring to the user manager. Edit the main admin user and see if there is a value in the IP field.

:confused:

Are you referring to UserId #1 in the users file?

If so, then the registration IP address field for that user is blank...

Regards,
Doug

liamwli 03-26-2013 04:20 PM

Quote:

Originally Posted by BadgerDog (Post 2412401)
:confused:

Are you referring to UserId #1 in the users file?

If so, then the registration IP address field for that user is blank...

Regards,
Doug

Yes, I am. Enter a valid value for the registration IP address and the error should vanish :P

127.0.0.1 will do ;)

BadgerDog 03-26-2013 04:47 PM

Quote:

Originally Posted by liamwli (Post 2412402)
Yes, I am. Enter a valid value for the registration IP address and the error should vanish :P

127.0.0.1 will do ;)

Thanks .. :)

It won't let me put anything in that user ID as it says it's a protected user and it wants me to modify the config.php file ... :p

Regards,
Doug

liamwli 03-26-2013 09:47 PM

Quote:

Originally Posted by BadgerDog (Post 2412408)
Thanks .. :)

It won't let me put anything in that user ID as it says it's a protected user and it wants me to modify the config.php file ... :p

Regards,
Doug

Security conscious site owners, nice ;)


All times are GMT. The time now is 07:13 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.01532 seconds
  • Memory Usage 1,837KB
  • 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
  • (2)bbcode_code_printable
  • (24)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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