After Bot Guard is re-activated and I logged off this screen was displayed
502 Bad Gateway is shown and under the line is nginx written!
If I've reloaded the page with the browser, I back in my forum. And the cycle goes in the next round.
If I do a clean call https://..... of my forum I get this screen, too. So I think Forum isn't reachable...
For those running ModSecurity, please see the note below (which is being added to the documentation upon the next release).
ModSecurity / Comodo CWAF blocks Bot Guard cookies
XF Bot Guard is generally compatible with ModSecurity-based WAFs, including Comodo/CWAF-style rulesets. Some generic WAF rules can false-positive when they inspect Bot Guard-owned cookie values, especially signed or opaque browser state. The most common known trigger is the Link Chronology fallback cookie zee_bg_lc, which is used when XenForo application cache is unavailable or cannot persist the short-lived chronology state. Because browser cookies are sent with normal forum and admin requests, symptoms can appear on public pages as well as Admin Control Panel pages.
Symptoms can include intermittent frontend errors, logout or clean guest-visit failures, 403, 406, 500 or 502 Bad Gateway responses, errors that stop after clearing site cookies, errors that stop when Link Chronology is disabled, or ModSecurity audit entries mentioning CWAF, OtherApps, REQUEST_COOKIES, REQUEST_HEADERS:Cookie or a zee_bg_* cookie name.
Do not disable ModSecurity globally, do not allow the whole request just because a Bot Guard cookie exists, and do not disable the WAF for the whole forum unless there is no other option. The safer approach is to exclude only Bot Guard-owned cookie values from the relevant WAF inspection target list while continuing to inspect the request URI, query string, POST fields, request body, headers, uploaded files and non-Bot Guard cookies.
For Comodo/CWAF-tagged rulesets, a server administrator can usually add a configure-time target exclusion such as:
# Bot Guard cookie compatibility exclusion for Comodo/CWAF.
# Excludes only Bot Guard-owned cookie values from CWAF inspection.
SecRuleUpdateTargetByTag "CWAF" "!REQUEST_COOKIES:/^zee_bg_(vid|sid|js|vmk|recollect|return|lc|lc_rfo)$/"
If audit logs confirm the relevant rule is tagged OtherApps rather than, or in addition to, CWAF, add the same exclusion for that tag only as needed:
SecRuleUpdateTargetByTag "OtherApps" "!REQUEST_COOKIES:/^zee_bg_(vid|sid|js|vmk|recollect|return|lc|lc_rfo)$/"
For stricter environments, server administrators may instead apply the same target exclusion only to the exact rule IDs shown in the ModSecurity audit log:
# Stricter alternative when the exact offending rule ID is known.
SecRuleUpdateTargetById 123456 "!REQUEST_COOKIES:/^zee_bg_(vid|sid|js|vmk|recollect|return|lc|lc_rfo)$/"
Most false positives should be resolved by excluding REQUEST_COOKIES. If the audit entry confirms the match is against the full Cookie header, such as REQUEST_HEADERS:Cookie, the host may need a broader target exclusion for the relevant tag or rule:
# Last resort only. Prefer REQUEST_COOKIES exclusions where possible.
SecRuleUpdateTargetByTag "CWAF" "!REQUEST_HEADERS:Cookie"
Add configure-time exclusions after the vendor/CWAF rules have been loaded. Place them in server-level or custom ModSecurity configuration, or in the hosting control panel, not in XenForo and usually not in .htaccess. Do not edit vendor rule files directly because vendor updates may overwrite those changes. After changing WAF configuration, reload the web server or WAF service as required, then clear the browser's site cookies for the forum because an old zee_bg_lc cookie may continue to be sent.
If the host cannot add a ModSecurity/CWAF cookie target exclusion, run Bot Guard with Link Chronology disabled: temporarily disable Bot Guard if needed for access, save, disable Link Chronology, save, re-enable Bot Guard, save and clear site cookies. The acceptable final state is Bot Guard enabled with Link Chronology disabled. Bot Guard can continue operating without Link Chronology; it is an additional behavioural signal and should be disabled on servers where ModSecurity/CWAF cannot be tuned to ignore Bot Guard-owned state cookies.