Forum Replies Created

Viewing 15 replies - 1 through 15 (of 47 total)
  • Forum: Plugins
    In reply to: [CIDRAM] Basic Security
    Plugin Author Maikuolan

    (@maikuolan)

    Hi,

    Any sufficiently strong measures to keep out the majority of nasties is going to have at least some small degree of false positive risk. As to the actual severity of that risk, as well as exactly what would constitute “sufficiently” strong, will somewhat depend on the nature of the website in question and the scope of its normal, intended traffic (e.g., whether that traffic is inherently internationalised versus being more localised, targeting a specific country or region, and therefore how vigilant we’re able to be in regard to blocking anything outside the targeted countries/regions; whether the software being used on that website behaves in ways that might trigger any of CIDRAM’s signatures; commercial versus non-commercial websites, in the sense of how that would play into tolerances; etc). Which kinds of block events actually constitute a false positive in the first place is also somewhat opinionated, given that whether something should or shouldn’t be blocked in the first place is also somewhat opinionated and that a false positive is defined on that basis. Because of that, what would generally be considered the best, most optimally balanced settings is likely to vary somewhat from one website to another.

    That all said, there are some general recommendations that should hold true for just about everyone.
    – Enabling measures for users, in limited circumstances, to be able to regain access to the website when wrongly blocked, e.g., by enabling CIDRAM’s ReCaptcha or HCaptcha features (or even, when possible, both) is going to be a good idea. While not eliminating the risk of false positives, it’ll take the sting out of it in most cases.
    – For the most part, the more modules, signature files and such which are active at an installation, the stronger that installation’s provided protections will be, but also, the higher the risk of false positives. Of those available modules and signature files, using what you need while leaving out what you don’t need, in general, is going to help in regard to finding that sweet spot between best protection and least false positive risk. Knowing exactly what it is that you do and don’t need often comes down to a combination of experience and knowing what each module and signature file provides. The latter part of that, at least, can be learned by reading the descriptions of those available modules and signature files as shown at the updates page.
    – Log as much as you can. If anything goes wrong (i.e., when false positives occur), logs will help in diagnosing exactly what has gone wrong, and help in finding the right solution to the problem. Without logs, in most cases, we’re left in the dark about such problems.
    – If you’re not sure what something does, ask.
    – Checking how “signaturesโžกshorthand” has been configured and adjusting according to your needs (i.e., based on the reason for something being blocked, whether you would agree or disagree that it should be blocked in the first place) is always a good idea.
    – Wherever possible, the signature files and modules I would recommend for most installations are already enabled by default, but there are some which aren’t, because they require API keys which would need to be entered into the configuration in order for those modules to work properly (e.g., the AbuseIPDB module, the Stop Forum Spam module, the Project Honeypot module, etc). Enabling those can definitely help with keeping the nasties out, though there some inherent limitations, too (i.e., regular API lookups could slow a website’s response times down a bit where performed, plus most such APIs tend to impose lookup quotas, so it’s generally best not to use all of them at the same time, and to only perform those lookups where essential, such as at a website’s login and registration pages, contact pages, etc, in order to not affect performance too much and to avoid surpassing any imposed quotas; though, of course, that would mean that any pages where said lookups aren’t being performed could still be accessible by anything which would normally be blocked by said lookups). All of said APIs also have their own inherent false positive risk, too.
    – The more time you have available to monitor and optimise everything over time, generally, the stricter you can afford to be with your settings (because you’ll be more likely to notice if/when something goes wrong and have the time to adjust accordingly). The less time you have available, the less strict you’ll likely want to be with your settings due to the increased risk of not noticing when something goes wrong and/or not having the time to fix it when it does. In a less-strict scenario, you’ll likely be blocking less nasties than would be ideal, but also likely incur less false positives than would otherwise be the case. In a more-strict scenario, you’ll likely do better at blocking the nasties, but may potentially incur a greater number of false positives than would be ideal (but will also hopefully have the time, log data, and anything else necessary to be able to rectify the problem when it occurs).

    If I think of anything else, I’ll write it in a separate, subsequent reply, so that this reply doesn’t reach TL;DR lengths and to avoid the risk that I accidentally repeat any points. Anyhow, for now, I hope that helps. ๐Ÿ™‚

    Plugin Author Maikuolan

    (@maikuolan)

    Are you able to manually modify files at your installation? If so, look for a file named as cidram-configuration.yml in the base of your plugins directory (e.g., /wordpress/wp-content/plugins).

    In that file, look for the line, enable_memcached: true, and change it to enable_memcached: false. That will disable Memcache(/d) for CIDRAM. ๐Ÿ™‚

    For now, that’s the only reliable method I can immediately think of to be able to regain access to CIDRAM when locked out due caching issues. I think, for situations where a user isn’t able to manually modify files at their installation (plus, to make it easier to resolve such problems in the future), I’ll need to consider implementing some kind of mechanism to be able to revert configuration changes when those changes cause such problems. I’m not entirely sure currently what such a mechanism would look like, or how it would behave exactly; I’ll need to plan it out so that it doesn’t cause more problems than it solves (e.g., security considerations), but it should be possible.

    Plugin Author Maikuolan

    (@maikuolan)

    No worries; Happy to help. And done. ๐Ÿ™‚

    From the front-end updates page, look for “Quic cloud compatibility module”, select “Install + Activate“, and press “OK”. After that, it should all be handled automatically.

    Plugin Author Maikuolan

    (@maikuolan)

    Based on what they mention at their docs:

    This is not a set-it-and-forget-it kind of thing. In order to optimize global performance, we add and remove nodes frequently, which means the list of IP addresses also will change frequently.

    ..I wouldn’t recommend adding static rules for any specific ranges or specific IP addresses of theirs anyway, as they’re basically saying those ranges and IP addresses are going to change over time, which means those rules will quickly become outdated, and in need of updating on a regular basis.

    Instead, seeing as they’ve conveniently provided a list to specify which IP addresses they’re using at any given time (the list you’ve linked to there), the best approach, I think, would be for me to write a module to handle it all automatically. I’ve already created a similar module in the past for BunnyCDN, so the framework for creating such a module for Quic cloud is basically already there.

    I’ll make a start on it tonight, and depending on how it goes, have it ready either tonight or some time tomorrow. I’ll reply back again once it’s ready. ๐Ÿ™‚

    Plugin Author Maikuolan

    (@maikuolan)

    Hi,

    The easiest way to prevent a specific IP address being blocked would be to whitelist that IP address via an auxiliary rule.

    From the auxiliary rules page at the CIDRAM front-end:
    1. Click the “Create new rule” toggle to display the controls for creating a new auxiliary rule.
    2. Enter a name for the new auxiliary rule.
    3. From the auxiliary rule action menu, select “If the following conditions are met, whitelist the request.”
    4. At the provided condition line, at the condition source menu, select “IP address”, and at the condition value field, enter the IP address to be whitelisted (the attached image shows as example).
    5. Click the “Create new rule” button (all the other fields/menus/etc provided at the page can be ignored for now, as they won’t be needed for this specific rule).

    Once done, CIDRAM shouldn’t block the IP address anymore. For any IP addresses already recently blocked (e.g., the specific IP address of concern in this case), be sure to also clear said IP address(/es) from the IP tracking page if/when listed there. ๐Ÿ™‚

    Plugin Author Maikuolan

    (@maikuolan)

    The easiest way to whitelist your own IP address would be by creating an “auxiliary rule” via the auxiliary rules page provided by the CIDRAM front-end. ๐Ÿ™‚

    Once you’ve gained access to the front-end and visit that page, you’ll see some clickable text labelled “Create new rule”. When you click on that, some fields will appear where you can enter your IP address and specify the appropriate action to take when CIDRAM encounters it (in this case, to “whitelist the request” when the “conditions are met”, the condition being that the request originates from your IP address). There’s a lot else that can be done from that page too, but for just whitelisting, most of the options and fields provided there won’t be needed.

    Plugin Author Maikuolan

    (@maikuolan)

    If there’s a cache.dat file located in the base of CIDRAM’s vault directory, that’ll be the file containing the tracking information for login attempts (alongside any other temporary caching, statistical information, etc). Deleting that file outright should immediately restore access to the login page.

    If the file doesn’t exist, it could be the case that CIDRAM has detected the availability of a supported caching mechanism (e.g., APCu) and has opted to use that instead of file caching. If that’s the case, to restore access to the login page, you’ll need (in order of most-to-least tedious) to either (1) delete the specific cache entries responsible (if the caching mechanism used provides some kind of interface of its own, most likely using that, or, if not, it might be trickier as you’d likely need to interact with its API using code), (2) restart the cache mechanism (typically achieved by restarting the PHP process, as most such caching mechanisms typically interact with PHP via PHP extensions), or (3) wait 24 hours for it to expire by itself.

    The code responsible for creating the cache entry which triggers the “Maximum number of login attempts exceeded” message, blocking further login attempts, sets the expiry/TTL for that cache entry as 1 day from its creation time, as long as the login endpoint isn’t being continuously hammered after the default maximum number has already been reached (e.g., by bots, which mightn’t realise they’ve been blocked from logging in and might keep trying anyway), or, for when that occurs, sets it as 1 day multiplied by the number of additional attempts.

    Plugin Author Maikuolan

    (@maikuolan)

    Hi ozguy,

    The default username is “admin”, and the default password is “password” (the login credentials for the CIDRAM front-end, just as it is with ZB Block, are specific to CIDRAM, aren’t related to the WordPress login credentials, etc). You can log in with that default username and password, and once logged in, can change the username and password using the “Accounts” page provided by the CIDRAM front-end. ๐Ÿ™‚

    Checking over it all, though it’s been mentioned elsewhere, I notice now that I haven’t mentioned about the default username and password under any of the WordPress-specific documentation for CIDRAM or at the plugin installation instructions. I’ll set a reminder for myself to fix that prior to the next release.

    Good luck, and let me know if there are any issues. ๐Ÿ™‚

    Forum: Plugins
    In reply to: [CIDRAM] 2FA error
    Plugin Author Maikuolan

    (@maikuolan)

    Steps taken sound good so far. :+1:

    Have you also populated some values into the “phpmailer” configuration directives at the configuration page? If anything needed from there is missing (e.g., phpmailerโžกhost, phpmailerโžกusername, etc), that could potentially cause 2fa to not work properly.

    • This reply was modified 2 years, 5 months ago by Maikuolan.
    Forum: Plugins
    In reply to: [CIDRAM] 2FA error
    Plugin Author Maikuolan

    (@maikuolan)

    In your wp-content/plugins directory, check for a cidram-configuration.yml file. Because WordPress replaces a plugin’s entire directory when updating plugins, if a plugin has any modified/customised files, there’s a risk of those modifications/customisations being lost as a result of updating through WordPress; so, in order for CIDRAM to avoid losing its configuration data (in the past, this was a problem), when operating as a WordPress plugin, recent and current versions of CIDRAM create a copy of the CIDRAM configuration file to that location. The strategy seems to work well for its intended purpose, but also means that when uninstalling/reinstalling the plugin entirely, configuration data from the plugin’s previous installation may potentially still be lingering in that directory. For a fresh reinstallation, deleting that specific file should remove any lingering configuration data from the previous installation (doing so shouldn’t break anything; CIDRAM will automatically recreate the file the next time it executes, with fresh/default data).

    • This reply was modified 2 years, 5 months ago by Maikuolan. Reason: Better phrasing
    Forum: Plugins
    In reply to: [CIDRAM] 2FA error
    Plugin Author Maikuolan

    (@maikuolan)

    Hi @kbliang,

    I’ve pushed some changes just now which should solve the problem. If possible, from the front-end updates page, try updating to the latest available version (3.5.0-DEV+233360).

    If not possible (i.e., due to 2FA already being enabled, and no available front-end account without it), if you edit your CIDRAM’s configuration file, look for the line enable_two_factor: true and change it to enable_two_factor: false, that should disable 2FA for your CIDRAM installation (you can reenable it again from the front-end configuration page after you’ve successfully logged in and updated).

    After updating, try reenabling 2FA. If the problem persists, let me know. ๐Ÿ™‚

    Forum: Plugins
    In reply to: [CIDRAM] 2FA error
    Plugin Author Maikuolan

    (@maikuolan)

    Hi @kbliang,

    Thanks for letting me know about this problem. I’ve been able to replicate the problem at my side, and can confirm, there seems to be a bug in the code. Investigating potential solutions now. I’ll reply back again when I progress a little further. ๐Ÿ™‚

    Thread Starter Maikuolan

    (@maikuolan)

    Thank you for the explanation and clarification, @aguinaldodarla. ๐Ÿ™‚

    Thread Starter Maikuolan

    (@maikuolan)

    Plugin Author Maikuolan

    (@maikuolan)

    Hi @webtesher.

    The issue should now be fixed (commit a83e933) ๐Ÿ™‚

    CIDRAM installations can be brought up-to-date early (e.g., when some kind of bugs like this have been fixed, and we want to patch our installations with the fix, but development isn’t quite ready just yet to have a new version/release tagged here at ww.wp.xz.cn right away) by updating via the CIDRAM front-end updates page.

    If the issue persists, please let me know.

Viewing 15 replies - 1 through 15 (of 47 total)