[WARNING] (51339) : Proxy '1_HTTP_frontend': L6 sample fetches ignored on HTTP proxies (declared at /usr/local/etc/haproxy.conf.staging:69).Warnings were found.Configuration file is valid
# 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_629f48c6073c95.86527303 req.ssl_ver gt 0 # ACTION: HTTPtoHTTPS_rule http-request redirect scheme https code 301 if !acl_629f48c6073c95.86527303
# logging options # ACL: NoSSL_condition- acl acl_629f48c6073c95.86527303 req.ssl_ver gt 0+ acl acl_629f48c6073c95.86527303 ssl_fc # ACTION: HTTPtoHTTPS_rule http-request redirect scheme https code 301 if !acl_629f48c6073c95.86527303
The issue seems to be the NoSSL_condition. The suggested solution is to replace the condition type from Traffic is SSL (TCP request content inspection) to Traffic is SSL (locally deciphered):Code: [Select] # logging options # ACL: NoSSL_condition- acl acl_629f48c6073c95.86527303 req.ssl_ver gt 0+ acl acl_629f48c6073c95.86527303 ssl_fc # ACTION: HTTPtoHTTPS_rule http-request redirect scheme https code 301 if !acl_629f48c6073c95.86527303When doing so, the warning is gone. However, this is the first time I'm using HAProxy and I don't really know what I'm doing, so I wanted to check-in with you guys to ensure my solution is correct?If so, I'd appreciate if you updated the screenshot in step 5.7 @TheHellSite
## 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 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 maxconn 5000 timeout client 30s timeout connect 30s timeout server 30s retries 3 default-server init-addr last,libc default-server maxconn 5000# autogenerated entries for ACLs# autogenerated entries for config in backends/frontends# autogenerated entries for stats# Frontend: 0_SNI_frontend (Listening on 0.0.0.0:80, 0.0.0.0:443)frontend 0_SNI_frontend bind 0.0.0.0:80 name 0.0.0.0:80 bind 0.0.0.0:443 name 0.0.0.0:443 mode tcp default_backend SSL_backend # tuning options timeout client 30s # logging options# Frontend: 1_HTTP_frontend (Listening on 127.4.4.3:80)frontend 1_HTTP_frontend bind 127.4.4.3:80 name 127.4.4.3:80 accept-proxy mode http option http-keep-alive option forwardfor # tuning options timeout client 30s # logging options # ACL: NoSSL_condition acl acl_62a76f360f0732.68695084 ssl_fc # ACTION: HTTPtoHTTPS_rule http-request redirect scheme https code 301 if !acl_62a76f360f0732.68695084# Frontend: 2_HTTPS_frontend (Listening on 127.4.4.3:443)frontend 2_HTTPS_frontend http-response set-header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" bind 127.4.4.3:443 name 127.4.4.3:443 accept-proxy ssl curves secp384r1 no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets no-tlsv12 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/62a772caaae308.49400660.certlist mode http option http-keep-alive option forwardfor # tuning options timeout client 15m # 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/62a76fbf29df39.71162057.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 127.4.4.3 send-proxy-v2 check-send-proxy# Backend: Nextcloud_backend ()backend Nextcloud_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 Nextcloud 192.168.10.40:443 ssl verify none
#public access subdomainsnextcloud NEXTCLOUD_backend
Informational haproxy 192.168.10.101:4054 [14/Jun/2022:11:11:05.082] 2_HTTPS_frontend/127.4.4.3:443: SSL handshake failure
Hello,I just recently upgraded my home network with an opnsense and want to reconfigure some stuff in the same run.Luckily I found this tutorial which was really easy to follow through, especally because of the screenshots :-)Sadly I must have done something wrong but I can't put my finger on it. When I try to access from internal LAN (IP address or Name), I get the following error:Firefox:SSL_ERROR_RX_RECORD_TOO_LONGEdge:ERR_SSL_PROTOCOL_ERRORFrom external (via mobile data):503 Service UnavailableIf I enter http://IP_ADRESS then it opens the Nextcloud Login page but after entering the login data, it switches to https:// and the error appears.HAProxy configCode: [Select]## 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 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 maxconn 5000 timeout client 30s timeout connect 30s timeout server 30s retries 3 default-server init-addr last,libc default-server maxconn 5000# autogenerated entries for ACLs# autogenerated entries for config in backends/frontends# autogenerated entries for stats# Frontend: 0_SNI_frontend (Listening on 0.0.0.0:80, 0.0.0.0:443)frontend 0_SNI_frontend bind 0.0.0.0:80 name 0.0.0.0:80 bind 0.0.0.0:443 name 0.0.0.0:443 mode tcp default_backend SSL_backend # tuning options timeout client 30s # logging options# Frontend: 1_HTTP_frontend (Listening on 127.4.4.3:80)frontend 1_HTTP_frontend bind 127.4.4.3:80 name 127.4.4.3:80 accept-proxy mode http option http-keep-alive option forwardfor # tuning options timeout client 30s # logging options # ACL: NoSSL_condition acl acl_62a76f360f0732.68695084 ssl_fc # ACTION: HTTPtoHTTPS_rule http-request redirect scheme https code 301 if !acl_62a76f360f0732.68695084# Frontend: 2_HTTPS_frontend (Listening on 127.4.4.3:443)frontend 2_HTTPS_frontend http-response set-header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" bind 127.4.4.3:443 name 127.4.4.3:443 accept-proxy ssl curves secp384r1 no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets no-tlsv12 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/62a772caaae308.49400660.certlist mode http option http-keep-alive option forwardfor # tuning options timeout client 15m # 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/62a76fbf29df39.71162057.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 127.4.4.3 send-proxy-v2 check-send-proxy# Backend: Nextcloud_backend ()backend Nextcloud_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 Nextcloud 192.168.10.40:443 ssl verify noneMap filesCode: [Select]#public access subdomainsnextcloud NEXTCLOUD_backendLog filesCode: [Select]Informational haproxy 192.168.10.101:4054 [14/Jun/2022:11:11:05.082] 2_HTTPS_frontend/127.4.4.3:443: SSL handshake failureMy Network:ISP --> Modem --> OPNSense --> Proxmox --> Server 1 NextcloudMaybe you can push me in the right direction :-)
A TLS-compliant application MUST implement the TLS_AES_128_GCM_SHA256 [GCM] cipher suite and SHOULD implement the TLS_AES_256_GCM_SHA384 [GCM] and TLS_CHACHA20_POLY1305_SHA256 [RFC8439] cipher suites (see Appendix B.4).
Firefox vertraut dieser Website nicht, weil das von der Website verwendete Zertifikat nicht für DOMAIN.dedyn.io gilt. Das Zertifikat ist nur gültig für *.DOMAIN.dedyn.io.SSL_ERROR_BAD_CERT_DOMAIN
When I try to access from internal LAN (IP address or Name), I get the following error:Firefox:SSL_ERROR_RX_RECORD_TOO_LONGEdge:ERR_SSL_PROTOCOL_ERROR
internal LAN (IP address or Name)
If I enter http://IP_ADRESS then it opens the Nextcloud Login page but after entering the login data, it switches to https:// and the error appears.
My Network:ISP --> Modem --> OPNSense --> Proxmox --> Server 1 Nextcloud
Thanks for your input. I changed the cipher accordingly to https://ssl-config.mozilla.org/#server=haproxy&version=2.1&config=modern&openssl=1.1.1d&guideline=5.6 and also applied your rule but still no success.I am just curios because in the main post the value TLS_AES_128_GCM_SHA256 is also left out
Out of curiosity I tried do enter the only the main domain DOMAIN.dedyn.io and not SUBDOMAIN.DOMAIN.dedyn.io. Then I get a different error QuoteFirefox vertraut dieser Website nicht, weil das von der Website verwendete Zertifikat nicht für DOMAIN.dedyn.io gilt. Das Zertifikat ist nur gültig für *.DOMAIN.dedyn.io.SSL_ERROR_BAD_CERT_DOMAINI can accept the risk but this is something I need to do on all devices...Could the problem be that I already had DynDNS by another provider and LE certificate? If yes how can I revoke it?
# currently configuredCommon Name = *.DOMAIN.dedyn.io# what you MIGHT wantCommon Name = DOMAIN.dedyn.ioAlt Names = *.DOMAIN.dedyn.io
Since you are forcing HAProxy to use TLS 1.3. (As you use no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets no-tlsv12)There might be issue taking out TLS_AES_128_GCM_SHA256.According to RFC 8446, S9.1QuoteA TLS-compliant application MUST implement the TLS_AES_128_GCM_SHA256 [GCM] cipher suite and SHOULD implement the TLS_AES_256_GCM_SHA384 [GCM] and TLS_CHACHA20_POLY1305_SHA256 [RFC8439] cipher suites (see Appendix B.4).
Quote from: PaulePils on June 14, 2022, 11:41:40 amWhen I try to access from internal LAN (IP address or Name), I get the following error:Firefox:SSL_ERROR_RX_RECORD_TOO_LONGEdge:ERR_SSL_PROTOCOL_ERRORThis error usually means that you tried to access a service using HTTPS that only supports HTTP.
Quoteinternal LAN (IP address or Name)What do you mean by that? You should use the FQDN and not the local hostname / IP in order to use the reverse proxy (HAProxy).
Quote from: PaulePils on June 14, 2022, 11:41:40 amIf I enter http://IP_ADRESS then it opens the Nextcloud Login page but after entering the login data, it switches to https:// and the error appears.Again, which IP are you entering? The nextcloud local IP or your public IP?Your public IP should ALWAYS forward HTTP to HTTPS and not display any webpages via HTTP whatsoever! (HTTPtoHTTPS_rule)
Quote from: PaulePils on June 14, 2022, 11:41:40 amMy Network:ISP --> Modem --> OPNSense --> Proxmox --> Server 1 NextcloudIs the firewall in your modem disabled or is it still doing NAT?
Quote from: PaulePils on June 15, 2022, 11:26:53 amThanks for your input. I changed the cipher accordingly to https://ssl-config.mozilla.org/#server=haproxy&version=2.1&config=modern&openssl=1.1.1d&guideline=5.6 and also applied your rule but still no success.I am just curios because in the main post the value TLS_AES_128_GCM_SHA256 is also left out QuoteYou won't need any 128 bit ciphers unless you are using very very old devices to access your services which I highly doubt since you only want to enable TLS v1.3 anyway.So you can safely use the cipher suites in my first post which are identical to the ones from the Mozilla SSL configurator but have the "insecure / weak" 128 bit ciphers removed.
You won't need any 128 bit ciphers unless you are using very very old devices to access your services which I highly doubt since you only want to enable TLS v1.3 anyway.So you can safely use the cipher suites in my first post which are identical to the ones from the Mozilla SSL configurator but have the "insecure / weak" 128 bit ciphers removed.
Quote from: PaulePils on June 15, 2022, 11:26:53 amOut of curiosity I tried do enter the only the main domain DOMAIN.dedyn.io and not SUBDOMAIN.DOMAIN.dedyn.io. Then I get a different error QuoteFirefox vertraut dieser Website nicht, weil das von der Website verwendete Zertifikat nicht für DOMAIN.dedyn.io gilt. Das Zertifikat ist nur gültig für *.DOMAIN.dedyn.io.SSL_ERROR_BAD_CERT_DOMAINI can accept the risk but this is something I need to do on all devices...Could the problem be that I already had DynDNS by another provider and LE certificate? If yes how can I revoke it?Well, the error is pretty much self-explanatory isn't it?In my tutorial the wildcard certificate is only valid for the 2nd-level subdomains "*.DOMAIN.dedyn.io" but not for the 1st-level subdomain "DOMAIN.dedyn.io" itself.If you want the certificate to also cover for "domain.dedyn.io" then you will have to change the certificate in the ACME client to match that. See Part 3 - Step 6.You will however only need this if you are serving a website in the domain root without "www" infront of it.Code: [Select]# currently configuredCommon Name = *.DOMAIN.dedyn.io# what you MIGHT wantCommon Name = DOMAIN.dedyn.ioAlt Names = *.DOMAIN.dedyn.ioThis will cover the 1st-level subdomain including all 2nd-level subdomains.Don't forget to reissue the certificate.
Quote from: TheHellSite on June 15, 2022, 03:15:28 pmQuote from: PaulePils on June 14, 2022, 11:41:40 amWhen I try to access from internal LAN (IP address or Name), I get the following error:Firefox:SSL_ERROR_RX_RECORD_TOO_LONGEdge:ERR_SSL_PROTOCOL_ERRORThis error usually means that you tried to access a service using HTTPS that only supports HTTP.Does this mean I need an additional vhost config for the Nextcloud? One for :80 and one for :443? But the certificate lies on a different machine (opnsense). How can I point it there? Or am I missing something?By deleting the "overwirte" codes in the nextcloud config I at least got access in my internal LAN. I assume the HAProxy config is correct and I need to make corrections in the nextcloud config.
server Nextcloud 192.168.10.40:443 ssl verify none
Hi! First off, i want to thank you for the detailed guide you posted. I am new to HAProxy and have some questions regarding some configs, do you still reply to this post? or should i ask or open another thread somewhere? Thanks!
## Automatically generated configuration.# Do not edit this file manually.### NOTE: HAProxy is currently DISABLED#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 maxconn 5000 timeout client 30s timeout connect 30s timeout server 30s retries 3 default-server init-addr libc,last default-server maxconn 5000# autogenerated entries for ACLs# autogenerated entries for config in backends/frontends# autogenerated entries for stats# Frontend: SNI_frontend (Listening on ip:80 / ip:443)frontend SNI_frontend bind 0.0.0.0:80 name 0.0.0.0:80 bind 0.0.0.0:443 name 0.0.0.0:443 bind :::80 name :::80 bind :::443 name :::443 mode tcp default_backend SSL_Backend # tuning options timeout client 30s # logging options# Frontend: HTTP_frontend (Listening on 127.10.20.5)frontend HTTP_frontend bind (myloopbackip):80 name (myloopbackip):80 accept-proxy bind :::80 name :::80 accept-proxy mode http option http-keep-alive option forwardfor # tuning options timeout client 30s # logging options # ACL: NoSSL_Condition acl acl_62aa8dcf894a87.42381056 ssl_fc # ACTION: HTTPtoHTTPS http-request redirect scheme https code 301 if !acl_62aa8dcf894a87.42381056# Frontend: HTTPS_frontend (Listening on (myloopbackip))frontend HTTPS_frontend http-response set-header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" bind (myloopbackip):443 name (myloopbackip):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/62aad04a028639.71957640.certlist bind :::443 name :::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/62aad04a028639.71957640.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/62aa8e31993357.88056717.txt)] # WARNING: pass through options below this line http-request set-header X-Forwarded-Proto https if { ssl_fc }# 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 (myloopbackip) send-proxy-v2 check-send-proxy# Backend (DISABLED): router_Backend (router Backend)# Backend: truenas_Backend (truenas Backend)backend truenas_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 # WARNING: pass through options below this line http-request set-header X-Forwarded-Proto https if { ssl_fc } http-reuse safe server truenas truenasip:443 ssl sni str(truenas) verify none send-proxy-v2 check-send-proxy# Backend: plex_backend (plex Backend)backend plex_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 Plex truenasip:32400 send-proxy-v2 check-send-proxy
# public access domainstruenas truenas_backendplex plex_backend
I've followed the article and able to setup few subdomain to internal machines in my network. I have dumb questions... when I created new real server and backend server for one my Synology packages, I initially used HTTPS port and received 400 bad request error The plain HTTP request was sent to HTTPS portWhen I changed the port in real server settings to HTTP request, everything worked fine and I am able to access the internal server with SSL certificate. Why?