Advertisement:

Author Topic: Anyone here working with CloudFlare/HoneyPot antibot software?  (Read 76110 times)

Offline societyofrobots

  • Jr. Member
  • **
  • Posts: 192
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #80 on: December 01, 2011, 03:02:24 AM »
hey . . . CloudFlare sent me here . . . I tried to install, but I'm getting "./Sources/Subs.php   Test failed"

Can anyone confirm it should work with v2.0.1?

Online Kindred

  • The Mean One
  • Project Manager
  • SMF Master
  • *
  • Posts: 40,922
  • Gender: Male
    • wagner999 on Facebook
    • Kindred-999 on GitHub
    • www.linkedin.com/in/wdwagner/ on LinkedIn
    • @Kindred_999 on Twitter
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #81 on: December 01, 2011, 11:39:14 AM »
There are several different mods that do this...   which one?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support forums.  Thank you.

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,616
  • The Jarred of spam bots, lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #82 on: December 01, 2011, 05:15:22 PM »
The mod is located at reply 3.  It was made for the default theme.
Do not try to force me to fix someone else's code.  No support 4 U!

Online Kindred

  • The Mean One
  • Project Manager
  • SMF Master
  • *
  • Posts: 40,922
  • Gender: Male
    • wagner999 on Facebook
    • Kindred-999 on GitHub
    • www.linkedin.com/in/wdwagner/ on LinkedIn
    • @Kindred_999 on Twitter
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #83 on: December 01, 2011, 05:38:17 PM »
Ah, in which case, this addresses the user's question:

http://wiki.simplemachines.org/smf/Error_in_mod_installation

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

Offline societyofrobots

  • Jr. Member
  • **
  • Posts: 192
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #84 on: December 01, 2011, 11:42:51 PM »
There are several different mods that do this...   which one?
I'm using the one I found on this thread here:
http://www.simplemachines.org/community/index.php?topic=391926.msg2726085#msg2726085

It was last modified on June 18, 2011, meaning it's quite possible the reason I'm getting an error is because it's not compatible with v2.0.1. Of course, it could also be because it's not compatible with a mod I have installed, hence why I'm asking   :P

So . . . can anyone confirm it should work with v2.0.1?

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,616
  • The Jarred of spam bots, lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #85 on: December 03, 2011, 04:07:50 PM »
It works on my version of 2.0.1 and the date matches my records.
Do not try to force me to fix someone else's code.  No support 4 U!

Offline societyofrobots

  • Jr. Member
  • **
  • Posts: 192
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #86 on: December 04, 2011, 03:35:29 AM »
The package manager only gave me an error on Subs.php. It was looking for this but couldn't find it:
Code: [Select]
array(
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),

So I opened up Subs.php and found this instead:
Code: [Select]
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" class="bbc_link" target="_blank">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),

So I just manually added this right after the above code as per the directions in the error:
Code: [Select]
array(
'tag' => 'sse',
'before' => '<!--sse-->',
'after' => '<!--/sse-->',
'block_level' => true,
      ),

I then ignored the error and installed the package. It's now reporting IP's properly.

However, I'm getting tons of errors related to httpBL, ForumFirewall:
8: Undefined variable: ip   File: /home/sr/public_html/my_site/Sources/httpBL_Subs.php
8: Undefined index: HTTP_CF_CONNECTING_IP   File: /home/sr/public_html/my_site/Sources/Subs-ForumFirewall.php Line: 28

It also doesn't fix the IP reporting in AjaxChat.

Anyone know what I can do to resolve this issue?
« Last Edit: December 04, 2011, 07:02:51 AM by societyofrobots »

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,616
  • The Jarred of spam bots, lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #87 on: December 04, 2011, 06:40:56 PM »
Yeow...  If package manager reports an error you should not install the mod!  The is most likely a mod conflict.  You should uninstall other mods until the conflict goes away.  Furthermore, if you manually install part you should manually install all of the mod.

That is true especially for this mod since there are so many changes.  Please uninstall the mod and manually install it or start from scratch!

httpBL though well written a few years ago has issues now.  The main issue I have with the mod is that it is easy for a modern bot to bypass it's protection.  Bad behavior with project honeypot does much better.

If you get a "HTTP_CF_CONNECTING_IP" error in forum firewall then you need to set:
Visitor IP call to Proxy  -> 'HTTP_CF_CONNECTING_IP'
Proxy Header ID -> 'Cf-Connecting-Ip'

I do not use 'AjaxChat" so I can not make a comment there without detailed input.  Compatibility with all other mods in the world is impossible...  If you want to try please post it with the appropriate mod.
Do not try to force me to fix someone else's code.  No support 4 U!

Offline societyofrobots

  • Jr. Member
  • **
  • Posts: 192
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #88 on: December 04, 2011, 10:56:25 PM »
I noticed that with this mod many IP addresses are resolving correctly now. However, a few still point to Cloudflare. It appears much of CloudFlares IPs are now blacklisted by httpBL and BadBehavior, thereby blocking out my visitors. And it hides the true IPs of actual spammers.

