vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - DnP Firewall : SEO Friendly Double-Protection Layers against Flood / DoS / Spam Bots (https://vborg.vbsupport.ru/showthread.php?t=221739)

silveryhat 08-24-2009 10:00 PM

DnP Firewall : SEO Friendly Double-Protection Layers against Flood / DoS / Spam Bots
 
1 Attachment(s)
DnP Firewall Gateway Demo
*To test Front-End Layer protection : It's the page shows up when you first enter the site.
*To test 2nd Layer Protection : Pass Front-End Layer protection, then Tap (not hold) F5 continuously nonstop for 10 seconds.

DnP Firewall Gateway was designed to stand against the massive DoS attack targeted DnP Network? few years ago. Upon installed, it has been reducing the severe level of many incidents and preventing my forum from being overload ever since. It also nearly blocks away all the automated bots that come to register for spamming on the forum. The last release was almost 3 years ago and there had never been any update to the MOD. Version 0.3 came with many issues though it was very stable. I decide to give another upgrade and simplify the code a little for another release. Don't hesitate to install DnP Firewall Gateway for your forum and hope you will find it as useful as I do.

*This Firewall is compatible with All PHP Forum systems and Search Engines Friendly*

1 - Use this simple Firewall to protect your ( vBulletin / phpBB / SMF / IPB / etc.. ) forum
  1. Deny unwanted Bots
  2. Reduce Spamming
  3. Block Flooding Attack
  4. Partially weaken DoS
  5. Prevent automated malicious scripts pass through
2 - Side features
  1. Increase your Adsense Impression and Revenue.
  2. Act as an Introduction page for your forum.
  3. SEO Friendly. (DnP Network has this firewall installed for more than 2 years. Google Search : silveryhat returns 29,000+ results)
  4. No query executed / Extremely fast

3 - Installation for vBulletin Forum
a. Upload all files from package to your forum_root
b. Open global.php using Notepad. (Why global.php ? Because global.php is the core file of vBulletin system , it is also the initial startup file that calls important database queries and keeps sensitive information. The Firewall comes before any of the processes run to prevent direct damage to the forum. That is the reason why DnP Firewall does not use any hook or come as an automatic plugin like other MOD)
Find
PHP Code:

// identify where we are
define('VB_AREA''Forum'); 

Add BEFORE
PHP Code:

if(file_exists('dnp_fw.php')){require_once('dnp_fw.php');} 

Simply remove this line to deactivate the firewall

c. Save and Reupload global.php to your server. Done!
3b - Upgrade
Simply perform step
Quote:

a.Upload all files from package to your forum_root
*If you have custom layout, do not overwrite dnp_fw_template.php*

4 - Note

Eventhough the DnP Firewall Gateway could reduce the damage of a flooding attack, it does not guarantee that all of the negative affects of an attack could be avoided. I do not hold any responsibility for such matters. As an administrator you should know that there is not software firewall that could be as effective as a hardware firewall.

You are free and encouraged to modify the Layout of the Gateway page in dnp_fw_template.php but please respect the copyrights notice of the author. Additional templates are also available if you'd want different look. (How to change DnP Firewall Template)


DnP Firewall Gateway also acts as an Introduction page for your forum if you fill it up with rich information content of your site. Adsense or other Ads could be placed here to maximize your revenue since every visitor will need to pass by this Introduction page. It almost 100% guarantees that your CTR or Page Impression will raise quickly.

5 - Compability

This MOD can be used with almost any system that runs PHP. Compatible with all vBulletin forum from 3.0.x to 3.8.x

It should not conflict with any existing MODs on your forum.

DnP Firewall Gateway consumes very little server resource because on the surface, it is just a simpe webpage. It does not execute any query, therefore your database will not be affected under any circumstances by this MOD.

DnP Firewall Gateway could together be used with InV-Firewall Script to act as doubled-firewall system that 2 x the strength against Flood /DoS Attack with bonus of denying malicious query and tracking access.

DnP Firewall Gateway is also compatible with DnP Instant! AJAX/SEO Musicbox & News smart anti-flood protection that brings extra power to the firewall. The 3 firewalls, DnP Firewall Gateway - InV-Firewall Script and Smart Anti-Flood from DnP Instant! AJAX/SEO Musicbox & News can be used altogether to triple the strength.

6 - History Log
v1.4
  1. Optimize firewall structure
  2. Optimize 2nd-layer protection
v1.3
  1. Add 2nd layer protection
  2. 3 more options for 2nd layer protection in config file
v1.2 Beta
  1. Improve Firewall Stability
  2. Add Domain option
  3. Separate config file
7 - Useful links
  1. Setup Domain List for DnP Firewall Gateway
  2. How to change DnP Firewall Template
  3. What are the Search Engines allowed by DnP Firewall Gateway ?
  4. Branding-Free License of DnP Firewall Gateway
  5. Detail information about DnP Firewall 2nd Layer Protection
  6. Templates collection


[Original topic can be found at http://www.silveryhat.com/delynie/f142/dnp-firewall-help-your-forum-fight-flood-attack-dos-spam-unwated-bots-6985.html]

yahoooh 08-25-2009 06:06 PM

how to make it gorup user depend on
?
and also you should think about google and others bot will be affected by this way

silveryhat 08-25-2009 06:16 PM

Quote:

Originally Posted by yahoooh (Post 1874239)
how to make it gorup user depend on
?
and also you should think about google and others bot will be affected by this way

Good questions, and I think many have the same so here's your answer :rolleyes:

1 - A firewall itself does not need to differ usergroups. When you first come to a forum you are not logged in, therefore how you could have a usergroup? It is also not necessary because any established connection is potential to be a problem, even the admin account if it falls into wrong hand. It's better safe than sorry my friends. And, without checking usergroups, the firewall remains intact to any database query, that is the goal of this firewall as well.

2 - For Google and other bots, you missed

http://img200.imageshack.us/img200/80/61103220.jpg

Example : DnP Network has installed this firewall for last few years. Google Search : DnP Network returns 2,800+ results. Yahoo Search returns 5,600+ results. And of course, the new-born Bing Search, only returns 190+ results at the moment :(

You can find more details at What are the Search Engines allowed by DnP Firewall Gateway ?

saadessa 08-25-2009 06:24 PM

thank you for this great hack
i will try and comeback

digicom 08-25-2009 06:49 PM

Excellent Installed :up:

silveryhat 08-25-2009 06:54 PM

Please kindly check for any bugs so I can quickly improve the MOD :)

Kolbi 08-25-2009 08:58 PM

I think the fact that a guest has to pass this gateway many off them will leave the site before entering it.
CanĀ“t you install a automatically redirecting?

There are the advantages of this mod if you think about vbfirewall?

mark370 08-25-2009 10:07 PM

Maybe a bug ?

we have installed this on our main site and test site, on the test site we have no problems at all :)
but on our main site the gateway page and our login page keeps redirecting to and fro each other and will not let you login.

it does this with or without using www in the url.

any ideas ?

silveryhat 08-25-2009 11:35 PM

Quote:

Originally Posted by Kolbi (Post 1874354)
I think the fact that a guest has to pass this gateway many off them will leave the site before entering it.
Can?t you install a automatically redirecting?

There are the advantages of this mod if you think about vbfirewall?

what vBFirewall does is to sanitize malicious query sent to the forum. It does not block any Flood attack , or Spamming or DoS. Even though it's named vBfirewall, its function is totally different than Dnp Firewall Gateway. It's also recommended to use both to empower the security level of your forum.

Automatically redirecting is absolutely a No. The reason is if a bad connection approaches the forum, we don't want to transfer it inside. And we cannot differ a good and bad connection. So again, better safe than sorry.

Quote:

Originally Posted by mark370 (Post 1874407)
Maybe a bug ?

we have installed this on our main site and test site, on the test site we have no problems at all :)
but on our main site the gateway page and our login page keeps redirecting to and fro each other and will not let you login.

