Firewall
IP Blocks Are Server-wide
Every block — from the Firewall page or from the account-level endpoints — is one rule on the server firewall (UFW on Debian, firewalld on RHEL) and affects every site on the server. There is no per-account scoping; the account-level endpoints say so in their warnings and record scope: server in the audit log. Tenants cannot add, remove or list these blocks. An address that only one account's sites should refuse goes on that account's own list instead — the account page's IP Blocks tab, the client panel's Firewall page, or /accounts/{username}/firewall/ip-blocks: it is written into the account's vhosts (nginx deny; Apache Require not ip when Apache faces visitors itself), answers 403 there, and never reaches the server firewall. The audit log records it as firewall_ip_blocked / firewall_ip_unblocked with scope: account. OpenLiteSpeed / LiteSpeed hosts refuse the list (409 FEATURE_DISABLED).
The API refuses a deny that covers the address the request came from (SELF_LOCKOUT), so an operator cannot close the panel on themselves from the panel.
A block is written twice: as a source deny in the packet filter and as an entry on the HTTP-layer list fail2ban uses (/etc/whost/http-banlist, rendered into every installed webserver), so it also holds for traffic that arrives through a CDN. The list records each entry under what placed it — the block, an auto-ban, a fail2ban jail — and keeps an address until the last of them lets it go, so lifting one never lifts another's ban of the same address. On UFW the comment given with the block is kept and shown in the list; firewalld (the RHEL family) does not store it, so there the list shows no comment. Blocking a whitelisted address is refused with 409 IP_WHITELISTED — the allow rule would sit above the deny — so remove the address from the whitelist first. A block or a whitelist entry names one address or a network no wider than /16 (IPv4) or /48 (IPv6) — the floor the fail2ban entries have — and a wider network is refused with 422 VALIDATION_ERROR, from the panel and the API alike; such a rule is placed on the host by hand (ufw / firewall-cmd). Lifting a block removes only the deny and the firewall's own HTTP-layer entries (the block and an auto-ban's timed entry), never the address's whitelist rule; a fail2ban jail's ban of the same address stays until that jail lifts it (Fail2Ban page) or the address is whitelisted. Lifting a block of an address that is neither a source deny nor on the HTTP-layer list answers 404 NOT_FOUND, and the account-level endpoints answer 404 ACCOUNT_NOT_FOUND for an account that does not exist.
Clear All Bans lifts every block the panel can produce — plain and port-scoped source denies, the HTTP-layer list, the rate-limit ban sets and fail2ban's bans — and answers the per-layer counts (ufw_rules, http_bans, rate_limit_bans, fail2ban_jails, removed). It leaves the security log alone; Clear Log on the Security Logs tab (DELETE /firewall/logs, audit firewall_logs_cleared) empties the event tables.
System Rules
UFW (Debian) or firewalld (RHEL) abstraction. Lists every rule, allowed/denied/limit/reject, and protected ports (PROTECTED_PORTS, plus the SSH port set under Settings) the API refuses to close or deny globally (so an operator cannot lock themselves out of SSH, HTTP/HTTPS or the agent itself) — a port range that contains a protected port is refused as well, and the rule form asks for the same confirmation for such a range as for the exact port. The list carries source-scoped rules too, with their source, their comment (UFW only — firewalld keeps none) and an id of the form port-protocol--source. Editing replaces the rule and puts the old one back when the new one is refused; editing or deleting a rule the firewall does not carry answers 404 NOT_FOUND (ufw's "non-existent rule" answer is read, not its exit status).
Whitelist: an allowlisted address is let through on every port and is exempt from auto-bans; adding it also takes it off the HTTP-layer ban list, whatever put it there (a block, an auto-ban, a fail2ban jail). The list shows applied per entry — whether the firewall really carries the rule — and the agent re-installs missing rules at startup, so a firewall reset no longer leaves entries that exist only on paper. An entry is saved only after the firewall accepted the rule. An entry whose rule is missing is marked Rule missing in the list; adding the address again re-installs the rule (and updates the comment when one is given).
Rate-limit rules: the threshold counts the new connections one address opens within the window — a packet filter cannot see HTTP requests, so the requests a kept-alive connection carries count once. An address over the threshold is banned for the ban duration and loses every port on the server until the ban ends. The rules sit in their own chain (WHOST-RATELIMIT), jumped to from the top of INPUT ahead of ufw / firewalld, so they see the traffic the host firewall lets through; the server's own traffic (loopback) and addresses on the firewall whitelist are never counted or banned. The chain exists only while at least one rule is enabled. Rules apply to IPv4. A rule with several ports (80,443) is applied with one multiport match; up to 15 ports or ranges per rule, and a port filter needs tcp or udp. The rule is recorded only once the kernel carries its objects: a refused rule answers 500 RATE_LIMIT_APPLY_FAILED with the kernel's reason and leaves nothing behind, and an update the kernel refuses puts the previous rule back. The rule store is root-only; the ban set of a rule is WHOST_RL_<RULE ID> — the rule id in upper case. The untargeted unban answers how many ban sets carried the address; an address that is not an IP is refused with 422 and an unknown rule answers 404.
Fail2Ban
Jail list (every jail fail2ban loads plus the ones the panel has disabled), ban list, manual ban/unban, jail-level enable/disable, the jail's ban time / find time / max retry, and the whitelist (ignoreip).
Jails. The list reads every loaded jail from the daemon and the disabled ones from the configuration files (jail.local, jail.d/*) with the filter, log path and tunables they would load with. Switching a jail off asks for confirmation — its current bans are released — and writes the panel's override (jail.d/<jail>.local: enabled, plus the ban time / find time / max retry set through Edit); a later edit keeps the values it does not name, and switching the jail off and on keeps them too. Ban time 60–604800 s, find time 60–86400 s, max retry 1–100. The jail list asks fail2ban-client per jail, so the read takes a few seconds on a host with many jails.
Bans. A ban in an allports jail (sshd, postfix, dovecot, pure-ftpd, recidive) is a packet-filter reject; a ban in an HTTP-facing jail (whost-webscan, whost-webprobe, whost-waf, nginx-http-auth, whost-agent) goes through the HTTP-layer list described below, and a network (CIDR) is accepted there too. A network wider than /16 (IPv4) or /48 (IPv6) is refused with 422 VALIDATION_ERROR, from the panel and the API alike; such a ban is placed with fail2ban-client on the host. Banning an address the whitelist ignores is refused with 409 IP_WHITELISTED; unbanning an address that is not banned answers 404 NOT_FOUND. Unban All releases every ban in every jail. The address the request comes from — or a network that covers it — cannot be banned (422 SELF_LOCKOUT): the ban would close the panel on the operator who asked for it.
The agent jail. whost-agent counts failed admin and client sign-ins and refused API signatures from the agent log. The sign-in name is written there as one escaped field, so it cannot add lines of its own and the count goes to the address the attempt came from.
Whitelist. One list for every jail: an added address is ignored by every loaded jail at once, persisted in jail.local's ignoreip, and any jail ban it currently carries is released (a firewall block of the address is a separate decision and stays; the firewall whitelist lifts that too). A network wider than /16 (IPv4) or /48 (IPv6) is refused (422 VALIDATION_ERROR); an existing wider entry can still be removed. Removing an address that is not on the list answers 404 NOT_FOUND. Entries written by hand into jail.d/*.conf are neither shown nor edited by the panel. The two web jails keep the verdict of their crawler check (below) per address for an hour, and fail2ban reads that memory before the whitelist: a change made here starts it afresh in every jail that has one, while an entry made outside the panel (by hand in jail.local, or with fail2ban-client set <jail> addignoreip) can take up to that hour to reach those two jails.
The server's own addresses. The agent keeps every global IPv4 and IPv6 address of the server's interfaces on the whitelist — at each start and whenever an address is added on the IP Management page — and releases a ban one of them carries, so a burst of failed requests the server makes to itself (a local script with an outdated key, a site calling its own domain) never shuts the server off from its own traffic. These rows carry a This server badge and no remove button; removing one through the API answers 422 VALIDATION_ERROR (it would come back at the next start). An address removed on the IP Management page leaves the whitelist with it when the agent put it there; an entry you added yourself stays. The loopback entries (127.0.0.1/8, ::1) are the server too: they carry the same badge and no remove button (the agent never removes them).
Under-attack mode tightens sshd (bantime 86400, maxretry 3, findtime 300) through a jail.d/whost-attack-mode.local override that survives the reloads the panel's jail writes cause; the file goes away when the mode is disabled.
The agent's own jail (whost-agent) reads /var/log/whost/agent.log with the filter the agent renders from its template at every start (failed admin and client logins, invalid API signatures); a filter written by an older installer is replaced.
Endpoints used: GET /fail2ban/status, GET /fail2ban/jails + GET/PUT /fail2ban/jails/{jail} + POST /fail2ban/jails/{jail}/{enable,disable}, GET /fail2ban/banned, POST /fail2ban/ban, DELETE /fail2ban/ban/{jail}/{ip}, POST /fail2ban/unban-all, GET/POST /fail2ban/whitelist, GET /fail2ban/whitelist/server-addresses, DELETE /fail2ban/whitelist/{ip}.
Web-scan jails (whost-webscan, whost-webprobe). Two jails read every hosting account's own per-domain access logs (/var/log/whost-accounts/<user>/<domain>-access.log; a domain that runs a Python or Node.js app included — nginx writes the app's visits there), so the number of jails does not grow with the number of accounts. whost-webscan (filter whost-web-scan) counts a burst of 4xx responses: 60 within 300 s, banned for 3600 s. whost-webprobe (filter whost-web-probe) counts requests for files no site serves, answered 403 or 404: .env and .env.*, the folders .git/, .svn/, .hg/, .aws/, .ssh/, .kube/, .docker/, the files .npmrc, .htpasswd, .bash_history, database dumps (*.sql, *.sql.gz), phpunit's eval-stdin.php and /_ignition/. The name has to start a path segment (/files/whost.git/ does not count) and only the path before the query string is read; a site that does serve such a path answers 200, which is not counted. Two such requests within 600 s ban the address for 4 hours, and an address banned again while fail2ban still remembers its last ban (a day plus three times that ban) is banned twice as long each time, up to 7 days (bantime.increment); unbanning an address by hand (the panel's unban included) also clears that history in the jail, so its next ban is 4 hours again. WordPress paths, cgi-bin, phpmyadmin, admin and the like are left to whost-webscan: sites use them. The agent writes both jails to jail.d/whost-webscan.conf — one line per account and an empty /var/log/whost/webscan-anchor.log each jail always has to read — and the panel's Edit and switch write jail.d/<jail>.local as for any other jail; the settings apply to every account at once, and the jail list shows the pattern /var/log/whost-accounts/*/*.*-access.log instead of every file. Search engine crawlers. A line whose user agent names Google's, Bing's, Apple's or Yandex's crawler (Googlebot, bingbot, Applebot, YandexBot and their variants) is checked before either jail counts it: /usr/local/sbin/whost-bot-verify looks up the address's reverse name and passes it when the name lies in that crawler's own domains (googlebot.com / google.com, search.msn.com, applebot.apple.com, yandex.ru / yandex.net / yandex.com) and resolves back to the address — the check the search engines document. A verified crawler's line is not counted; an address that only claims the name (a cloud machine under googleusercontent.com, for instance), has no reverse name, or whose lookup fails or takes longer than 1.5 s is counted as before. The lookup runs only for lines that claim a crawler, and the verdict is kept per address for an hour; a ban a jail restores from fail2ban's database when it starts claims none, so it is not looked up and leaves no line in /var/log/fail2ban.log beyond its Restore Ban. Creating an account adds its logs to both running jails and deleting it takes them out, without reloading fail2ban; a log that appears later (a new addon domain, subdomain or parked domain, the HTTPS log of an Apache site) joins the jail within five minutes, and an agent start brings the jail in line with the account records. Logs are read from their end, so a fail2ban restart does not re-read whole files. When fail2ban does not answer or refuses an account's logs at creation, the account is still created: the answer's post_create_issues and the account page name the step fail2ban, the create screen shows a warning, and the note goes away by itself once the account's logs are under the jail. An installation that still has a jail per account (whost-<user>-webscan, files jail.d/whost-account-<user>.local) is moved over at the next agent start, in the background once the agent is up (the panel does not wait for it): whost-webscan is loaded on its own, each per-account jail is stopped on its own and the addresses it had banned are banned again in whost-webscan, then those files are removed. No other jail (SSH, mail, recidive, jails you added) is stopped or restarted, so their bans stay in place; the old jails stay until whost-webscan runs, and a move left half way (fail2ban busy, the agent stopped meanwhile) is finished by the five-minute sync. Per-account settings made on the old jails are not carried over. When an update rewrites the ban action or filter files, only the jails that use them are restarted or reloaded, one at a time; a restarted jail's addresses stay on the HTTP-layer list until the jail has banned them again (what it does not ban again leaves within five minutes). A hit is banned at the HTTP layer rather than in the packet filter: the whost-http-deny action puts the address on the HTTP-layer list (/etc/whost/http-banlist) under the jail's name, and the list is rendered into every installed webserver (nginx, Apache, OpenLiteSpeed, LiteSpeed Enterprise), so the ban holds whichever server owns the public port. An address that another jail or the firewall also holds stays denied when one of them lets it go; whost-http-ban owners shows what holds each address. Behind Cloudflare the banned address is the visitor's own: the installer has nginx restore it from Cloudflare's header (/etc/nginx/conf.d/whost-cloudflare-realip.conf). Behind another CDN, or where Apache, OpenLiteSpeed or LiteSpeed Enterprise serves the public port, the webserver sees the edge address — add that CDN's ranges to ignoreip. The action itself only queues the request (/var/lib/fail2ban/whost-http-ban/queue, the one place a confined fail2ban may write on SELinux hosts); the whost-http-ban.path systemd unit applies the queue as root within a second, so a ban shows up in the webserver after a short delay rather than inside the fail2ban call. whost-http-ban list prints the applied list; whost-http-ban sync re-applies it after a manual webserver config change; journalctl -u whost-http-ban-apply shows a webserver that rejected the list.
WAF-hit jail (whost-waf). The agent's own WAF rules that no legitimate request matches — a PHP_SESSION_UPLOAD_PROGRESS field in a multipart POST (9900100), PHP code (9900102) or a serialized object (9900103) in an upload file name — ban the client on the first match, whether the engine refused the request or only detected it. The CRS rules play no part, so payment and webhook requests that CRS might flag are not affected. The agent follows the ModSecurity audit log every 15 seconds and writes one line per such request to /var/log/whost/waf-hits.log (root only; started afresh past 1 MiB, since nothing rotates it); the jail (jail.d/whost-waf.conf, written at every agent start after the log, panel override jail.d/whost-waf.local) bans the address at the HTTP layer for 4 hours, and longer for an address banned again, as in whost-webprobe. 9900100 bans nobody on a site that switches session upload progress on in its own .user.ini — the document root's or one in a folder on the request's path, the files PHP reads for that request — nor on a site whose .user.ini is not a plain file the agent can read (a link, for instance); the alert is still sent. The session field rule (9900101) and the chunked-upload rule (9900106) only alert: a site served without a CDN in front can receive real chunked uploads. The whitelist applies as in every jail. The jail sees matches only while the WAF writes its audit log (modsecurity.audit_log, on by default).
inotify limits. fail2ban takes an inotify instance per jail and a watch per log file and folder, from the same per-user budget as root's other services. The installer, and the agent's start-up hardening on an existing installation, raise fs.inotify.max_user_instances to 1024 and fs.inotify.max_user_watches to 65536 through /etc/sysctl.d/60-whost-inotify.conf when they are lower; a higher value is left as it is, and a key that another sysctl file sets (/etc/sysctl.conf, /etc/sysctl.d/*.conf) is left to that file.
WAF (ModSecurity)
The ModSecurity WAF page (Settings → ModSecurity WAF) shows the engine (installed, active, mode, OWASP CRS, paranoia level, audit log, rule counts), the configuration form, the CRS rule list, your custom rules and the audit log.
Configuration. Engine mode on (block), detection_only (log, never block) or off; paranoia level 1–4; audit logging on/off. The rendered files are tested with the web server's own configuration test before the values are persisted; a change reloads the web server, a save that changes nothing does not. Test Configuration runs nginx -t (and apachectl configtest on nginx + Apache hosts); on OpenLiteSpeed it runs openlitespeed -t, where an [ERROR] line fails the test, and nginx -t as well when nginx loads the rule set too. Where no such test applies — LiteSpeed Enterprise while its connector is off, OpenLiteSpeed before its ModSecurity module is installed — it answers 409 WAF_TEST_UNAVAILABLE. WHost enforces ModSecurity on nginx (also when nginx serves in front of Apache) and on OpenLiteSpeed; on Apache-only hosts, and on LiteSpeed Enterprise while its connector is off (modsecurity.litespeed_enterprise, see Configuration), the page says so and the settings are saved but not applied to traffic.
Paranoia level. The level decides which OWASP CRS rules run and count towards a refusal: level 1 runs the level-1 rules, each higher level adds its own. It is written to /etc/modsecurity/crs/crs-setup.conf as tx.paranoia_level (rule 900000), the name the installed CRS 3.3 reads, and the web server loads the CRS rule files cut at that level (/etc/modsecurity/crs/rules-active, written by the agent): with the pinned CRS 3.3.7 and the CRS setup WHost writes, nginx -t reports 719 rules at level 1, 817 at level 2, 883 at level 3 and 936 at level 4 (an account's rule exclusions add their own). Higher levels refuse more ordinary requests — measured with the engine on: level 2 refused text containing C# or an HTML tag such as <b>, level 3 text containing % or Turkish characters, level 4 most free text; level 1 refused none of these. Raise the level only after the audit log has shown your sites' traffic at it with the engine in detection_only. Earlier releases wrote the level under names CRS 3.3 does not read (tx.blocking_paranoia_level), so the WAF ran at level 1 whatever this page showed; an existing installation's CRS setup is corrected at the next agent start, through the same nginx -t-checked step as the shared rule set, and where this page shows a level above 1 the WAF runs at that level from then on. The level is this page's: a level written by hand into rule 900000 gives way to it at the next agent start.
Application exclusions, per site. CRS ships exclusion rules for WordPress, Drupal, Nextcloud, DokuWiki and XenForo that let each application's everyday admin requests through when the engine blocks — without WordPress's, every post save in the block editor was refused at level 1 (rule 941180, the editor's `` markers). WHost runs them per site, not server-wide, because CRS ties some of them to request arguments rather than paths: switched on for every site, a request to any site's index.php carrying WordPress's REST argument rest_route=/wp/v2/posts had its content field left out of inspection (63 of 64 attack-shaped test values passed there). In the CRS setup, rule 900140 takes the host name nginx chose the site by — from the transaction id the shared include passes (modsecurity_transaction_id "$request_id|$host" in /etc/nginx/conf.d/whost-modsecurity.conf), not from the Host header, which nginx does not route by when the request line carries its own host — and rules 900141–900145 switch an application's set on when that name is in its host list (/etc/modsecurity/app-sites/<application>.hosts). On OpenLiteSpeed, whose transaction id carries no host name, the agent loads a copy of the CRS setup (/etc/modsecurity/litespeed/crs-setup.conf) in which 900140 reads the Host header: OpenLiteSpeed receives requests only from the local nginx, which sets that header to the name it chose the site by. The agent writes the lists from the accounts' settings (the account page's WAF tab, below): WordPress is on Automatic by default — the sites WordPress is found on, its wp-login.php and wp-includes/version.php in the site's document root or one folder below it — and can be switched on for all of an account's sites or off; the other applications are off until switched on for an account. A site's names are its domain, its www. name and the names parked on it; an account whose WAF is off has none in the lists. The lists are brought up to date at agent start, at once when an account's settings change, and every five minutes (a WordPress installed later is picked up then); a changed list is tested by the web server that loads the rule set (nginx -t; openlitespeed -t on OpenLiteSpeed) and the previous lists are put back when the test refuses it. Measured with the engine on (WordPress 6.6.2): on a listed site the block editor saves went through at level 1, and at level 2 too unless the title held text such as C#; search, comment and settings forms kept their protection (64 of 64 attack-shaped test values refused with and without the set), while the post content sent to the REST API is not inspected by CRS there (only a signed-in author can send it; WordPress refused the unsigned test values itself). On a site without WordPress the rest_route request with an SQL value in content was refused, and so was the same request with a request line naming that site and a Host header naming a WordPress site. An existing installation receives the rules, the lists and the include line at the next agent start, through the same nginx -t-checked step as the shared rule set; a rule 900130 you set yourself (a server-wide choice of applications) is kept and keeps applying everywhere.
Restricted headers. The CRS setup restricts the Content-Encoding, Proxy, Lock-Token, Content-Range and If request headers but not Accept-Charset (CRS 4 checks it only from paranoia level 2): search engine and AI crawlers send it. An existing install receives the list at the next agent start, through the same nginx -t-checked step as the shared rule set; a list you set yourself (rule 900250 in /etc/modsecurity/crs/crs-setup.conf) is kept.
Argument limit. The CRS setup lets a request carry up to 1,000 arguments (rule 900300, tx.max_num_args — PHP's own max_input_vars default) instead of 255: at a limit of 255, multi-language administration forms, such as a WISECP product or add-on edit form with several hundred fields, are refused with 403 (rule 920380). An existing install that still carries the previous value receives the new one at the next agent start, through the same nginx -t-checked step; a value you set yourself is kept.
Engine mode of a new installation. A new installation starts in detection_only: requests are written to the audit log and none is refused. Switch to on on this page only after the audit log has shown your sites' rarer requests — payment provider webhooks, refunds, 3-D Secure returns, card saving, API and licence calls — without matches that would refuse them. An existing installation keeps the mode it has.
Switching to blocking, step by step. (1) Keep the engine in detection_only and the paranoia level at 1 while the sites see their usual traffic, including a test payment and the notifications it triggers. (2) Read the Audit Log tab: every entry that would refuse a legitimate request names its rule ids and the URI. (3) Leave such a request out of the rule where it occurs — for one account on its WAF tab (an entry of the account's WAF log offers Exempt this rule on this path, which fills in the rule and the path), for every site by switching the rule off on the Rules tab (only when the rule refuses legitimate traffic everywhere), or with a rule of your own on the Custom Rules tab (for example ctl:ruleRemoveTargetById=<id>;ARGS:<field> on one path) — and check that the entry no longer appears. (4) Switch to on — for the whole server on this page, or first for one account on its WAF tab (Block) while the server stays in detection_only. Measured with the engine on at level 1: Stripe, PayPal, iyzico, PayTR and Mollie notifications, contact, sign-up, search, checkout, upload and support-ticket forms and WordPress went through; a GitHub push notification was refused (rule 942360 on a commit message line starting with - update) and needs an exclusion for its URI; Amazon SNS notifications (text/plain), browser CSP reports (application/csp-report) and binary uploads (application/octet-stream, 1 KB to 2 MB, reaching PHP byte for byte) went through (see Request bodies), while a plain-text body with line breaks that is not an SNS message was refused (rule 921150); at level 2 the Stripe notification, a contact form, a search and a support ticket with HTML were refused as well.
Request bodies. XML and JSON request bodies are parsed by their own processors (rules 200000 and 200001 in /etc/modsecurity/modsecurity.conf), so each JSON value is inspected on its own. Structured +json types — application/vnd.api+json (JSON:API, used by some payment and subscription notifications), application/ld+json, application/merge-patch+json and the like — go to the JSON processor too (rule 200006), and six of them are allowed request types in the CRS setup (rule 900220); before, such a request was refused with the engine on (rule 920420, content type not allowed). Three more types are allowed there: browser CSP violation reports (application/csp-report) and Amazon SNS messages (text/plain carrying SNS's x-amz-sns-message-type header) are JSON documents and go to the JSON processor (rules 200100, 200101), so their values are inspected one by one — measured with the engine on, SQL or script values in a CSP report or an SNS message were refused; binary uploads (application/octet-stream) are not read by the WAF (rule 200102): no processor parses them, and read as form fields their bytes tripped the protocol rules. Their contents are therefore not inspected — an application that reads a raw request body as JSON or form data without looking at its type keeps its own validation as the protection there. Other text/plain bodies are read as form data; one with line breaks is refused (rule 921150). CRS 3.3's own default list carries none of these three types; WHost allows them so that these notifications and uploads keep working while the engine blocks. An existing installation receives these rules at the next agent start, through the same nginx -t-checked step; a JSON rule (id:200001, id:200006, id:200100) or a content-type list you wrote yourself is kept.
Active means the web server holds the rules. The page shows the WAF as Active only when the web server that serves the sites has loaded the rule set. On nginx: the connector module and the shared include /etc/nginx/conf.d/whost-modsecurity.conf, which the installer and the agent keep only once nginx -t has accepted the rule set. On OpenLiteSpeed: its ModSecurity module (ols-modsecurity, from LiteSpeed's repository) and a server-level module mod_security block that loads the agent's copy of the rule set (/etc/modsecurity/litespeed/rules.conf) with the engine off; each site of an account whose WAF is on switches the engine on in its own module mod_security block, with the account's file and then the server's engine mode (/etc/modsecurity/litespeed/engine.conf). Activating OpenLiteSpeed installs the module and wires it before the sites move; on a server that already runs OpenLiteSpeed the agent installs it in the background within five minutes of its start and tries again every 30 minutes when the install fails. Every change to these files is tested with openlitespeed -t before OpenLiteSpeed restarts, and a change the test refuses is put back — OpenLiteSpeed would otherwise start and serve that site without the WAF. OpenLiteSpeed takes the visitor's address from the local nginx's X-Forwarded-For (useIpInProxyHeader 2, the loopback address marked trusted), so the audit log shows the visitor rather than 127.0.0.1. On OpenLiteSpeed the WAF checks and blocks application requests (PHP pages and other dynamic content), but a request for a static file (an image, a stylesheet, a script, an HTML file) is no longer checked once an OpenLiteSpeed worker process has served that file: the module lets such requests through unread (measured with OpenLiteSpeed 1.9.4 and ols-modsecurity 1.9.4-3). A rule aimed at static paths, at the client address or at the user agent therefore does not hold for static files there; the page shows this as a note with a link to the Firewall page, which blocks an address for every request. While the rule set is not loaded, the header reads Inactive and a WAF rule set not loaded note says that requests are not checked although the engine is on — on OpenLiteSpeed the note names the reason (the module is not installed yet, its install failed, or it is not wired yet); the agent tries again at every start and writes the reason to /var/log/whost/agent.log. On Ubuntu 22.04 one CRS file is left out of the rule set — see Known limitations.
Rules. Every id-bearing rule of the loaded rule set is listed, with its message where it carries one. A rule switched off is written to /etc/modsecurity/disabled-rules.json and as SecRuleRemoveById in modsecurity.conf, and the web server is reloaded; an id that is not in the rule set answers 404 WAF_RULE_NOT_FOUND; a toggle to the state already in force writes nothing.
Custom rules (the Custom Rules tab). Rules of your own, applied to every site whose WAF is on. Add rule takes a name and the rule text — ModSecurity rule directives only: SecRule, SecAction, SecMarker, SecRuleRemoveById / ByTag / ByMsg, SecRuleUpdateTargetById / ByTag / ByMsg and SecRuleUpdateActionById. Before a rule is kept it is checked, and a refused rule is shown with the line and column at fault while nothing is written: a directive that loads files or rules, writes logs or changes the engine's own setup (Include, SecRuleEngine, SecAuditLog…, SecRemoteRules, SecRuleScript …) is refused, so are an operator that reads a file or a list from the server or a remote address, or asks an outside service (@inspectFile, @pmFromFile / @pmf, @ipMatchFromFile / @ipMatchF, @rbl, @gsbLookup, @validateDTD, @validateSchema, @fuzzyHash; an operator the panel does not know is refused too) and the exec action; the first rule of every chain needs an id that is not held by another rule and lies outside the ranges the rule sets in use take (10000–19999 account exclusions, 200000–200999 WHost request body rules, 900000–999999 and 9000000–9099999 OWASP CRS, 9900000–9999999 WHost) — use 1–9999 or 20000–199999; then the rule engine's own parser (modsec-rules-check, where the host has it) and the configuration test of every web server that loads the rule set read it, and a refusal puts the previous file back. Check runs the text checks and the engine's parser without saving. The rules are written together to /etc/modsecurity/custom/whost-panel-rules.conf (their record is /etc/modsecurity/custom-rules.json) and the web server reloads; a rule switched off stays in the list and is left out of the file; at most 200 rules are kept. While the engine or an account is in detection_only, a deny rule only writes to the audit log. Other .conf files in /etc/modsecurity/custom/ are yours: they keep applying, are listed under the table with their rule ids (read-only) and their ids count as taken. Measured on nginx with the account in Block: a rule refusing a user agent refused it with 403 and the audit log named the rule's id, other requests went through; switched off, edited and removed, the request passed accordingly, and the main configuration ended byte for byte as it began. Endpoints (administrators only): GET / POST /waf/custom-rules, PUT / DELETE /waf/custom-rules/{id}, POST /waf/custom-rules/validate; a refusal answers 422 WAF_CUSTOM_RULE_INVALID with details.issues (code, message, line, column), an unknown rule 404 WAF_CUSTOM_RULE_NOT_FOUND. The audit log records WAF Custom Rule Added, Changed and Removed.
php2shell detection rules. Beside the CRS set the agent keeps its own rule file, /etc/modsecurity/crs/rules/99-whost-php2shell.conf (rules 9900100–9900103 and 9900106, adapted from the php2shell-poc detection package), for the request shapes of the PHP session attack chains (CVE-2026-109618 / CVE-2026-109619): a multipart POST carrying a PHP_SESSION_UPLOAD_PROGRESS field (9900100), PHP code (9900102) or a serialized object (9900103) in an upload file name, and a chunked multipart POST without a content length (9900106) are refused with 403 (400 for the chunked one) where the engine blocks and logged where it detects; a PHPSESSID form field (9900101) is logged only. No rule reads the response: the engine runs with SecResponseBodyAccess Off, so a rule on the response body could never match. A match of 9900100, 9900102 or 9900103 also bans the client (see WAF-hit jail under Fail2Ban). The file is written at every agent start when it is missing or holds an older copy, through the same nginx -t-checked step as the shared rule set — a file the web server refuses is not kept, and the agent log says so — and a copy you edited by hand is left alone. The rules appear in this list, can be switched off here like any CRS rule and left out per account on the account's WAF tab. They are defense in depth over the PHP session hardening the agent applies to every PHP version (upload progress off, strict session ids): a site that switches upload progress back on through its .user.ini stays covered here. Alerts. The agent follows the audit log every 15 seconds and reports every match of these rules: a panel notification in the firewall category (mailed per the notification settings) — WAF: php2shell request refused on security.waf_detection, and, when modsecurity.alert_command names one, a local command (see Configuration). The same address and rule are reported once per 30 minutes.
Audit log. The newest entries of /var/log/modsecurity/audit.log: client address, host, URI, the first rule that matched, severity, and whether the request was blocked, detected (detection-only mode) or only logged (a 4xx/5xx no rule matched). The rotation copies and truncates the file (copytruncate) because libmodsecurity never reopens it; the agent writes that logrotate stanza at every start. Auto Refresh polls every 10 s; Load More widens the window up to 1000 entries. On LiteSpeed Enterprise with its WAF connector on (modsecurity.litespeed_enterprise), LiteSpeed's own engine writes no audit log: the list (and an account's list) also takes the rule matches from LiteSpeed's error log (/usr/local/lsws/logs/error.log and its rotated files) and shows them among the other entries by time, with the action Matched. These entries are less detailed: the log names the site, the client address, the request line and every rule that matched, but not the request body, the headers or the response, and not whether the request was refused — with the account's mode Block (or the server's on) a request that reached the refusal threshold (rule 949110) or matched a refusing rule was refused, with Detect only it reached the site. The rule's message and severity are read from the rule file as it is now, so an entry of a rule deleted since shows no message. The WAF alerts read the same matches; a match of the agent's own rules (9900100–9900119) is reported as critical there, since its outcome is not known. LiteSpeed's engine does not know some variables the CRS rules use (REQBODY_PROCESSOR, MULTIPART_PART_HEADERS, MULTIPART_FILENAME; it warns about them at start), so the rules that read them do not run there and the checks of multipart bodies and of the body processor are weaker than on nginx or OpenLiteSpeed.
Per-account WAF (the account page's WAF tab; a reseller has the same panel on its sub-accounts' pages). Mode: Server setting (the default — the account follows the engine mode above, named in brackets), Off, Detect only or Block; the tab shows the mode in force. An account's own mode is written into its rule file (SecRuleEngine Off|DetectionOnly|On in /etc/modsecurity/accounts/<user>.conf, which every vhost of the account loads), so one account can block while the server only detects, or the other way round. Turning an account off asks for confirmation; it re-renders every vhost of the account so its modsecurity switch (on OpenLiteSpeed, the site's module mod_security block) follows the state (a vhost rendered while the WAF was off is enforced again after the switch on) and takes the account's names out of the application host lists. Application exclusions: per application Automatic (WordPress only), On for every site or Off (see Application exclusions, per site); the card names the sites WordPress was found on and how many of the account's host names a set is in force for, and says Takes effect within five minutes until the lists carry a change. Rule exclusions: one CRS rule left out for the account's sites, on every path or only on paths that begin with a prefix (/wp-admin/ covers every path below it). The prefix is compared with the decoded, normalised path the web server routes on: the query string is not part of it, and ../ segments cannot carry it to another path — measured before this, an exclusion for /allowed/ also let /other.php?x=/allowed/&q=<SQL> and /allowed/../other.php?q=<SQL> through. A prefix that does not start with / or carries ? is refused (422 VALIDATION_ERROR). On OpenLiteSpeed the exclusions are also written, framed by the account's site names, into /etc/modsecurity/litespeed/site-exclusions.conf, which OpenLiteSpeed loads before the CRS rules: there the server-level rules come before a site's own files, so an exclusion only in the account's file would come too late for the rules that run first. WAF log: the account's entries (the Host header names one of its domains), newest first, with every rule id an entry names; Exempt this rule on this path opens the exclusion form with the entry's rule and its path (without the query string). The anomaly-score rules (949110, 959100, 980130, 980140) are not offered there: leaving one out would stop every refusal on the path. Endpoints: GET /accounts/{username}/waf/status (mode, server_mode, effective_mode, rule_exclusions, apps), PUT /accounts/{username}/waf/mode, PUT /accounts/{username}/waf/apps, PUT /accounts/{username}/waf/toggle (on / off over the mode: off sets Off; on keeps an account's own mode and turns an account that is off back to the server setting), POST /accounts/{username}/waf/rules/exclude and DELETE /accounts/{username}/waf/rules/exclude/{rule_id} (?uri= for a path-scoped one; without it the account-wide entry goes, or the only path-scoped one when that is all there is — several need the path, 422), GET /accounts/{username}/waf/audit-log; a reseller reaches the same under /client/accounts/{username}/waf… for its own sub-accounts when its plan allows WAF management. The audit log records Account WAF Mode Changed, Account WAF Application Exclusions Changed and the rule exclusions added and removed. An account that does not exist answers 404 ACCOUNT_NOT_FOUND. While modsecurity.per_account_overrides is false the mode, toggle and rule exclusion writes answer 409 FEATURE_DISABLED and nothing is written; the reads and the application exclusions (server-level host lists, not the account's rule file) keep working. The account's rule file (/etc/modsecurity/accounts/<user>.conf) is generated: it is rendered again from the state file on every change and at every agent start, so a rule written into it by hand is dropped. When an agent start rewrites a file that held such lines, the agent log carries one WARNING per account (how many lines were dropped and the folder that keeps the previous file, /var/lib/whost/nginx-modsec-shared-<stamp>/) and the admin panel shows a notification naming the accounts. A server-specific rule that the exclude endpoints cannot express (one that exempts a single argument, for example) is added on the Custom Rules tab of the ModSecurity WAF page, or by hand as /etc/modsecurity/custom/<name>.conf — the main WAF file includes that folder and the agent writes only whost-panel-rules.conf there; after adding a file by hand, run nginx -t and reload nginx (on OpenLiteSpeed, whose copy of the rule set includes the same folder: openlitespeed -t, then a graceful restart with systemctl reload lshttpd).
Endpoints used: GET /waf/status, PUT /waf/config, GET /waf/rules, PUT /waf/rules/{rule_id}, GET /waf/audit-log, POST /waf/test; the account routes above.
Under-Attack Mode
Top-right toggle. With the Auto Enable switch on (it is off by default) the mode arms itself when the threat score reaches 5 (driven by FirewallLogService scoring of recent blocks); with the switch off, such a score only raises a High Threat Level Detected notification. The sysctl hardening is handed to systemd-sysctl through the drop-in /etc/sysctl.d/90-whost-attack-mode.conf (the agent runs with ProtectKernelTunables, so it cannot write /proc/sys itself); the drop-in is removed and the previous values are written back when the mode is disabled, and sysctl_hardening is claimed only when at least one value actually changed. The packet rules — the SYN-flood limit and the connlimit on 80/443 — live in the WHOST-ATTACK chain that the first INPUT rule jumps to, ahead of ufw's chains; every verdict in it is RETURN, DROP or REJECT, so the firewall's own policy still decides what a connection that survived the flood check may reach, and the management ports are never dropped. A reboot empties the packet filter while the mode stays on; the agent puts the chain back when it starts. The sources nginx trusts as real-ip proxies (set_real_ip_from, the CDN's ranges) are exempt from the connection limit: one edge address carries every visitor, so counting it as a single client would cut them all off. Nginx limit_req and tighter Fail2Ban thresholds complete the set; on disable the Fail2Ban values read before the mode was enabled are restored. The card lists the applied protections. Manual mode persists across restarts; auto mode disarms when the threat score drops. Enabling an already-active mode (or disabling an inactive one) answers 409 ATTACK_MODE_ACTIVE / ATTACK_MODE_INACTIVE; every state change answers the new state in data.
Security Logs
The Security Logs tab shows the blocked events, grouped by address and type — count is the number of blocks, taken from the per-minute counters when the rows were sampled under load, and such a group is marked sampled — and the suspicious requests the access-log scanner found. Filters: an exact address, a fragment of one (0.2.1 narrows with a partial match; anything that cannot name a host answers 422), the block type (rate_limit, under_attack, manual, autoban, denied — a 403 the agent answered before authentication: an address outside the admin allowlist, or a request without the panel bundle header; recorded only, no ban follows and fail2ban does not count it), the category, and since / until as ISO-8601 timestamps. The list is paged on the agent (100 per page). The hour chart covers the last 24 hours in the viewer's local time; every hour is present and an empty one reads zero. The banned badge is true only while the address is banned right now — in a fail2ban jail (every jail is asked), on the HTTP-layer list, or by an auto-ban younger than its hour. Unban & Whitelist lifts the block first and then adds the address to the whitelist; when the second step is refused the toast says so, and the address stays unblocked but untrusted. Refresh, the TXT export, Clear Log (empties both tables; audit firewall_logs_cleared) and the Clear All Bans twin sit in the toolbar. Retention is 24 hours, capped at 50,000 blocked and 10,000 suspicious rows; the cleanup commits its deletes before the WAL checkpoint, so a busy writer only defers the checkpoint. Firewall notifications go through the shared notification service in the firewall category, so the operator's e-mail and panel preferences apply to them.
Endpoints used: GET /firewall/status, GET/POST /firewall/rules + PUT/DELETE /firewall/rules/{rule_id}, GET/POST /firewall/blocked-ips + DELETE /firewall/blocked-ips/{ip} + POST /firewall/blocked-ips/clear-all, GET/POST /firewall/whitelist, GET/POST /firewall/rate-limits, POST /firewall/attack-mode/{enable,disable,auto-enable,auto-disable}, GET /firewall/logs/{stats,blocked,suspicious}, DELETE /firewall/logs; the account-level /accounts/{username}/firewall/blocked-ips endpoints apply the same server-wide rule. The account's own list: GET/POST /accounts/{username}/firewall/ip-blocks + DELETE /accounts/{username}/firewall/ip-blocks/{ip}.
Our support team is here around the clock for anything you can't find above.