On Fri, Jun 30, 2017 at 12:16 PM, Jarno Huuskonen <jarno.huusko...@uef.fi>
wrote:

> Hi,
>
> On Fri, Jun 30, Kaushal Shriyan wrote:
> > Is there a way to restrict HAProxy stats page to a specific IP?
> >
> > For example i want to restrict *http://IP:1936/haproxy-stats
> > <http://IP:1936/haproxy-stats>* to my office address only
>
> Can you try something like this:
>
> listen stats_frontend
>   bind *:1936
>   mode http
>   stats enable
>   stats uri /haproxy-stats
>   # other stats options you want for example stats auth / stats realm
>   # http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4-stats%
> 20auth
>   acl office_addr src your.ip.add.ress #or your.ip.add.ress/mask etc.
>   acl stats_path path_beg /haproxy-stats
>
>   http-request deny if stats_path !office_addr
>
> -Jarno
>
> --
> Jarno Huuskonen
>

Hi Jarno,

I am running HAProxy version haproxy-1.5.x in my setup. I did added the
below settings.


>
>
>
>
>
>
>
> *listen stats_frontend  bind *:1936  mode http  stats enable  stats uri /
> #
> http://cbonte.github.io/haproxy-dconv/1.5/configuration.html#4-stats%20auth
> <http://cbonte.github.io/haproxy-dconv/1.5/configuration.html#4-stats%20auth>
> acl office_addr src officeIP  acl stats_path path_beg /  http-request deny
> if stats_path !office_addr*


I get http 403 for two refresh and in the third refresh the haproxy stats
page gets loaded. Is there a way to disable Basic Authentication pop up?

Any help will be highly appreciable. Thanks in Advance.

Regards,

Kaushal

Reply via email to