it does this with or without using www in the url.

any ideas ?

Is there a list of functions that are disabled on the main site?

silveryhat 08-26-2009 03:01 AM

Version 1.2 is ready for download ;)

In this version, the firewall has been improved on stability. The config file is separate.

New option allows domain restriction, which means firewall only accepts requests from this domain (security purpose). The setting can be changed via dnp_fw_config.php

Please kindly follow upgrade instruction on first post if you already install DnP Firewall Gateway

kiwinz 08-26-2009 04:06 AM

Sweet, Im Checking this out !

silveryhat 08-26-2009 04:49 PM

;) Leave a feedback soon!

mark370 08-28-2009 06:06 PM

Quote:

Originally Posted by silveryhat (Post 1874453)
what vBFirewall does is to sanitize malicious query sent to the forum. It does not block any Flood attack , or Spamming or DoS. Even though it's named vBfirewall, its function is totally different than Dnp Firewall Gateway. It's also recommended to use both to empower the security level of your forum.

Automatically redirecting is absolutely a No. The reason is if a bad connection approaches the forum, we don't want to transfer it inside. And we cannot differ a good and bad connection. So again, better safe than sorry.



Is there a list of functions that are disabled on the main site?

Sorry for the late reply but we have managed to sort it out now thanks

SuperTaz 08-28-2009 10:56 PM

