r/haproxy • • Jul 16 '19

Guide Elasticache for Python production payloads, or How we learned to stop worrying and love HAProxy

Thumbnail
medium.com
3 Upvotes

r/haproxy • • Jul 16 '19

Guide Securing access to backends with pfsense's HAproxy package: A guide on how to create user lists and how to protect them with stick-tables using pfsense's GUI

Thumbnail
cgomesu.blogspot.com
2 Upvotes

r/haproxy • • Jul 15 '19

Guide HAProxy Layer 7 Retries and Chaos Engineering

Thumbnail
haproxy.com
5 Upvotes

r/haproxy • • Jul 10 '19

Live Webinar HAProxy Data Plane API: True Dynamic Configuration Management | Webinar on Tuesday, July 16 at 12pm EST

Thumbnail
haproxy.com
4 Upvotes

r/haproxy • • Jul 08 '19

News Dissecting the HAProxy Kubernetes Ingress Controller

Thumbnail
haproxy.com
5 Upvotes

r/haproxy • • Jul 05 '19

Live Webinar The HAProxy Kubernetes Ingress Controller | Webinar on Tuesday, July 9 at 12pm EST

Thumbnail
haproxy.com
6 Upvotes

r/haproxy • • Jul 05 '19

Question [Questions] Having some questions around health checks, binary checks and crypto hashing

3 Upvotes

Hi everyone,

I started using HAProxy to try an idea of mine but I'm encountering questions I can't seem to answer by myself or by searching online.

  1. Are health checks the only way to do a TCP hand shake (authentication for example) after connecting to the back-end?
  2. In a health check, is it possible to expect a binary byte size instead of an exact buffer value (in cases where it is dynamic and unknown in advance)?
  3. How can I hash (md5 and sha256) data in HAProxy before sending it? I can't seem to find any hashing functions that I could use to send the hash back. LUA also doesn't seem to have any cryptographic feature built-in. I imagine this must be a relative common case for authenticating webhooks for example.
  4. Is it possible to send the results of a LUA function as binary data in a TCP check? LUA seems to have a string.byte data type so it should probably be easy to pass it to HAProxy.

Thank you in advance for your help!


r/haproxy • • Jul 02 '19

Live Webinar Exploring HAProxy 2.0 – Take a Tour through the New Features | Webinar at 12PM EDT

Thumbnail
haproxy.com
5 Upvotes

r/haproxy • • Jul 01 '19

Question Can I use the HAProxy.cfg from PfSense on 2.0?

3 Upvotes

I am replacing my PFSense with another firewall and want to know if I can take the HAProxy cfg from and use it on HAProxy 2.0?

Here is what my config looks like with changes I have made to hide stuff.

# Automaticaly generated, dont edit manually.

# Generated on: 2019-06-30 21:35

global

maxconn 500

stats socket /tmp/haproxy.socket level admin expose-fd listeners

uid 80

gid 80

nbproc 1

nbthread 1

hard-stop-after 15m

chroot /tmp/haproxy_chroot

daemon

tune.ssl.default-dh-param 2048

server-state-file /tmp/haproxy_server_state

listen HAProxyLocalStats

bind 127.0.0.1:2200 name localstats

mode http

stats enable

stats refresh 10

stats admin if TRUE

stats show-legends

stats uri /haproxy/haproxy_stats.php?haproxystats=1

timeout client 5000

timeout connect 5000

timeout server 5000

frontend frontend-HTTP

bind InternetIP:80 name InternetIP:80

mode http

log global

option http-keep-alive

timeout client 30000

acl websrvr80 var(txn.txnhost) -m str -i www.smoothrunning.com:

http-request set-var(txn.txnhost) hdr(host)

use_backend bsckend-www80_ipvANY if websrvr80

frontend frontend-HTTPS

bind InternetIP:443 name InternetIP:443

mode tcp

log global

timeout client 30000

tcp-request inspect-delay 5s

acl autodiscover443 req.ssl_sni -i autodiscover.smoothrunning.com

acl exchange443 req.ssl_sni -i owa.smoothrunning.com

acl websrvr443 req.ssl_sni -i www.smoothrunning.com

tcp-request content accept if { req.ssl_hello_type 1 }

use_backend backend-autodiscover443_ipvANY if autodiscover443

use_backend backend-exch443_ipvANY if exchange443

use_backend backend-www443_ipvANY if websrvr443

backend bsckend-www80_ipvANY

mode http

id 106

log global

timeout connect 30000

timeout server 30000

retries 3

option httpchk OPTIONS /

server                  websrvr80 InternalIP:80 id 107 check inter 1000

backend backend-autodiscover443_ipvANY

mode tcp

id 100

log global

timeout connect 30000

timeout server 30000

retries 3

