Advertisement:

Author Topic: Installing ZB BLOCK with Osclass  (Read 10208 times)

Aficionado

  • Guest
Installing ZB BLOCK with Osclass
« on: June 25, 2014, 01:46:35 am »
Hi guys.

The last two weeks my two shared (one shared and one semi-dedi) are suffering from BOTS. My CPU is most of the time at 80-100% and my Entry processes are maxed out (as Cpanel tells me). Thanks god it is Cloud Linux.

So i installed ZB BLOCK script and i have a question.

http://www.spambotsecurity.com/zbblock.php

 The manual says for

<?php require('/home/public_html/zbblock/zbblock.php'); ?>

Quote
9. Now you must add that line at the beginning of the files you wish to protect. With
phpBB, only one file, common.php, need have the protection put in it. But here's how
you do it for ANY php file.
For the sake of instruction, a non functional include element will be used.
If your file starts off with “
<?php
” on the very first line, then the proper way, to use ZB
Block is to add the include segment like this...
<?php require('/home/public_html/zbblock/zbblock.php'); ?>

But not sure where to put that line. in OC-Load.php ? In theme head.php ?

ANY ANY help is much appreciated.

thanks
« Last Edit: June 26, 2014, 06:11:34 am by Aficionado »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Installing ZB BLOCK with Osclass
« Reply #1 on: June 25, 2014, 01:52:16 am »
Hi,

Anywhere you want really, in your theme functions.php would be fine if the attacks go against the frontend. To protect the whole site I think config.php would be a good place too.

Regards
« Last Edit: June 25, 2014, 01:54:20 am by teseo »

Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #2 on: June 25, 2014, 01:59:00 am »
Hi,

Anywhere you want really, in your theme functions.php would be fine if the attacks go against the frontend. To protect the whole site I think config.php would be a good place too.

Regards

I don't think so. I added to Theme's head.php and while it seemed to work, after 1 minute all i got was error 503-busy.

I tried oc-load.php in the root of osclass.

In functions of theme where exactly ?


Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #3 on: June 25, 2014, 02:15:27 am »
Hi,

Anywhere you want really, in your theme functions.php would be fine if the attacks go against the frontend. To protect the whole site I think config.php would be a good place too.

Regards

I don't think so. I added to Theme's head.php and while it seemed to work, after 1 minute all i got was error 503-busy.

I tried oc-load.php in the root of osclass.

In functions of theme where exactly ?

Actually the 503 is/was .... because ZB Block has blocked me out due to testing more than 3 times.

But if anyone IS actually using ZB Block with Osclass, step in.

 :D

Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #4 on: June 25, 2014, 02:56:03 pm »
Maybe Daniel or some other developper could suggest where to put that "require" line for ZB Block.

Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #5 on: June 25, 2014, 07:24:52 pm »
Following the Wordpress installation (for ZB BLOCK) logic, maybe the line should at the very top of

oc-include/osclass/gui/header.php

I'm gonna try it.

Warning: ZB BLOCK says to watch carefully not to add any line feeds or spaces. They say it is very important.


Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #6 on: June 25, 2014, 07:35:11 pm »
Following the Wordpress installation (for ZB BLOCK) logic, maybe the line should at the very top of

oc-include/osclass/gui/header.php

I'm gonna try it.

Warning: ZB BLOCK says to watch carefully not to add any line feeds or spaces. They say it is very important.


oc-include/osclass/gui/header.php

DOESN' T WORK AT in that place.

Back to Theme head.php


Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #7 on: June 25, 2014, 09:47:31 pm »
More on this.

Puting the ZB BLOCK code line in Theme's "head.php" seems to work fine and testing the block i see a 503 error (normal). But the code in the page is:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    <head>
        Error 503 : Service Temporarily Unavailable

Meaning that some code IS executed BEFORE ZB BLOCK. We must put that BEFORE the "!DOCTYPE...."

Doing the Same Test in WordPress in see NO code but the 503 error.

So i guess some Dev should help us here a little bit on how to call ZB BLOCK .

Thanks


Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #8 on: June 25, 2014, 11:43:44 pm »
Update:

Following the Wordpress guide (and Osclass has a very similar structure of files/folders), i REMOVED the ZB BLOCK line of php code from Theme's "head.php".

I added that line to "oc-load.php" and "config.php". Be carefull to add the line to the very top, and not to add any space or line feed.

Until now i see no problems and ZB BLOCK works very well.

I will keep you updated. Keep in mind that ZB BLOCK keeps out also SPAMMERS by IPs.

(still not sure if the change of config.php is needed, and _maybe_ ZB BLOCK is called twice ?)
« Last Edit: June 26, 2014, 06:12:04 am by Aficionado »

Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #9 on: June 26, 2014, 12:07:01 am »
Some very FUNNY findings:

Some nasty bots try to hack Wordpress. They think my Osclass(es) websites are actually Wordpress and:

They try to hack

Reconstructed URL: http:// www.mywebsite.com /user/login/wp-login.php !!!!!!!!!!!!!!!!!!!!!!!!!!

I get about 100 attempts per hour/per website and all are BLOCKED. Before any db call is exectuted (i guess).

Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #10 on: June 26, 2014, 02:33:32 am »
If you install ZB BLOCK be carefull about how you add the required php line.

NO SPACE AND NO LINE FEED !!!

See the image i attach.

Good luck !

« Last Edit: June 26, 2014, 02:36:17 am by Aficionado »

Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #11 on: June 26, 2014, 05:39:08 pm »
Update: everything works great with ZB BLOCK.

When i'm back from holidays i will post a guide about it in Tips and Tricks forum.



design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: Installing ZB BLOCK with Osclass
« Reply #12 on: June 26, 2014, 06:18:34 pm »
^^ thank you for this!! have a great holiday! you deserve it :-)   8)

Aficionado

  • Guest
Re: Installing ZB BLOCK with Osclass
« Reply #13 on: June 26, 2014, 06:26:28 pm »
^^ thank you for this!! have a great holiday! you deserve it :-)   8)

Did i mentioned that ONE installation of ZB BLOCK works and maintains ALL your websites in the plan ?


design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: Installing ZB BLOCK with Osclass
« Reply #14 on: June 26, 2014, 07:26:54 pm »
and your going to make us wait.... :P