I have vbadvanced as the homepage. Do I need to add that to the config also?

silveryhat 08-29-2009 12:13 AM

Quote:

Originally Posted by mark370 (Post 1875951)
Sorry for the late reply but we have managed to sort it out now thanks

Thanks for letting me know. If you would not mind to share the solution, please pm me how you managed to fix it. It will be documented for future references.

Quote:

Originally Posted by Warden-B- (Post 1876079)
I have vbadvanced as the homepage. Do I need to add that to the config also?

The firewall starts up before any of vBulletin scripts begins to run, so you need not to worry about it conflicts with any modifications, or none that I have found so far.

SuperTaz 08-29-2009 02:17 AM

Will this affect normal, non-bot, traffic?

TheLastSuperman 08-29-2009 02:23 AM

Very nice silveryhat and yes I dropped the ball on your install video for the DnP Musicbox but if you still need it PM me, I'll get it done ASAP!

S-MAN

Edit: Ok pm me about the MusicBox... have not DL'd an update yet but this mod here has no install instructions.. I see them above in the post and it should be simple but us coders know how many members are so I'll make a video for this and get it to you tomorrow.

bleros 08-29-2009 03:16 AM

perfect work :)

bleros 08-29-2009 03:23 AM

Here must config? like that?

//Your forum *domain only*
//Define domain with and without www
//Do not add trail at the end
//Example : 'google.com' , 'www.google.com'
$Forum_domain = array(
'http://yourforum.com',
'http://www.yourforum.com',

silveryhat 08-29-2009 03:31 AM

Quote:

Originally Posted by Warden-B- (Post 1876168)
Will this affect normal, non-bot, traffic?

Could you name some of those ? Besides, you can check this topic for detail information What are the Search Engines / Bots allowed by DnP Firewall Gateway ?

Quote:

Originally Posted by TheLastSuperman (Post 1876170)
Very nice silveryhat and yes I dropped the ball on your install video for the DnP Musicbox but if you still need it PM me, I'll get it done ASAP!

S-MAN

Edit: Ok pm me about the MusicBox... have not DL'd an update yet but this mod here has no install instructions.. I see them above in the post and it should be simple but us coders know how many members are so I'll make a video for this and get it to you tomorrow.

:) it would be good too and thank you very much. There is not only install instruction needed but also the other advanced configures, I'm trying to get all of them written down.

Quote:

Originally Posted by bleros (Post 1876185)
Here must config? like that?


//Your forum *domain only*
//Define domain with and without www
//Do not add trail at the end
//Example : 'google.com' , 'www.google.com'
$Forum_domain = array(
'http://yourforum.com',
'http://www.yourforum.com',

Yup. It'd be your forum domain. You can add more than just two if you have more than 1 domain set. This Setup Domain List for DnP Firewall Gateway , may also help you on the way.

bleros 08-29-2009 04:01 AM

yup thanks if work i tested it The site made doss :D

TheLastSuperman 08-29-2009 11:53 AM

Quote:

Originally Posted by silveryhat (Post 1876191)
Could you name some of those ? Besides, you can check this topic for detail information What are the Search Engines / Bots allowed by DnP Firewall Gateway ?



:) it would be good too and thank you very much. There is not only install instruction needed but also the other advanced configures, I'm trying to get all of them written down.



