Forum Firewall

Started by butchs, January 15, 2011, 11:00:37 AM

Previous topic - Next topic

butchs

Posting here and sending me a message at the same time is a waste of effort.  Did you read the first post in this thread?
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

snayeem101

FF-Language installed error problem

An Error Has Occurred!
Package upload failed due to the following error:
"Although the package was downloaded to the server it appears to be empty. Please check the Packages directory, and the "temp" sub-directory are both writable. If you continue to experience this problem you should try extracting the package on your PC and uploading the extracted files into a subdirectory in your Packages directory and try again. For example, if the package was called shout.tar.gz you should:
1) Download the package to your local PC and extract it into files.
2) Using an FTP client create a new directory in your "Packages" folder, in this example you may call it "shout".
3) Upload all the files from the extracted package to this directory.
4) Go back to the package manager browse page and the package will be automatically found by SMF."

butchs

Whatever you do not install an incomplete package.   The files here were checked after uploading and others have used them.  You may want to try re-downloading the files from SMF and try again as per the instructions.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

snayeem101

Quote from: butchs on November 26, 2014, 08:15:10 PM
Whatever you do not install an incomplete package.   The files here were checked after uploading and others have used them.  You may want to try re-downloading the files from SMF and try again as per the instructions.

Site test: ipv6 failed to resolve. ipv4 valid.

FF_language not upload. Main Mod uploading and installed. But protected by forum firewall not showing in footer tags. Please check my forum eduforumbd.com [nofollow] .

snayeem101

Please download the attachment file, there has installation process screenshot

butchs

Quote from: snayeem101 on November 27, 2014, 05:03:19 AM

Site test: ipv6 failed to resolve. ipv4 valid.

FF_language not upload. Main Mod uploading and installed. But protected by forum firewall not showing in footer tags. Please check my forum eduforumbd.com .

The mod works with either or both ipv4 and ipv6.

Did you test and then enable the mod and turn on block violations?  Read the first post in this thread.

It is recommended that you do not enable "Block Violations" until after you operated the mod for several days and you are fully confident that there are no infractions in the visitor logs that can deny you or your top members access.

Quote from: snayeem101 on November 27, 2014, 05:55:22 AM
Please download the attachment file, there has installation process screenshot

Come on guy.  This is more a newbie SMF question not a support question.   Looking at your first image the mod installed perfectly on the default theme.  The default theme is what is designed to install on.  All other themes may require manual installation.  The two (2) errors are from other themes and has no affect on the default installation.  Both core and mobi-desktop (if you use them - usually not) will require manual change to the red files.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

snayeem101

Quote from: butchs on November 27, 2014, 09:27:19 AM
Quote from: snayeem101 on November 27, 2014, 05:03:19 AM

Site test: ipv6 failed to resolve. ipv4 valid.

FF_language not upload. Main Mod uploading and installed. But protected by forum firewall not showing in footer tags. Please check my forum eduforumbd.com [nofollow] .

The mod works with either or both ipv4 and ipv6.

Did you test and then enable the mod and turn on block violations?  Read the first post in this thread.

It is recommended that you do not enable "Block Violations" until after you operated the mod for several days and you are fully confident that there are no infractions in the visitor logs that can deny you or your top members access.

Quote from: snayeem101 on November 27, 2014, 05:55:22 AM
Please download the attachment file, there has installation process screenshot

Come on guy.  This is more a newbie SMF question not a support question.   Looking at your first image the mod installed perfectly on the default theme.  The default theme is what is designed to install on.  All other themes may require manual installation.  The two (2) errors are from other themes and has no affect on the default installation.  Both core and mobi-desktop (if you use them - usually not) will require manual change to the red files.

Many Many thanks. Finally i can successfully installed it. One question- Do i need to change default settings and which options? I just mark the User agent inspection and doss attack . Others setting remain default.


butchs

In order to actually benefit from ddos protection you need to set-up robots.text as per the instructions linked on page 1 of this thread.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

mehrtadbir

#948
Hello to all

Thank you butchs I understand you have a little time so I share a little experience with others .
I've used most of DzinerStudio themes.

If we extract this Mod and replace

<file name="$themedir/index.template.php">

