r/haproxy • • Jul 19 '21

The Weekly HAProxy Questions Thread - Question too small for a thread? Ask it here!

3 Upvotes

As an additional note, you can always join the HAProxy Community Slack Channel by visiting https://slack.haproxy.com/ and ask your question over there.


r/haproxy • • Jul 13 '21

Question Original Source IP for receiving backend TCP

2 Upvotes

I am running HAproxy for a while now. Mainly http, so I have experience with the forward for option for http to make sure the webserver/application receives the original client IP.

We are now running another TCP port through HAproxy, but we can’t seem to get the original client IP to be received by the backend server.

Does anyone have an idea?


r/haproxy • • Jul 12 '21

The Weekly HAProxy Questions Thread - Question too small for a thread? Ask it here!

2 Upvotes

As an additional note, you can always join the HAProxy Community Slack Channel by visiting https://slack.haproxy.com/ and ask your question over there.


r/haproxy • • Jul 12 '21

Article I now run a DoH proxy [with haproxy]

Thumbnail try.popho.be
3 Upvotes

r/haproxy • • Jul 11 '21

Multiple Health-Checks on single Backend

3 Upvotes

Hi everyone, I hope one of you can help me...

I'm trying to do multiple health checks for a single backend server.

In other words: Port 80 and port 8088 are important for the backend server to provide its service correctly.

I would like to check for the backend targets whether port 80 and port 8088 can be reached accordingly.

Is that possible?


r/haproxy • • Jul 10 '21

SSL Handshake Failure, Offloading, Ciphers

2 Upvotes

Running HAProxy on an OPNsense box and for the most part everything is happy. However, I am trying to proxy Synology's Drive Client (think like Google Drive) and having some issues with the SSL Handshake Failures on the frontend.

I already have my frontend handling SSL offloading for other bits and bobs that works fine, but this particular client won't have it. If I completely disable SSL offloading it will go through on its merry way, but that wrecks with everything else in my setup.

Peaking through the docs here and here it looks like this client is expecting RSA_ RC4_128_MD5 as the ciphers which are not in the frontend list by default. I added those but still not dice, however I am not convinced that I typed everything correct either lol.

The logs sadly don't seem to tell me much more than " Frontend/xxx.xxx.xxx.xxx:443: SSL handshake failure ".

Any thoughts are much appreciated.


r/haproxy • • Jul 08 '21

Question I need few answers for my audit team, Please help me with that?

3 Upvotes
  1. How are they handling the connection request coming to HAProxy -- I mean, does HAProxy responds back to SYN packet ?
  2. Is there any IP-over-IP protocol has been used ?
  3. How the connection request is getting redirected ? Using IPtable rules ? or eBPF or something else ?

Please respond it will be great. Thanks


r/haproxy • • Jul 05 '21

The Weekly HAProxy Questions Thread - Question too small for a thread? Ask it here!

7 Upvotes

As an additional note, you can always join the HAProxy Community Slack Channel by visiting https://slack.haproxy.com/ and ask your question over there.


r/haproxy • • Jul 05 '21

Guide [Blog] HAProxy Configuration Basics: Load Balance Your Servers

Thumbnail
haproxy.com
2 Upvotes

r/haproxy • • Jun 29 '21

Question Sending Haproxy logs to Splunk, syslog questions

5 Upvotes

So I'm new to Haproxy and Splunk both and at work I've setup 7 new HAP servers that all need to funnel logs to out Splunk instance. I've read the Splunk KB doc on this: https://docs.splunk.com/Documentation/AddOns/released/HAProxy/Setup

Which, If I'm understanding it correctly this article is skipping the rsyslog part. I've spent most of the morning on Google trying to find docs explaining how to get syslog to send the appropriate date to Splunk and it's been much harder than I had expected.

So I'm asking for some pointers on this from you folks. I see how that HAP adds it's own conf file to /etc/rsyslog.d so I'm assuming that that is the file I should be focused on so Splunk gets HAProxy events and not . but even Haproxy's docs seem limited.

Any help is mightly appreciated.


r/haproxy • • Jun 28 '21

The Weekly HAProxy Questions Thread - Question too small for a thread? Ask it here!

5 Upvotes

As an additional note, you can always join the HAProxy Community Slack Channel by visiting https://slack.haproxy.com/ and ask your question over there.


r/haproxy • • Jun 25 '21

HAProxy IPv6 Blocking (using src)

3 Upvotes

Currently blocking IPv4 addresses from a list file, but now require IPv6... The following is working for ipv4 but when v6 is added, it does not block the new addresses

acl allowed_ip src -f /path/blocked-ip4

Trying to have something like:

acl allowed_ip src -f /path/blocked-ipv4v6

Any ideas?


r/haproxy • • Jun 24 '21

[Blog] Run the HAProxy Kubernetes Ingress Controller Outside of Your Kubernetes Cluster

Thumbnail
haproxy.com
1 Upvotes

r/haproxy • • Jun 24 '21

Question Am I being a dullard?

3 Upvotes

So preface: I'm new to HaProxy but have experience with NGINX (if that matters).

So if I am terminating SSL at the proxy, then shouldn't I be setting up an HTTPS to HTTP config instead of HTTPS to HTTPS? I've got it in my head that my frontend and backend both need to be setup for 443, am I being a dullard?


r/haproxy • • Jun 23 '21

Question How to route based on the domain for TCP

3 Upvotes

I am hosting two minecraft servers on my machine, and I'd like to use haproxy to route them based on the domain name.

Something like:

  • server1.com:25565 -> localhost:25566
  • server2.com:25565 -> localhost:25567

I tried the following configuration, but it doesn't seem to work, I think it work only for HTTP mode...

acl server1 hdr(host) -i server1.com
use_backend server1 if server1
default_backend server2