Yup. It'd be your forum domain. You can add more than just two if you have more than 1 domain set. This Setup Domain List for DnP Firewall Gateway , may also help you on the way.

All I have to do is mow the yard (woohoo lol) since it's cool outside and after that the install video. Get that info to me and I'll make another one for the advanced features, if it's anything server dependant please be aware my host might not be setup exactly the same to provide what others could already have in place so that might hinder showing the results etc but we'll see what the advanced options are and do the best we can. Can you host the video or is bandwidth a problem? Let me know... ok BRB (Big Back Yard with a push mower so most likely 2-3 hours).

S-MAN

R-D 08-29-2009 02:04 PM

Shouldn't that $_GET variable be sanitized or at least checked that it is for the same site? Not sure if it can be abused as an open redirect but it's better to be safe than sorry.

Also, $HTTP_SERVER_VARS is deprecated ($HTTP_SERVER_VARS['HTTP_USER_AGENT']). You should use $_SERVER. :up:

silveryhat 08-29-2009 05:08 PM

Quote:

Originally Posted by TheLastSuperman (Post 1876310)
All I have to do is mow the yard (woohoo lol) since it's cool outside and after that the install video. Get that info to me and I'll make another one for the advanced features, if it's anything server dependant please be aware my host might not be setup exactly the same to provide what others could already have in place so that might hinder showing the results etc but we'll see what the advanced options are and do the best we can. Can you host the video or is bandwidth a problem? Let me know... ok BRB (Big Back Yard with a push mower so most likely 2-3 hours).

S-MAN

;) yes i can host the file just fine. Take all the time that you need and don't worry about advanced options. It's better to have a clean, basic setup instruction

Quote:

Originally Posted by R-D (Post 1876359)
Shouldn't that $_GET variable be sanitized or at least checked that it is for the same site? Not sure if it can be abused as an open redirect but it's better to be safe than sorry.

Also, $HTTP_SERVER_VARS is deprecated ($HTTP_SERVER_VARS['HTTP_USER_AGENT']). You should use $_SERVER. :up:

:rolleyes: though $_GET is sent, if you check carefully it is not used anywhere. And the domain check is already available since we have Setup Domain List for DnP Firewall Gateway . I know $HTTP_SERVER_VARS is old...but believe it or not I ran into some incompatibility issue of using $_SERVER. So I have to keep it safe. I might provide information related to the change to $_SERVER, but I would not directly do that on the code just to avoid problems.

In version 1.3 there will be one more layer of protection besides the firewall itself :)

silveryhat 08-29-2009 08:50 PM

Update v1.3 on Aug 29 / 2009
Add 2nd layer protection and 3 more options in config file.
Detail information about DnP Firewall 2nd Layer Protection

digicom 08-30-2009 01:27 AM

Thanks For Update To 1.3, Installed And Working With No Problems :up:

Brandon Sheley 08-30-2009 03:10 AM

interesting mod, I've tagged it

bleros 08-30-2009 04:01 AM

Installed and Nominated :)

Thanks for update

nomoreturn 08-30-2009 04:12 AM

Installed working great

bleros 08-30-2009 04:30 AM

silveryhat any idea without Enter page :S:(

silveryhat 08-30-2009 05:07 AM

Quote:

Originally Posted by nomoreturn@hotm (Post 1876661)
Installed working great

Quote:

Originally Posted by digicom (Post 1876627)
Thanks For Update To 1.3, Installed And Working With No Problems :up:

Please report if any problem occurs :)

Quote:

