HAProxy Config Auditor
Your haproxy.cfg decides who can open the stats page, which TLS versions still negotiate, and whether a slow client can hold a connection forever. Read it before someone else does.
An HAProxy config audit is a static review of an haproxy.cfg file — its stats exposure, TLS settings, timeouts and proxy wiring — checked line by line against known-good practice, without running the load balancer. Paste yours here and this auditor reads it in your browser — never uploaded — and flags a stats page with no authentication, TLS 1.0 still enabled, weak ciphers, missing timeouts, mode mismatches and backends that do not exist, with a 0–100 score. The companion article HAProxy config audit guide explains each check. Also see the Nginx Config Auditor and the Apache Config Auditor.
Last updated:
1. Audit a config
Results
🔒 The audit runs entirely in your browser: the config is never uploaded, never stored, and never sent anywhere. A config names backends, certificates and access rules — that is exactly why it stays on your machine.
What an haproxy.cfg is
An HAProxy config is organised in sections: global for the process itself, defaults for shared settings, and one frontend, backend or listen section per proxy. Inside a section each line is a directive — a keyword plus arguments — and # starts a comment, unless it sits inside a quoted string, where it is data.
Settings in a defaults section are inherited by the proxies that follow it, until a proxy overrides them. That inheritance is convenient and dangerous in equal measure: a timeout set in one proxy but not in the defaults leaves every other proxy on the built-in behaviour, and the file rarely makes that obvious at a glance.
TLS lives in several places at once: ssl-default-bind-options and ssl-default-bind-ciphers in global, and per-listener options on each bind line such as ssl-min-ver and ciphers. An audit has to read all of them together — the weakest one wins.
The stats interface has two faces: an HTTP page (stats enable / stats uri) and a runtime socket (stats socket). Both can change a running proxy, so both need authentication or a local-only binding — an exposed stats page is an admin panel with no login.
How the score works
The auditor parses the file into sections and directives, resolves each proxy’s effective mode, timeouts and logging from its preceding defaults plus its own lines, then runs 17 rules: stats exposure, legacy TLS minimums, weak cipher tokens, small DH parameters, missing timeouts, mode mismatches, undefined backends, open-proxy mode, missing logging and more.
Scoring starts at 100. Each error deducts 10 (capped at 50 total), each warning deducts 4 (capped at 28) and each info finding deducts 1 (capped at 10), with a floor of 0. Bands: 90+ Excellent, 70–89 Good, 50–69 Needs work, below 50 Poor. A file with no recognisable HAProxy section — or one that is clearly another format, such as nginx blocks or YAML — gets an error report, not a score.
Every finding names the line, the section and the directive as written, so you can jump straight to the line in your editor. Export the findings as CSV or the full report as JSON for tickets and change reviews.
What this audit cannot see
A static audit reads text, not a running proxy. It cannot see the actual certificate files a crt path points to, backend health, runtime statistics, the HAProxy version’s own defaults, or whether a firewall already blocks the stats port. A clean score means no risky pattern was found in this file — not that the deployment is safe.
Rules are deliberately deterministic and simple: for example, a stats page counts as protected only when stats auth sits in the same section, even though an ACL in front of it can also protect it. Where the auditor cannot prove a thing from the text, it says so instead of guessing.
Glossary
| frontend / backend | A frontend accepts client connections; a backend holds the servers they are forwarded to. A listen section is both in one. |
| defaults inheritance | Settings from the most recent defaults section apply to the proxies after it, unless the proxy overrides them. |
| stats socket / stats page | HAProxy’s runtime API and web statistics interface. With level admin they can drain servers and change weights — protect them. |
| ssl-min-ver | The oldest TLS version a listener will negotiate. Anything below TLSv1.2 is a legacy protocol with known weaknesses. |
| timeout connect / client / server | How long HAProxy waits to connect to a backend, for a client to send, and for a server to answer. Missing timeouts let slow clients hold connections open (slowloris). |
| mode http / tcp | mode http proxies understand HTTP; mode tcp proxies raw bytes. A frontend in one mode feeding a backend in the other breaks in subtle ways. |
| option forwardfor | Adds the X-Forwarded-For header so applications behind the proxy see the real client IP instead of the proxy’s. |
| resolvers / init-addr | How backend hostnames are re-resolved after startup. Without them, a hostname server is resolved once at boot and never again. |
Frequently asked questions
Is my haproxy.cfg uploaded?
No. The file is read locally in your browser and parsed by JavaScript on this page. Nothing is uploaded, stored or sent anywhere — you can disconnect from the network and the audit still works.
Why does a timeout in defaults not clear the finding on one proxy?
Inheritance only flows forwards: a proxy inherits from the defaults section that precedes it. A proxy defined before that defaults section, or one that overrides the timeout list only partly, keeps the gap — the finding names exactly which of connect, client and server are missing.
A finding is not a vulnerability — how do I prioritise?
Start with errors: an unauthenticated stats page and legacy TLS are directly reachable by an attacker. Warnings such as missing timeouts are availability risks. Info findings are hardening notes. Fix errors first, then re-run the audit to watch the score move.