• Resolved pcja5asf

    (@pcja5asf)


    Dear forum,

    I have an issue running Ninjafirewall WP edition on a wordpress installatin, nextcloud and apache. (Nextcloud is a cloud application, similar to owncloud).

    Installation of Ninjafirewall was fine, WordPress is running smoothly. WP is installed in /web, the nextcloud instance in /web/nextcloud.
    Access is usually done by http://www.domain.tld/nextcloud.

    Turning the firewall on leads to no login possibility on the nextcloud instance, after typing in the user/password the browser is redirected permanentely.
    https://www.domain.tld/nextcloud/index.php/login?redirect_url=/nextcloud/index.php/apps/files/

    Turning the firewall off leads to no problem, user can login without problems.

    Logfiles:
    WP-Ninjafirewall-Firewall log: no related entry
    Apache web_err.log: [Thu Mar 23 21:28:19 2017] [error] [client x.x.x.x] Directory index forbidden by Options directive: /web/nextcloud/apps/

    Any advice is highly appreciated.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi,

    Can you enable the WP_DEBUG constant and see if there is any error messages when you log in?
    1. Open the wp-config.php and locate this line:
    define('WP_DEBUG', false);

    2. Replace it with:
    define('WP_DEBUG', true);

    Thread Starter pcja5asf

    (@pcja5asf)

    Hello, thanks for the fast reply.
    No error message, see excerpt:

    [24/Mar/2017:20:26:08 +0100] “POST /nextcloud/index.php/login HTTP/1.1” 303 – “-” “Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0” 1509 1286
    [24/Mar/2017:20:26:08 +0100] “GET /nextcloud/index.php/apps/files/ HTTP/1.1” 303 – “-” “Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0” 693 1045
    [24/Mar/2017:20:26:09 +0100] “GET /nextcloud/index.php/login?redirect_url=/nextcloud/index.php/apps/files/ HTTP/1.1” 200 23771 “-” “Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0” 693 24831
    [24/Mar/2017:20:26:09 +0100] “GET /nextcloud/apps/gallery/css/slideshow.css?v=afc7ab9bc4e13e38dbea66e164c982e7 HTTP/1.1” 200 3720 “-” “Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0” 645 4314

    Same with disables Ninjafirewall:
    [24/Mar/2017:20:40:05 +0100] “POST /nextcloud/index.php/login HTTP/1.1” 303 – “-” “Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0” 1861 1190
    [24/Mar/2017:20:40:06 +0100] “GET /nextcloud/apps/notifications/css/styles.css?v=afc7ab9bc4e13e38dbea66e164c982e7 HTTP/1.1” 200 3118 “-” “Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0” 1013 3722
    [24/Mar/2017:20:40:06 +0100] “GET /nextcloud/index.php/apps/files/ HTTP/1.1” 200 60983 “-” “Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0” 1605 62250

    Plugin Author nintechnet

    (@nintechnet)

    Can you try to change these firewalloptions?

    1. “Event Notifications > WordPress admin dashboard > Send me an alert whenever”: set it to “No, thanks (not recommended)”.
    2. “Firewall Policies > HTTP response headers”: set all 7 options from this section to “No”.
    3. “Login Protection > Enable brute force attack protection”: set it to “No (default)”.

    Thread Starter pcja5asf

    (@pcja5asf)

    Did es described, no change. Still beeing redirected to login page of nextcloud.

    Thread Starter pcja5asf

    (@pcja5asf)

    one additional finding, setting the firewall in Debug-Mode shows no entry in the log but login is still not possible.
    Disabling Firewall allows login.

    BR

    Plugin Author nintechnet

    (@nintechnet)

    Do you have any other plugins dealing with the login process or the login page (security plugin, captcha, theme etc)?
    It looks like you have a conflict with another plugin that is not happy when NinjaFirewall is enabled and redirects you to the login page.

    Thread Starter pcja5asf

    (@pcja5asf)

    not obviously:

    contact form 7
    feed them social (at the initial post this plugin was not installed)
    ninja firewall

    thats all.

    Is it possible to exclude a specific directory ? As said, WP is in /web, Nextcloud resides in /web/nextcloud

    BR

    Plugin Author nintechnet

    (@nintechnet)

    You can exclude a directory from the firewall (see: The .htninja configuration file), but because it works before WordPress, I don’t think it is the issue. Your problem seems more related to the plugin part of NinjaFirewall.

    -You can try to disable NinjaFirewall from the “NinjaFirewall > Firewall Options > Firewall protection ” menu, instead of the “Plugins” page. Does it make a difference?
    -You can try to disable the firewall only, not the plugin part: if you run it in “Full WAF mode”, rename the PHP INI file. If you run it in “WordPress WAF mode”, comment out the firewall lines of code that were added to your wp-config.php file. Does it make a difference?

    Thread Starter pcja5asf

    (@pcja5asf)

    just checked the possibility with .htninja –> it worked ! Placed the file in document root, pointing to /nextcloud.

    Does this make any sense to you ?

    Btw., when I disabled Ninjafirewall in the posts above, this was always done by “NinjaFirewall > Firewall Options > Firewall protection ”

    BR

    Plugin Author nintechnet

    (@nintechnet)

    Make sure the firewall is still protecting your site:
    1. Log out of WordPress
    2. Go to http://YOUR-DOMAIN/index.php?test=%00

    If you are blocked by the firewall, then it is fine.

    Thread Starter pcja5asf

    (@pcja5asf)

    Yes, this is still blocked.

    Are you interested in a deeper investigation, e.g. that not the whole directory /nextcloud has to be excluded, maybe only the string which causes the redirection to login page ?

    If yes, I can offer you a temporarily account on this nextcloud instance. Maybe this is interesting for your customers which also use nextcloud / owncloud.

    BR

    Plugin Author nintechnet

    (@nintechnet)

    That’s fine: if you are blocked, that means it works (I don’t have the time to investigate this issue outside this support forum).

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘access issue wp + ninjafirewall + nextcloud + apache’ is closed to new replies.