I'm probably out of place saying this, as is not my thread, but should't this discussion go to another thread and leave this one for it's original purpose? It has branched off now to "how can I enable TLS on my website", from "how can I log the client ip not the proxy ip on the backend webserver" and "how do I use proxy_protocol".What do you think?
It seems that it is the same issue as This threadI have the same issue after update and reboot.For temporary fix, edit the VIP, save without any changes, then apply.You will able to start HAProxy again.
global uid 80 gid 80 chroot /var/haproxy daemon stats socket /var/run/haproxy.socket group proxy mode 775 level admin nbproc 1 nbthread 4 hard-stop-after 60s no strict-limits maxconn 10000 tune.ssl.default-dh-param 4096 spread-checks 2 tune.bufsize 16384 tune.lua.maxmem 0 log /var/run/log local0 info lua-prepend-path /tmp/haproxy/lua/?.luadefaults log global option redispatch -1 timeout client 30s timeout connect 30s timeout server 30s retries 3 default-server init-addr last,libc# Frontend: 0_SNI_frontend ()frontend 0_SNI_frontend bind website.com:443 name website.com:443 bind website.com:80 name website.com:80 mode tcp default_backend SSL_backend timeout client 30s# Frontend: 1_HTTP_frontend ()frontend 1_HTTP_frontend bind 10.10.10.1:80 name 10.10.10.1:80 accept-proxy mode http option http-keep-alive option forwardfor timeout client 30s # ACL: NoSSL_cond acl acl_62548efaf067e6.21908045 req.ssl_ver gt 0 # ACTION: HTTPupgrade_rule http-request redirect scheme https if !acl_62548efaf067e6.21908045# Frontend: 1_HTTPS_frontend ()frontend 1_HTTPS_frontend http-response set-header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" bind 10.10.10.1:443 name 10.10.10.1:443 accept-proxy ssl ssl-min-ver TLSv1.3 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-ECDSA-AES128-SHA256 ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 alpn h2,http/1.1 crt-list /tmp/haproxy/ssl/62549082216928.65241361.certlist mode http option http-keep-alive option forwardfor timeout client 30s # ACTION: PUBLIC_SUBDOMAINS_map_rule # NOTE: actions with no ACLs/conditions will always match use_backend %[req.hdr(host),lower,map_dom(/tmp/haproxy/mapfiles/62548f2d97ef05.80304462.txt)] # Backend: club_backend ()backend club_backendwebsite.com mode http balance source # stickiness stick-table type ip size 50k expire 30m stick on src timeout connect 30s timeout server 30s http-reuse safe server club_host 10.0.0.94:3000 ssl verify none# Backend: SSL_backend ()backend SSL_backendwebsite.com mode tcp balance source # stickiness stick-table type ip size 50k expire 30m stick on src timeout connect 30s timeout server 30s server SSL_host 10.10.10.1 send-proxy-v2 check-send-proxy
This technique will only work when using mode http because it redirects at the HTTP layer using a 302 Found HTTP response status, which is known as a temporary redirect. Once you’re fully committed to using HTTPS and have tested it thoroughly on your website, you may wish to instruct the browser to cache the redirect, which will save one round trip between the browser and HAProxy, speeding up page load times. Set the code parameter to 301 to send a 301 Moved Permanently status back, which browsers can cache:
# Backend: SSL_backend ()backend SSL_backendwebsite.com mode tcp
# Backend: club_backend ()backend club_backendwebsite.com mode http
2022-04-13T18:53:42 php AcmeClient: running automation (configd): Restart HAProxy2022-04-13T18:53:42 php AcmeClient: running automations for certificate: *.example.com2022-04-13T18:53:42 opnsense AcmeClient: updated ACME X.509 certificate: *.example.com2022-04-13T18:53:42 opnsense AcmeClient: successfully issued/renewed certificate: *.example.com2022-04-13T18:51:27 opnsense AcmeClient: using challenge type: CloudFlare_DNS-012022-04-13T18:51:27 opnsense AcmeClient: account is registered: example.com2022-04-13T18:51:27 opnsense AcmeClient: using CA: letsencrypt2022-04-13T18:51:27 opnsense AcmeClient: issue certificate: *.example.com
## Automatically generated configuration.# Do not edit this file manually.#global uid 80 gid 80 chroot /var/haproxy daemon stats socket /var/run/haproxy.socket group proxy mode 775 level admin nbproc 1 nbthread 2 hard-stop-after 60s no strict-limits maxconn 10000 tune.ssl.default-dh-param 4096 spread-checks 2 tune.bufsize 16384 tune.lua.maxmem 0 log /var/run/log local0 info lua-prepend-path /tmp/haproxy/lua/?.luadefaults log global option redispatch -1 maxconn 5000 timeout client 30s timeout connect 30s timeout server 30s retries 3 default-server init-addr last,libc# autogenerated entries for ACLs# autogenerated entries for config in backends/frontends# autogenerated entries for stats# Frontend: 0_SNI_frontend (Listening on 0.0.0:80, 0.0.0.0:443)frontend 0_SNI_frontend bind 0.0.0.0:443 name 0.0.0.0:443 bind 0.0.0.0:80 name 0.0.0.0:80 mode tcp default_backend SSL_backend # tuning options timeout client 30s # logging options# Frontend: 1_HTTP_frontend (Listening on 192.168.64.1:80)frontend 1_HTTP_frontend bind 192.168.64.1:80 name 192.168.64.1:80 accept-proxy mode http option http-keep-alive option forwardfor # tuning options timeout client 30s # logging options # ACL: NoSSL_condition acl acl_62565b172acae6.05588153 req.ssl_ver gt 0 # ACTION: HTTPtoHTTPS_rule http-request redirect scheme https code 301 if !acl_62565b172acae6.05588153# Frontend: 1_HTTPS_frontend (Listening on 192.168.64.1:443)frontend 1_HTTPS_frontend http-response set-header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" bind 192.168.64.1:443 name 192.168.64.1:443 accept-proxy ssl curves secp384r1 no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES256-GCM-SHA384 ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 alpn h2,http/1.1 crt-list /tmp/haproxy/ssl/62565eb5d0ff12.02152772.certlist mode http option http-keep-alive option forwardfor # tuning options timeout client 30s # logging options # ACTION: PUBLIC_SUBDOMAINS_map-rule # NOTE: actions with no ACLs/conditions will always match use_backend %[req.hdr(host),lower,map_dom(/tmp/haproxy/mapfiles/62565c00b116b3.27816426.txt)] # Backend: SSL_backend ()backend SSL_backend # 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 SSL_server 192.168.64.1 send-proxy-v2 check-send-proxy# Backend: MineOS_backend ()backend MineOS_backend # 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 http-reuse safe server MineOS_server 192.168.1.103:8443 ssl verify none
0_SNI_frontend > Listen Addresses:0.0.0.0:80, 0.0.0.0:443should this need to be the Virtual IP as opnsense runs on 192.168.1.1^^fyi thankyou for the tips on tracing
/firewall_virtual_ip.php: The command `/sbin/ifconfig 'lo0' inet '192.168.64.1' -alias' failed to execute