From e1c786a1d7871ccaec3f36330b1b42c447dc227b Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Sun, 18 Sep 2022 19:01:38 +1000 Subject: [PATCH] Add example snippet of how to acl/whitelist stats sockte --- haproxy/haproxy.cfg | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/haproxy/haproxy.cfg b/haproxy/haproxy.cfg index 22e77cc..3dc576b 100644 --- a/haproxy/haproxy.cfg +++ b/haproxy/haproxy.cfg @@ -4,7 +4,7 @@ global log stdout format raw local0 debug lua-load /etc/haproxy/scripts/register.lua stats socket /var/run/haproxy.sock mode 666 level admin - stats socket *:2000 level admin + stats socket 127.0.0.1:1999 level admin httpclient.ssl.verify none defaults @@ -13,6 +13,18 @@ defaults timeout client 50000ms timeout server 50000ms +#frontend stats-frontend +# bind *:2000 +# option tcplog +# mode tcp +# acl white_list src xxx.xxx.xxx.xxx +# tcp-request connection reject unless white_list +# default_backend stats-backend + +#backend stats-backend +# mode tcp +# server stats-localhost 127.0.0.1:1999 + frontend http-in bind *:80