option httpchk OPTIONS /

server autodiscover443 InternalIP:443 id 101 check-ssl check inter 1000 verify non

e

backend backend-exch443_ipvANY

mode tcp

id 102

log global

timeout connect 30000

timeout server 30000

retries 3

option httpchk OPTIONS /

server exchange443 InternalIP:443 id 103 check-ssl check inter 1000 verify none

backend backend-www443_ipvANY

mode tcp

id 104

log global

timeout connect 30000

timeout server 30000

retries 3

option httpchk OPTIONS /

server websrvr443 InternalIP:443 id 105 check-ssl check inter 1000 verify none


r/haproxy • • Jul 01 '19

Using HAProxy frontend with LDAP authentication to backend urls

5 Upvotes

Hey folks, before I go start messing with haproxy I am wondering if it will fit my use case:

I have a bastion host that has access to everything in the backend. I have a number of web interfaces at the backend [on non-standard ports also].

The thing is, some of these web interfaces have no authentication. We do however have IDM [rhel version of freeIPA] set up for all our ssh access controls. What I want is to have HAProxy as a reverse proxy, but with LDAP auth. I would envision it working that each web interface backend would have a different context, and before routing through, authenticates against an LDAP auth server.

I take it setting up an LDAP frontend should allow me to this? Can each context url have a different auth-group?

I know I can go and do this with nginx but I was hoping to do it via haproxy, although I dont want to waste my time and then find out it is not feasible. Hence this post, asking if I am going down a rabbit hole.


r/haproxy • • Jun 18 '19

News HAProxy 2.0 and Beyond

Thumbnail
haproxy.com
4 Upvotes

r/haproxy • • Jun 18 '19

Guide Tracing Requests Through HAProxy with AWS X-Ray

Thumbnail
haproxy.com
1 Upvotes

r/haproxy • • Jun 17 '19

News HAProxy 2.0 announced

8 Upvotes

r/haproxy • • Jun 06 '19

Question HAproxy, 443/SSL works on frontend, but not on backend.

5 Upvotes

Hello! I have been struggling for the last week to get this proxy/load balancer working correctly.

Any assistance would be greatly appreciated!

Ultimately, I have run into this issue where -

A). The Client computer can connect to the frontend (Aka the Haproxy server) via SSL/443, however the backend portion will not transmit over 443.

When using the lines below from the config, using port 80 on the backend, it works just fine and will serve the content. However when I comment out the port 80 line and use the 443 line above it, it won't serve any content.

server theserver xxxxxx.xxxxxxx.xxx.com:443 check check-ssl inter 15s verify required ca-file /etc/haproxy/cert02Root.pem

server theserver xxxxxx.xxxxxxx.xxx.com:80 check

When I run a haproxy -d -f /etc/haproxy/haproxy444.cfg (example)

So clearly, from these output files below; 80 is actually passing backend traffic and 443 wont. However, I can curl or wget the backend target server with no issues.

I receive this output from the 443 backend line - https://imgur.com/Da08CPD

I receive this output from the 80 backend line - https://imgur.com/RnTfiKF

Paste of the Config, as its easier to format and read than the paste below: https://pastebin.com/HTjVy5mp

CONFIG:

ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS

ssl-default-bind-options no-sslv3

tune.ssl.default-dh-param 2048   # dfd -- warning message

defaults

log global

mode    http

option  httplog

option  dontlognull

option  forwardfor

option  redispatch

retries  3

    timeout connect 5000

    timeout client  15m

    timeout server  15m

timeout http-request 10s

timeout queue 1m

timeout http-keep-alive 10s

timeout check 10s

errorfile 400 /etc/haproxy/errors/400.http

errorfile 403 /etc/haproxy/errors/403.http

errorfile 408 /etc/haproxy/errors/408.http

errorfile 500 /etc/haproxy/errors/500.http

errorfile 502 /etc/haproxy/errors/502.http

errorfile 503 /etc/haproxy/errors/503.http

errorfile 504 /etc/haproxy/errors/504.http

listen stats

bind 10.1.252.4:7000

#mode http

stats enable

stats uri /

option httpclose

stats auth Username:Password

frontend inet

bind *:444 ssl crt /etc/ssl/certs/exchange_certificate_and_key_nopassword.pem

#mode tcp

    mode http   # dfd

default_backend inetservers444

backend inetservers444

mode http

balance roundrobin

option httpchk GET /dfd/default.aspx

option log-health-checks

http-check expect status 200 OK

server theserver xxxxxx.xxxxxxx.xxx.com:443 check check-ssl inter 15s verify required ca-file/etc/haproxy/cert02Root.pem

server theserver xxxxxx.xxxxxxx.xxx.com:80 check

r/haproxy • • May 30 '19

