Essentially my question was if I could bind the SNI front end internally to a custom port instead of the usual 80,443.
Hello,when I started implementing HAProxy in my network I couldn't find any complete and well written guide out there. I had to puzzle everything together from various websites.So I thought I would save many of you a lot of time and provide my ultimate HAProxy on OPNsense guide. This tutorial will show you how to configure HAProxy as a reverse proxy on OPNsense using wildcard certificates from Let's Encrypt.It is going to be a step-by-step guide with images on how to set things up while also explaining why we set things up in a certain way.I will try to make this as complete and detailed as possible.If you think that there is anything wrong or missing, feel free to tell me about it and I will consider changing it.If this guide was helpful to you then please leave me a thanks down below as it took me several days to write this down.Kind RegardsTheHellSite
Cipher List: ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305Cipher Suites: TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
After a couple of hours of tinkering with the ciphers, I figured out that the test doesn't like 128bit ciphers. So I removed those from the Cipher List (TLSv1.2) and Cipher Suites (TLSv1.3) of the HTTPS_frontend, and I finally got the A+ 100% score.In case anyone faces the same issue, these are the cipher settings for HTTPS_frontend:QuoteCipher List: ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305Cipher Suites: TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256Thanks again,Alessandro
My TutorialCipher List: ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES256-GCM-SHA384Cipher Suites: TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256yoursCipher List: ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305Cipher Suites: TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
Happy to hear it is working for you.I think you missed the part of my tutorial where I am giving needed ciphers and cipher suites to get an 100% A+ rating.
The only difference between my guide and your list is the "DHE-RSA-AES256-GCM-SHA384" cipher.Both will be scoring 100 % A+ while mine offer even more client compatibility.
Seems like I forgot to mention it again during tutorial at the part where the HTTPS_frontend is created. I now put a reference in there pointing to the beginning of my post where I provide the current best cipher list and cipher suits.
One thing I wanted to ask you: I followed your naming conventions and I noticed you had the 1_ prefix both for the HTTP and HTTPS frontend. I renamed the HTTPS to 2_HTTPS_frontend, don't know if it was intentional or not, but I interpreted it as a progressive number so that one was a 2.
I did that on purpose to express the "level" of reverse proxying.Level 1 - SNI trafficLevel 2 - HTTP + HTTPS trafficHowever you can name it as you like. It doesn't matter in terms of functionality.
Arguable! If you have many HTTPS frontends (on different ports) that might need different SSL settings then my way is better.Otherwise it doesn't really matter where you put the settings. Just note that the SSL default settings get overwritten once you set anything in the associated boxes on the HTTPS frontends.
## 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 maxconn 10000 tune.ssl.default-dh-param 4096 spread-checks 2 tune.chksize 16384 tune.bufsize 16384 tune.lua.maxmem 0 log /var/run/log audit debug 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 (DISABLED): LetsEncrypt_443 ()# Frontend (DISABLED): LetsEncrypt_80 ()# Frontend: 1_HTTP_frontend ()frontend 1_HTTP_frontend bind 127.0.0.1:80 name 127.0.0.1:80 accept-proxy mode http option http-keep-alive option forwardfor # tuning options timeout client 30s # logging options # ACL: NoSSL_condition acl acl_61a24897421141.86617043 req.ssl_ver gt 0 # ACTION: HTTPtoHTTPS_rule http-request redirect scheme https code 301 if !acl_61a24897421141.86617043# Frontend: 1_HTTPS_frontend ()frontend 1_HTTPS_frontend http-response set-header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" bind 127.0.0.1:443 name 127.0.0.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: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/61a24a78aa9cc4.11915455.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/61a249350142e3.01879320.txt)] # Frontend: 0_SNI_frontend ()frontend 0_SNI_frontend bind 0.0.0.0:443 name 0.0.0.0:443 accept-proxy bind 0.0.0.0:80 name 0.0.0.0:80 accept-proxy mode tcp default_backend SSL_backend # tuning options timeout client 30s # logging options# Backend: Mail ()backend Mail # 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 Main 192.168.111.2:443 ssl verify none# Backend (DISABLED): acme_challenge_backend (Added by Let's Encrypt plugin)# Backend: Nextcloud ()backend Nextcloud # 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.111.3:443 ssl verify none# 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.0.0.1 send-proxy-v2 check-send-proxy# Backend: Bitwarden_Backend ()backend Bitwarden_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 Vaultwarden80 192.168.111.77:80
Hello,what is wrong here?In Firefox I get the following error: PR_END_OF_FILE_ERROR
In Firefox I get the following error: PR_END_OF_FILE_ERROR