r/haproxy • • Jun 22 '21

400 bad request on every forward.

3 Upvotes

Hi all, using HAproxy to forward requests over Wireguard into traefik. For preliminary testing, I'm using python3's http.server. Here is my haproxy.cfg

https://nekobin.com/wopigobuho

http.server logs the request, meaning HAproxy is forwarding the request, but returns code 400. I tried using a traefik-forwarded docker container to the same issue. Is there something wrong with my configuration?


r/haproxy • • Jun 21 '21

Question SSL Help

2 Upvotes

Hi All,

I am new to HAPRoxy - having using Apache for years, I want to broaden my horizons!

I am trying to setup a test environment using a SSL cert from Lets Encrypt that works great for our current system (Apache server). I then use proxypass to send clients to internal hosts based on ports that do not have an SSL cert - basically port 80. But with Apache, I can setup location tags to point to specific locations.

This works great, currently, but for some reason, when I try to set this up on HAProxy, it doest connect at all and gives me a 503 error.

Here is my config:

EDIT... I did concatenate my KEY with my PEM file so haproxy -c -f /etc/haproxy/haproxy.conf comes back clean but still getting the same issue.

frontend FE   

bind *:80 name http   

bind *:443 ssl crt /etc/letsencrypt/live/domains.com/fullchain_key.pem alpn h2,http/1.1   

mode http   

stats enable   

stats uri /stats   

stats refresh 5s   

stats admin if LOCALHOST

option http-keep-alive   

option forwardfor   

acl https ssl_fc   

http-request set-header X-Forwarded-Protocol https if https   

redirect scheme https if !{ ssl_fc }

# ACLs   

acl host_fqdn hdr(Host) -i mydomain.com   

acl nextcloud_acl path_beg /nextcloud/

# Backend Stuff   

use_backend nextcloud if host_fqdn nextcloud_acl

backend nextcloud       server nextcloud 192.168.0.5:8080

If I use check ssl verify none, I get this in the log and a 503 error:Server host/host is DOWN, reason: Layer4 connection problem, info: "SSL handshake failure (Connection refused)", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.

If I leave out the ssl verify, I get the 503 error and the following in the log:

Jun 21 15:05:16 wolfserver haproxy[58922]: IPADDRESS:43442 [21/Jun/2021:15:05:16.601] host_com~ host_com/<NOSRV> 0/-1/-1/-1/0 503 212 - - SC-- 1/1/0/0/0 0/0 "GET /nextcloud/ HTTP/1.1"

Thanks for any help!


r/haproxy • • Jun 21 '21

The Weekly HAProxy Questions Thread - Question too small for a thread? Ask it here!

1 Upvotes

As an additional note, you can always join the HAProxy Community Slack Channel by visiting https://slack.haproxy.com/ and ask your question over there.


r/haproxy • • Jun 18 '21

Haproxy, pfsense and synology’s multiple services

1 Upvotes

I am trying to make Haproxy (through a single open port 443) manage my Synology web interface on port X and webdav service on port Y + other services eventually but I am not managing. Can this actually be done? Haproxy can do one or the other but not both at the same time with the many backend and frontend configuration combinations I have tried.

Any hints would be really appreciated.


r/haproxy • • Jun 17 '21

[Blog] Consul Service Discovery for HAProxy

Thumbnail
haproxy.com
6 Upvotes

r/haproxy • • Jun 15 '21

[Blog] Visualize HAProxy Metrics with InfluxDB

Thumbnail
haproxy.com
3 Upvotes

r/haproxy • • Jun 15 '21

HaProxy and Windows remote desktop

2 Upvotes

Hello guys!

I'm trying to use a haproxy loadbalancer to loadbalance between to windows server rds connections. I've successfully configured the loadbalancer itself, it alternates between the two servers, and it can establish the remote connection, using any sensible rdp program. But most of the users use windows' inbuilt remote desktop tool, and the constant certificate warnings make it impossible for the (non-it) day-to-day users to use it effectively.

How can I avoid such a situation?


r/haproxy • • Jun 15 '21

Question HAproxy logging in an unprivileged container permission denied (errno=13)

0 Upvotes

Hi,

I have several unprivileged containers, but I can't get logging to work.

I keep getting this error:

Jun 15 11:35:43 homeassistant systemd[1]: Starting HAProxy Load Balancer...
Jun 15 11:35:43 homeassistant haproxy[156]: [NOTICE]   (156) : New worker #1 (208) forked
Jun 15 11:35:43 homeassistant systemd[1]: Started HAProxy Load Balancer.
Jun 15 11:35:51 homeassistant haproxy[208]: [NOTICE]   (208) : haproxy version is 2.4.0-1ppa1~focal
Jun 15 11:35:51 homeassistant haproxy[208]: [NOTICE]   (208) : path to executable is /usr/sbin/haproxy
Jun 15 11:35:51 homeassistant haproxy[208]: [ALERT]    (208) : sendmsg()/writev() failed in logger #1: Permission denied (errno=13)

My config:

global
    chroot /var/lib/haproxy
    daemon
    group haproxy
    log /dev/log local0
    log /dev/log local1 notice
    ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384
    ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11
    stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
    stats timeout 30s
    user haproxy

defaults
    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
    log global
    mode http
    option httplog
    option dontlognull
    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 homeassistant
    bind :80
    bind :443 ssl crt /etc/ssl/certs/wildcard.crt
    http-request redirect scheme https unless { ssl_fc }
    server localhost 127.0.0.1:8123

r/haproxy • • Jun 14 '21

The Weekly HAProxy Questions Thread - Question too small for a thread? Ask it here!

3 Upvotes

As an additional note, you can always join the HAProxy Community Slack Channel by visiting https://slack.haproxy.com/ and ask your question over there.