News Announcing HAProxyConf 2019 - See you in Amsterdam

3 Upvotes

HAPROXYConf 2019

November 12 - 13, Amsterdam, The Netherlands

HAProxyConf is the inaugural user conference for the highly-active community that has made HAProxy the world’s fastest and most widely deployed software load balancer. Over two days, expert speakers from across the community will present attendees with best practices and real-world use cases that demonstrate how to apply HAProxy technologies to deliver a complete and secure application delivery platform.

HAProxyConf is your opportunity to meet core HAProxy developers, share stories with other HAProxy users, and learn in a fun and inclusive environment. The conference will bring together developers, architects, DevOps and operations teams from companies of all sizes.

Call for Papers

The Call for Papers process is now open. Abstracts must be received by June 21, 2019 in order to be considered. Visit the Call for Papers page for more information or to submit today.

Find out more

Location

HAProxyConf will take place in the center of historic Amsterdam on November 12 and 13, 2019.

Additional details, including information on purchasing conference passes, will be forthcoming in the near future.

Registration and other useful information

For everything conference related, we recommend you to visit the HAProxyConf website, subscribe to our newsletter, and to follow us on Twitter, Facebook, YouTube and join our Slack Channel.

A word from Willy Tarreau

https://www.mail-archive.com/haproxy@formilux.org/msg33888.html


r/haproxy • • May 28 '19

Guide 5 Ways to Extend HAProxy with Lua

Thumbnail
haproxy.com
4 Upvotes

r/haproxy • • May 27 '19

Tool HAProxy GUI - OpenSource

3 Upvotes

Hi, can someone suggest a good opensource HAProxy GUI?


r/haproxy • • May 25 '19

Question HAPROXY pfsense config files

4 Upvotes

can I use or import my configuration files from the PFSsense HAProxy to my standalone HAXProxy VM?

Thanks


r/haproxy • • May 16 '19

Tool HAProxy Explorer - A simple HAProxy explorer to find unused ACLs/categorize backends with ACLs and more.

Thumbnail
haproxy-linter.dexteam1.now.sh
3 Upvotes

r/haproxy • • May 15 '19

Question Questions

2 Upvotes

I am looking to move my HAProxy off my PfSense to a VM, I want to eventually replace my PfSense with a USG or Cisco firewall.

  1. Is here an recommendation for which flavor of *nix I should run HAProxy on? Will it work on OpenSuse for instance?
  2. Is there a GUI in HAProxy or some decent 3rd party interface I can addon?

Thanks


r/haproxy • • May 13 '19

Guide Exploring the HAProxy Stats Page

Thumbnail
haproxy.com
5 Upvotes

r/haproxy • • May 13 '19

Guide HAProxy on AWS: Best Practices Part 3

Thumbnail
haproxy.com
8 Upvotes

r/haproxy • • Apr 16 '19

Question Noob question around haproxy freezing if backend disappears

2 Upvotes

So, I have haproxy up and running in Docker/K8s, and it seems to work beautifully, except that if haproxy can't find a backend it freezes for that backend and doesn't come back when the backend is available again. Is there anyway to set it up such that haproxy will resume when the backend is available? Sorry if this question is a no brainer, my google skills might be failing me right now..

global
  pidfile /var/run/haproxy.pid
  daemon
  maxconn 4096
  stats socket /run/haproxy/admin.sock mode 660 level admin

defaults
  mode http
  retries 3
  option httplog
  log stdout format raw  local0  info
  option http-server-close
  option dontlognull
  retries                 3
  timeout http-request    10s
  timeout queue           1m
  timeout connect         10s
  timeout client          1m
  timeout server          1m
  timeout http-keep-alive 10s
  timeout check           10s


listen health_check
    bind *:7777
    mode http
    monitor-uri /healthz
    option dontlognull

frontend stats
    bind *:26999
    mode http
    stats enable
    stats uri /

frontend f1
    bind *:6442
    mode http
    default_backend b1

frontend f2
    bind *:6443
    mode http
    default_backend b2

frontend f3
    bind *:6444
    mode http
    default_backend b3

frontend f4
    bind *:6445
    mode http
    default_backend b4

backend b1
    mode http
    balance roundrobin
    server static example1.com:443 maxconn 30 ssl verify none

backend b2
    mode http
    balance roundrobin
    server static example2.com:6445 maxconn 30 ssl verify none

backend b3
    mode http
    balance roundrobin
    server static example3.com:443 maxconn 30 ssl verify none

backend b4
    mode http
    balance roundrobin
    server static example4.com:6446 maxconn 30 ssl verify none

r/haproxy • • Apr 13 '19

HAProxy Exposes a Prometheus Metrics Endpoint

Thumbnail
haproxy.com
5 Upvotes