EST. 2026 — Notes from real server work SYSADMIN · SECURITY · AI · DIRECTADMIN Issue 01
THE SYSADMIN ALMANAC
Home / Tags / ModSecurity
ModSecurity

#ModSecurity

5 articles
Security
WAF Returns 406 for Thai Text in POST: Fixing It Without Root
Security

WAF Returns 406 for Thai Text in POST: Fixing It Without Root

ModSecurity on the host returns 406 for certain Thai sentences in the POST body, preventing forms from saving — but as a hosting tenant, I cannot change the rules myself. This article shows how to isolate the offending text through black-box testing, then work around it with JS encoding on submit + middleware decoding in Laravel.

#modsecurity#waf#laravel#php
9 min read·15 Aug
libmodsecurity3 + nginx — only ctl:ruleEngine exclusions work
Security

libmodsecurity3 + nginx — only ctl:ruleEngine exclusions work

ModSecurity v3 (libmodsecurity3) + nginx + OWASP CRS — the ctl:ruleRemoveById taught in the guides does nothing and fails silently. This article covers what I found after trying every approach: ctl:ruleEngine works, scoped with a Host+URI chained rule, and the exclusion file must load before CRS.

#modsecurity#nginx#security#firewall
9 min read·10 Jul
Tuning ModSecurity on DirectAdmin for Shared Hosting
Security

Tuning ModSecurity on DirectAdmin for Shared Hosting

The 4 additions I made beyond DA defaults — exclusions before CRS, a 1-hit credscan ban, a fix for the incorrect MODSEC_LOG path shipped by DA, and a self-heal cron to recover from rebuild overwrites

#modsecurity#csf#directadmin#custombuild
11 min read·20 May
DA Migration Finale — Security Fixes and Hardening After Stabilizing
Security

DA Migration Finale — Security Fixes and Hardening After Stabilizing

Wrapping up the cross-distro DirectAdmin migration series with security work after the server stabilized — sudoers wildcard CVE, OpenSSL SECLEVEL, ModSec exclusions before CRS, a csfpost drop-in, and 5 layers that survive DA updates

#security#hardening#directadmin#modsecurity
12 min read·20 May
DA Migration Part 3 — DirectAdmin + CustomBuild on Debian 12
DirectAdmin

DA Migration Part 3 — DirectAdmin + CustomBuild on Debian 12

Installing DirectAdmin through setup.sh, then assembling a stack with multiple PHP versions, MariaDB, ModSecurity, and rspamd using CustomBuild on a staging VM behind NAT, including pitfalls I ran into myself.

#directadmin#custombuild#php-fpm#mariadb
11 min read·20 May