Originally Posted by bleros (Post 1876669)
silveryhat any idea without Enter page :S:(

Is there any message ? Any error ? or screenshot ..

digicom 08-30-2009 08:35 AM

1 problem im a having is the that message

Multiple Requests have been directly targeted our forum, as the result the current access is temporarily restricted for 10 second(s)

Is being displayed in shoutbox and in Top 5 Stats aswell on forum and I have had to dissable 2nd Layer Flood Protection to stop this happening.

Is there anyway to stop this? Regards

AdrianH 08-30-2009 01:03 PM

1 Attachment(s)
Quote:

Originally Posted by digicom (Post 1876725)
1 problem im a having is the that message

Multiple Requests have been directly targeted our forum, as the result the current access is temporarily restricted for 10 second(s)

Is being displayed in shoutbox and in Top 5 Stats aswell on forum and I have had to dissable 2nd Layer Flood Protection to stop this happening.

Is there anyway to stop this? Regards

This second layer is useless on a forum with a shoutbox or a java tabbed content box.

Every refresh trips the firewall and messages appear all over the forum,after @ 2 minutes the screen disolved into a mess of broken images.........:(

AdrianH 08-30-2009 01:26 PM

Uninstalled as it is interfering with ping backs and monitoring provided by my host.

silveryhat 08-30-2009 02:45 PM

Quote:

Originally Posted by CareyCrew (Post 1876797)
This second layer is useless on a forum with a shoutbox or a java tabbed content box.

Every refresh trips the firewall and messages appear all over the forum,after @ 2 minutes the screen disolved into a mess of broken images.........:(

Quote:

Originally Posted by digicom (Post 1876725)
1 problem im a having is the that message

Multiple Requests have been directly targeted our forum, as the result the current access is temporarily restricted for 10 second(s)

Is being displayed in shoutbox and in Top 5 Stats aswell on forum and I have had to dissable 2nd Layer Flood Protection to stop this happening.

Is there anyway to stop this? Regards

You guys forgot to change the 2ng layer config to have it adapted to your forum :). On some board the default configuration should be fine while on some other board with active AJAX shoutbox a little change might be necessary. Open config file and set

PHP Code:

$config['dnp_firewall_penalty_allow'] = 12

Detail information about DnP Firewall 2nd Layer Protection

digicom 08-30-2009 02:45 PM

I Have Installed Cyb Advanced 'New Posts' (AJAX),Cyb Advanced Forum Statistics, Cyb - ChatBox,And It Seems That Because There Auto Refreshing That Its Causing Firewall To Trigger The Message
Quote:

Multiple Requests have been directly targeted our forum, as the result the current access is temporarily restricted for 10 second(s)

digicom 08-30-2009 02:47 PM

i have already tryed setting this to a few diffrent setting atm it is set at
PHP Code:

//Amount of time in second to show restrict message if a Flooding attack is determined
$config['dnp_firewall_wait_time'] = 10 

PHP Code:

//Amount of penalty to be considered a Flooding attack. 
//Every time multiple requests sent to the forum in less than few a second, penalty count increased by 1.
$config['dnp_firewall_penalty_allow'] = 20

Quote:

Originally Posted by silveryhat (Post 1876830)
You guys forgot to change the 2ng layer config to have it adapted to your forum :). On some board the default configuration should be fine while on some other board with active AJAX shoutbox a little change might be necessary. Open config file and set

PHP Code:

$config['dnp_firewall_penalty_allow'] = 12

Detail information about DnP Firewall 2nd Layer Protection


silveryhat 08-30-2009 03:02 PM

I pull this information from the Detail information about DnP Firewall 2nd Layer Protection for you. Though it is titled as Advanced, it is not very hard to do

Quote:

Advanced
The 2nd Layer protection also sports one hidden setting that is not shown in config file. This setting is for how long it should take before clear out the penalty count.

Open dnp_fw.php and find

PHP Code:

        if((time() - $_SESSION['dnp_firewall_last_request_timestamp']) > 10 ){ 

Change 10 to a different amount of time client does not send any request (in seconds) then 2nd layer should reset the penalty count to 0.

Example : 3 or 4 seconds would be fine.
PHP Code:

        if((time() - $_SESSION['dnp_firewall_last_request_timestamp']) > ){ 


In your case any value from 2-5 would work, also depends on how fast other ajax mods refresh themselves :erm:

digicom 08-30-2009 03:23 PM

Thanks just edited dnp_fw.php amd changed setting,
Ill see if that sorts it Apprciated :up:

silveryhat 08-30-2009 03:27 PM

Anytime. As you see, the 2nd Layer protection is a bit powerful and sensitive.


All times are GMT. The time now is 06:06 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.01630 seconds
  • Memory Usage 1,910KB
  • 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
  • (8)bbcode_php_printable
  • (22)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