dcg

HAProxy

loadbalancer.haproxy

Protects against destructive HAProxy load balancer operations like stopping the service or disabling backends via runtime API.

  • 9blocking rules
  • 5safe patterns
  • 9High
~/.config/dcg/config.toml
[packs]
enabled = ["loadbalancer.haproxy"]

Evaluated when a command contains haproxy, socat.

Blocking rules

Each rule ID is loadbalancer.haproxy:<name>. Use it in allowlists and [policy.rules].

  1. haproxy-config-delete

    High

    Removing files from /etc/haproxy deletes HAProxy configuration.

  2. haproxy-hard-stop

    High

    haproxy -st sends a hard stop signal, immediately terminating the load balancer.

  3. haproxy-service-stop

    High

    service haproxy stop stops the HAProxy service.

  4. haproxy-socat-disable-frontend

    High

    Disabling a frontend via HAProxy runtime API stops accepting new connections.

  5. haproxy-socat-disable-server

    High

    Disabling a server via HAProxy runtime API removes it from the load balancer pool.

  6. haproxy-socat-shutdown-frontend

    High

    Shutting down a frontend via HAProxy runtime API terminates it immediately.

  7. haproxy-socat-shutdown-sessions

    High

    Shutting down sessions via HAProxy runtime API terminates active connections.

  8. haproxy-soft-stop

    High

    haproxy -sf sends a soft stop signal, terminating the load balancer gracefully.

  9. haproxy-systemctl-stop

    High

    systemctl stop haproxy stops the HAProxy service.

Safe patterns

Checked first. A command that matches one is never blocked by this pack.

  • haproxy-config-check
  • haproxy-version
  • systemctl-status-haproxy
  • service-status-haproxy
  • haproxy-socat-show