It appears I'm going to be forced between these two choices: disable BadBehavior, httpBL, and ForumFirewall . . . or remove CloudFlare. Any opinions? I'm thinking CloudFlare must go . . .

Quote
If you get a "HTTP_CF_CONNECTING_IP" error in forum firewall then you need to set:
Visitor IP call to Proxy  -> 'HTTP_CF_CONNECTING_IP'
Proxy Header ID -> 'Cf-Connecting-Ip'
I checked, and it's already set like that . . .

I have no interest in manually modding files. I tried that before for several years, but every SMF version upgrade was a huge hair pulling experience to keep track of all the changes. I promised myself never again :P
(I guess I could write my own personal mods, but I don't really have time for that either . . .)

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,616
  • The Jarred of spam bots, lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #89 on: December 05, 2011, 05:07:53 AM »
httpBL is not compatible with Cloudflare.

Bad Behavior is if you check Enable Reverse Proxy, set "IP call to Reverse Proxy" -> 'Cf-Connecting-Ip' and leave "Reverse Proxy Addresses" blank.

BadBehavior and ForumFirewall  work with the proper settings.  Do not forget to purge the cache.
Do not try to force me to fix someone else's code.  No support 4 U!

Offline societyofrobots

  • Jr. Member
  • **
  • Posts: 192
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #90 on: December 09, 2011, 04:31:17 AM »
Bad Behavior is if you check Enable Reverse Proxy, set "IP call to Reverse Proxy" -> 'Cf-Connecting-Ip' and leave "Reverse Proxy Addresses" blank...Do not forget to purge the cache.
I made the changes, and it seems BB is now working properly. How does one purge the cache for BB?

But I'm still getting the "HTTP_CF_CONNECTING_IP" error in forum firewall . . .

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,616
  • The Jarred of spam bots, lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #91 on: December 09, 2011, 04:49:50 AM »
BB cache resets automatically every day but can be manually reset in Scheduled Tasks.

You must have an typo somewhere.  Please post the error from the log and your settings in the "forum firewall" support board.
Do not try to force me to fix someone else's code.  No support 4 U!


Offline gamerzworld

  • Semi-Newbie
  • *
  • Posts: 21
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #93 on: February 08, 2012, 08:46:04 PM »
Hey butchs, do you think you could update your modification to support IPv6 as well since it's now one of the features of CloudFlare? Your CF mod and the IPv6 mod have a number of conflicts.

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,616
  • The Jarred of spam bots, lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #94 on: February 12, 2012, 02:44:58 PM »
Sorry, I learned my lesson with the smartphone mod, do not program something you can not personally test.
 :'(
Do not try to force me to fix someone else's code.  No support 4 U!

Offline gamerzworld

  • Semi-Newbie
  • *
  • Posts: 21
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #95 on: February 12, 2012, 06:09:27 PM »
Sorry, I learned my lesson with the smartphone mod, do not program something you can not personally test.
 :'(
I'm guessing the reason you can't test is the lack of an IPv6 connection? You can setup a IPv6 tunnel with http://www.tunnelbroker.net/ [nofollow] . I can help you get it working if you want.

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,616
  • The Jarred of spam bots, lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #96 on: February 14, 2012, 04:54:31 AM »
This is not an official mod and I only made it to have CF compatibility with my site.  I do not like the massive amounts of code edits.  I believe that the IPV6 mod does it in a much simpler way.  With that said, I am busy and I do not intend to work on this mod.  But, I give you or anyone else permission to do whatever you want with it, take it over, change it for ipv6 compatibility.  Enjoy.
 :)
Do not try to force me to fix someone else's code.  No support 4 U!

Offline prince_bear

  • Semi-Newbie
  • *
  • Posts: 27
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #97 on: February 25, 2012, 06:49:02 PM »
Anybody planning to take up where the venerable Butchs is leaving? I have a forum of 150 people, averaging 8-9GB of Bandwith per month, 1.5 Million page views per year and regularly limiting on CPU and Memory. Sufficed to say I am looking for options.  :)

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #98 on: March 06, 2012, 06:12:05 AM »
I feel that this topic doesn't really require team attention anymore, so I'm marking this solved.
@Don Peters - If you disagree with me, feel free to mark the topic not solved again.
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline netham45

  • Newbie
  • *
  • Posts: 1
Re: Anyone here working with CloudFlare/HoneyPot antibot software?
« Reply #99 on: May 01, 2012, 09:59:37 AM »
A bit of a necropost, but I came up with a different fix for the IPs not being reported properly in SMF 1.1.x:

Quote
1) Open index.php

2) Right below the <?php line (Should be the top line in the file), insert this:

Code: [Select]
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
     $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];

3) Open SSI.php

4) Right below the <?php line (Should be the top line in the file), insert this:
Code: [Select]
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
     $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];

It's not the cleanest (overwriting $_SERVER vars...) , but it doesn't break IPs for connections that are outside of cloudflare (we have an SSL connection that's not going through cloudflare), and it's far less intrusive into the code.