## Automatically generated configuration.# Do not edit this file manually.global # NOTE: Could be a security issue, but required for some feature. uid 80 gid 80 chroot /var/haproxy daemon stats socket /var/run/haproxy.socket level admin nbproc 1 tune.ssl.default-dh-param 1024 spread-checks 0 tune.chksize 16384 tune.bufsize 16384 tune.lua.maxmem 0 log /var/run/log local0 info ssl-default-bind-options no-sslv3 no-tlsv10 no-tls-tickets ssl-default-bind-ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256defaults log global option redispatch -1 timeout client 30s timeout connect 30s timeout server 30s retries 3# Frontend: PROXY_DISPATCHER (http domain dispatcher)frontend PROXY_DISPATCHER bind 192.168.10.10:80 name 192.168.10.10:80 mode http option http-keep-alive # tuning options timeout client 30s # logging options # ACL: remote_xyz acl acl_5ea7241e265c45.35734629 hdr_sub(host) -i remote.xyz.com # ACTION: RULE_xyz use_backend xyz_Server_POOL if acl_5ea7241e265c45.35734629 # ACL: zz_xyz_de acl acl_5ea724a3355897.03132566 hdr_sub(host) -i zz.xyz.de # ACTION: RULE_zz_Public use_backend zz_Public_Webserver_POOL if acl_5ea724a3355897.03132566# Frontend: PROXY_DISPATCHER_SSL (https domain dispatcher)frontend PROXY_DISPATCHER_SSL bind 192.168.10.10:443 name 192.168.10.10:443 mode tcp # tuning options timeout client 30s # logging options # ACL: zz_xyz_de_SSL acl acl_5eab1d24347657.98217236 req.ssl_sni -m sub -i zz.xyz.de # ACTION: RULE_zz_Public_SSL use_backend zz_Public_Webserver_POOL_SSL if acl_5eab1d24347657.98217236 # ACL: remote_xyz_SSL acl acl_5eab1d00637479.15142847 req.ssl_sni -m sub -i remote.xyz.com # ACTION: RULE_xyz_SSL use_backend xyz_Server_POOL_SSL if acl_5eab1d00637479.15142847 # WARNING: pass through options below this line tcp-request inspect-delay 10s# Backend: xyz_Server_POOL ()backend xyz_Server_POOL # health checking is DISABLED mode http balance source # stickiness stick-table type ip size 50k expire 30m stick on src # tuning options timeout connect 30s timeout server 30s server xyz_Server 192.168.112.105:80 # Backend: zz_Public_Webserver_POOL ()backend zz_Public_Webserver_POOL # health checking is DISABLED mode http balance source # stickiness stick-table type ip size 50k expire 30m stick on src # tuning options timeout connect 30s timeout server 30s server zz_Ubuntu01 192.168.112.111:80 # Backend: xyz_Server_POOL_SSL ()backend xyz_Server_POOL_SSL # health checking is DISABLED mode tcp balance source # stickiness stick-table type ip size 50k expire 30m stick on src # tuning options timeout connect 30s timeout server 30s server xyz_Server_SSL 192.168.112.105:443 # Backend: zz_Public_Webserver_POOL_SSL ()backend zz_Public_Webserver_POOL_SSL # health checking is DISABLED mode tcp balance source # stickiness stick-table type ip size 50k expire 30m stick on src # tuning options timeout connect 30s timeout server 30s server zz_Ubuntu01_SSL 192.168.112.111:443 # statistics are DISABLED
@cmdr.adama: Thanks for your reply .I'm using Apache webservers. I'm going to check the error log of the server, maybe I can find some hint.How can I implement the second way "Choose a server using SNI: aka SSL routing" in combination with OpnSense when it's not possible to edit the config file directly?Is there any way to get a detail debug log out of HaProxy running on opnSense?
[ssl:info] [pid 23392] [client 192.168.xx.xxx:23800] AH01964: Connection to child 2 established (server localhost:443)[ssl:info] [pid 23392] [client 192.168.xx.xxx:23800] AH02008: SSL library error 1 in handshake (server localhost:443)[ssl:info] [pid 23392] SSL Library Error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number[ssl:info] [pid 23392] [client 192.168.xx.xxx:23800] AH01998: Connection closed to child 2 with abortive shutdown (server localhost:443)
EDIT:To check this theory I have disabled the proxy in the backendpool and now it works But one thing is an open question: Is it possible to make the request client IP transparent to the webserver, at the moment there is only the opnsense IP in the apache Logs for the request of all clients (thats pretty clear to me why this is the case, but is there a possibility for a work around?).
Now I have played a bit with the configuration and haproxy is selecting the right backend (but I have no clue wich setting change did this effect ). One step ahead...