Leona
GitHubBlogs
  • Welcome to Leona!
  • Installation
    • Docker
    • Manual Setup
    • Log Collection
  • Tutorial
    • Quickstart
  • Configuration
    • Server Conf
    • Web Interface
    • Multi-Nodes
    • Index Model
    • Backup
    • The REST APIs
  • Security
    • Using ModSecurity
    • Logging User Activity
    • The URL Whitelist
    • Alerts And Events
  • Getting in
    • Log Sources
      • GELF
      • Beats
      • Ingest Logs Manually
        • Syslog
        • Journald
        • CEF
        • Raw or Plaintext
        • From Files
        • HTTP API
        • Application Data
      • Input
    • Sidecar
    • Forwarder
      • Forward Installation
      • Forward Configuration
  • Making sense
    • Pipelines
      • Rules
      • Functions
      • Use Cases
    • Streams
    • Enrichment
      • Lookup Tables
      • Geolocation
      • Data Adapters
  • Alerts & Notifications
    • Alerting By Example
    • Notifications
    • Leona Dashboard
  • Searching
    • Search Query Language
    • Time Frame Selector
  • Appendix
    • Support
    • License
    • Ecosystem
    • Contribute
    • Change Log
    • FAQs
Powered by GitBook
On this page
  1. Security

Using ModSecurity

PreviousThe REST APIsNextLogging User Activity

Last updated 2 years ago

is a popular open source web application firewall that can be used in conjunction with the Apache and Nginx web servers. When leona is configured behind a web server that uses ModSecurity, certain configuration changes must be made.

Some distributions (for example RHEL 7.x) ship with older rule sets that do not allow the MIME type application/json to be used in requests. This can be fixed by modifying the variable tx.allowed_request_content_type:

# Allow application/json
SecRule REQUEST_URI "@beginsWith /" \
   "id:'000001', \
   phase:1, \
   t:none, \
setvar:'tx.allowed_request_content_type=application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf|application/json|application/octet-stream', \
   nolog, \
   pass"
ModSecurity