Overview
HAProxy is the ingress point. Fluent Bit collects and forwards the logs.- HAProxy emits structured access logs with the
HAPROXY_LOGprefix. - Fluent Bit receives HAProxy syslog events over UDP.
- The OneFirewall Fluent Bit adapter parses the records using
catchall_parser. - OneFirewall analyzes the traffic for malicious behavior and pattern detection mapped to MITRE ATT&CK.
- Optional: IPS reporting sends suspicious IPs to the OneFirewall cloud.
1. HAProxy Logging Configuration
In theglobal section of haproxy.cfg, send logs to stdout and to the Fluent Bit adapter over UDP.
172.17.0.1:31514 and forwards UDP traffic to container port 514.
2. HAProxy Frontend Configuration
In the HAProxy frontend, capture the request headers and define a log format the OneFirewall Fluent Bit adapter can parse.http-request set-var(txn.xff) hdr(X-Forwarded-For)stores the original client IP from theX-Forwarded-Forheader.log-format "HAPROXY_LOG ..."writes a fixed log structure with the original IP, connection metadata, HTTP protocol, raw request, and status code.
3. OneFirewall Fluent Bit Adapter
Add the OneFirewall Fluent Bit adapter to your Docker Compose stack.For
OFA_API_URL, provide only the protocol, host, and optional port, for example https://app.onefirewall.com or http://localhost:8080. Do not include the API path. The adapter adds it.4. Environment Variables
5. MITRE ATT&CK Pattern Detection Flow
With this configuration, HAProxy logs contain enough data for OneFirewall to analyze web traffic and detect suspicious patterns. From theHAPROXY_LOG records, OneFirewall evaluates suspicious paths, attack tools, anomalous source IPs, abusive request patterns, and other indicators linked to MITRE ATT&CK techniques.
6. Validation Checklist
After deployment, check that:- HAProxy starts successfully with the updated
globalandfrontendconfiguration. - UDP port
31514is bound on172.17.0.1by the Fluent Bit adapter. - HAProxy logs contain the
HAPROXY_LOGprefix. - The Fluent Bit adapter logs show parsed records matching
*_ofa_logs. - OneFirewall receives traffic events from the
haproxy_wafagent. - IPS reporting is enabled only when
OFA_API_URL_CLOUDandOFA_JWT_TOKEN_CLOUDare configured with valid cloud credentials.