<operation>
<search position="replace"><![CDATA[// Show the "Powered by" and "Valid" logos, as well as the copyright.]]></search>
<add><![CDATA[
if (!function_exists('FFCopyright')) {
global $sourcedir;
require_once($sourcedir . '/Subs-ForumFirewall.php'); }

// Show the "Powered by" and "Valid" logos, as well as the copyright.]]></add>
</operation>

<operation>
<search position="replace"><![CDATA[theme_copyright(),]]></search>
<add><![CDATA[theme_copyright(), FFCopyright(),]]></add>
</operation>
</file>


With this code

<file name="$themedir/index.template.php">

<operation>
<search position="replace"><![CDATA[echo '
</div>
</div></div>';]]></search>
<add><![CDATA[echo '
</div>
</div></div>';

if (!function_exists('FFCopyright')) {
global $sourcedir;
require_once($sourcedir . '/Subs-ForumFirewall.php'); }]]></add>
</operation>


in ForumFirewall.xml file We can install it on default them and most of DzinerStudio themes. I've attached This Mod that contains the changes.

                                                                                                                                                                Good luck
تالار گفتگوی تخصصی متا    دفتر تلفن مشاغل   سامانه پیام کوتاه ویژه اعضای دفتر تلفن مشاغل     شبکه تجارت الکترونیک البرز

Bigguy

Did butchs give permission to you to edit his mod and re-package it. ?? Just thought I would ask.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mehrtadbir

Ohhh   

Quote from: Bigguy on December 05, 2014, 11:19:18 PM
Did butchs give permission to you to edit his mod and re-package it. ?? Just thought I would ask.
I 'm sorry, I did not know that I must do. My goal was just to help.
If true, He will apply the change.

Quote from: Kindred on December 06, 2014, 12:12:53 AM
Attachment removed...
Very Thanks Kindred
تالار گفتگوی تخصصی متا    دفتر تلفن مشاغل   سامانه پیام کوتاه ویژه اعضای دفتر تلفن مشاغل     شبکه تجارت الکترونیک البرز

crazyearner

Hello butchs I have a small problem when trying to save settings for forum firewall to take effect.  I have installed mod and said everything was test success and no errors. I continued to install redirected to settings page and enabled settings I want on. When coming to save settings I get the following error code.

The requested page "/forums/index.php?action=admin;area=forumfirewall;save;sa=settings" could not be found.

Any help or advise on how to fix this problem. Thanks in advance.

butchs

Crazy,
I seen that before.  Check out reply 938.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

awolexpat

Hi butchs,
I've searched this thread and found only one reference to an error I am seeing in my logs which has only started appearing since updating to the latest version of your mod; as far as I can see no answer was given regarding it but my apologies if i missed it. I imagine it might have something to do with either another mod or the settings but any hint you can give me to track down the cause will be very gratefully received.
The errors are:
8: Undefined offset: 1
File: public_html/forum/Themes/default/ForumFirewall_Challenge.template.php
Line: 137

and the same error referencing line 135.

These all seem to be only being triggered by Guests. In one day there have been 190 each of these.

I am also getting the following on the top of the Settings page; SECURITY RISK: ENSURE ALLOW_URL_FOPEN AND ALLOW_URL_INCLUDE ARE BOTH DISABLED TO PROTECT AGAINST RFI!
My .htaccess has these turned off, but as I suspect this can't actually be turned off in .htaccess because of the PHP version my host runs (5.4.35) I have also added a php.ini file turning these off, but the message is still there.

These may be connected issues but any assistance you can offer would be appreciated.

butchs

Interesting, this means the challenge page is getting hit by bots.  After we clear up this error I will be interested in seeing your Challenges log...

Try to replace:
echo ' <div class="ff_border' . ($myCtr/2-1) . '"><ul><li class="ff_content_b">';
                for ($ff_Ctr = 1; $ff_Ctr < $myCtr+1; $ff_Ctr++) {
                        echo ' <div class="ff_content_' . $ff_Ctr . ' ff_content_' . $ff_Ctr . '_hover" onclick="window.location.href=\'' . ((($ff_Ctr == $context['ff_Sho'][0]) || ($ff_Ctr == $context['ff_Sho'][1])) ? '':$context['honeyLink']) . '\'">';
                        if ($ff_Ctr == $context['ff_Sho'][0]) echo ' <input type="image" src="'.$context['ForumFirewall_Enter'].'" name="submit1" id="submit1" value="" />';
                        elseif ($ff_Ctr == $context['ff_Sho'][1]) echo ' <input type="image" src="'.$context['ForumFirewall_Cancel'].'" name="submit" id="submit" value="" />';


with:
echo ' <div class="ff_border' . ($myCtr/2-1) . '"><ul><li class="ff_content_b">';
                for ($ff_Ctr = 1; $ff_Ctr < $myCtr+1; $ff_Ctr++) {
                        echo ' <div class="ff_content_' . $ff_Ctr . ' ff_content_' . $ff_Ctr . '_hover" onclick="window.location.href=\'' . ((($ff_Ctr == $context['ff_Sho']) || ($ff_Ctr == $context['ff_Sho'][1])) ? '':$context['honeyLink']) . '\'">';
                        if ($ff_Ctr == $context['ff_Sho']) echo ' <input type="image" src="'.$context['ForumFirewall_Enter'].'" name="submit1" id="submit1" value="" />';
                        elseif ($ff_Ctr == $context['ff_Sho']) echo ' <input type="image" src="'.$context['ForumFirewall_Cancel'].'" name="submit" id="submit" value="" />';


Let me know if it works?

If htaccess does not work your host should be able to make adjustments to eliminate the "SECURITY RISK".  This has been covered before...
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

awolexpat

Hi butchs,

I have made that change and it has apparently stopped the error on line 137 but at this early stage it seems like the line 135 error is still occurring. I will know more tomorrow when the site has been hit a few more times. As regards the challenges logs, they are empty and have been since I updated. The Visitors logs are too.

While I was doing this I have also been trying to fix the security risk message appearing, and in the process I wanted to look at my phpinfo file, but mistyped the filename and it threw a 404 error (of course); however this opened the Challenge page which I must admit I found quite confusing, as it asked for a reason why I wanted access to this page and had a text box that you had to fill in within 5 minutes - can you give me some more insight into this, or is it not working correctly on my site? What I have discovered though is that allow_url_include is off, while allow_url_fopen is on, despite me turning it off in the php.ini file - however further down the php info file it says on a separate line "disable_functions   show_source, allow_url_fopen" which to me says that it has been turned off, but I am still getting the error message. I know very little about php so I am at the mercy of those who do to try and explain what I need to do now. I haven't yet contacted my host as if I can do this myself i'd prefer it, as I also want to understand what is going on.

butchs

Line 137 was edited too so the 1 error should be gone.  Try refreshing your cache.

To view logs you will need to enable logging.

The Challenge page is quite simple mostly php anti-bot tool.  It is meant to be the converse to Cloud Flares JS (like) page.  It asks you for a reason (any reason) and then click on enter forum.

  • You can always log on or register as a regular member.
  • The time limit is meant to time out a bot.
  • Enter any "nice" reason you want; however, the reason will be highly scrutinized. So if you post spam you will not gain access.
  • If the reason is really long then you get blocked.
  • Prove you are human by clicking on a randomly located enter button.  Clicking the wrong button is a one way trip to the honey pot (if enabled).
  • No second chances until the time limit expires (see the help).

To gain access all one can say "awolexpat is a nice person" and click on enter.
To be denied access try "Buy Viagra" and click enter.

Check out this link to disable allow_url_fopen.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

awolexpat

Have had more errors on line 135 now I have checked again, although less than before - 25 in total in the last 12 hours . Logging was already enabled but I also noticed that both the Enable Testing and Block Violations boxes were ticked, so I have now unticked the latter, and suddenly there are logs in the Visitors but still none in Challenges. It doesn't say anything on the mod page instructions that I can see so is there a problem having both ticked?

The Challenge page I saw did not have an 'Enter forum' button; the page appeared when I was logged in on another tab of my browser but showed me as a guest which I thought was a bit odd but could just be that the session had expired. I entered text in the box, and the explanatory text said "Click within the appropriate text box one time when ready:
(an incorrect choice will deny access)" but nothing happened - you might want to reword that if there is meant to be a button to click; it turns out that the button was there but invisible on both my theme (Blackhead by Crip) and also when I tried the default theme except when you hover over them, and it is impossible to know which one you need to click as there does not appear to be any text in them on my site. Can I assume that this is not deliberate? On checking with Chrome's Inspect Element I see that there are six possible boxes and looking at the CSS (from ff_firewall.css) there are two parts which are said to be invalid by the inspector in .ff_content_0 through to 6, as follows:
border: solid .1em #white;
background: #white;

If you can suggest what I can do to correct this I would be grateful. Is it possible that having both Enable Testing and Block Violations ticked was causing some of this?

As a related issue, when I log out of the forum I am taken to the challenge page as well - is this correct behaviour? I would rather the members were taken to the home page when they log out.

Thank you for the link about allow_url_fopen - the instructions there differ very slightly from what I did, as they had the Off command enclosed in quotes; I changed this in the php.ini file but the error message is still there; I cleared my browser cache as well just in case. I think I will need to contact my host, or possibly relocate the php.ini file which is currently in the home/user directory.

Sorry if I am being a pain and I hope you can suffer this (php)fool...

tranhiep_116


Advertisement: