<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[HAProxy and meshcentral2 server ..... websockets]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">New user to pfsense, my first pfsense setup :)</p>
<p dir="auto">replaced draytek router with pfsense, and setup letsencrypt/haproxy as well as still running a local meshcentral server (previously with nginxmanager setup in docker)</p>
<p dir="auto">my meshcentral runs ok, and accessible remotely but external clients no longer detected in meshcentral, assume its websocket support missing from my backend in haproxy, seems issue is similar as this thread....</p>
<p dir="auto">https://forum.netgate.com/topic/158983/websockets-configuration-in-haproxy  ??</p>
<p dir="auto">just wondering what I need to type into "access control list" and "action" in backend config to get websocket support?</p>
<p dir="auto">Way above my head but the manual for meshcentral .... https://info.meshcentral.com/downloads/MeshCentral2/MeshCentral2UserGuide.pdf has following info for haproxy setup ......</p>
<p dir="auto">Thanks, Harry</p>
<hr />
<p dir="auto">This section covers a really simple configuration. HAProxy is capable of a lot more complex<br />
configurations. In the following example, HAProxy will perform TLS and forward the un-encrypted<br />
traffic to MeshCentral on port 444. HAProxy will add extra “X-Forwarded-Host” headers to the<br />
HTTP headers so that MeshCentral will know from the IP address the connection comes from.<br />
In the following configuration file, we have browser connections on port 80 being redirected to<br />
HTTPS port 443. We also have Let’s Encrypt cert bot for getting a real TLS certificate and<br />
“mesh.sample.com” being redirected to 127.0.0.1:444.<br />
37<br />
global<br />
log /dev/log local0<br />
log /dev/log local1 notice<br />
chroot /var/lib/haproxy<br />
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners<br />
stats timeout 30s<br />
user haproxy<br />
group haproxy<br />
daemon<br />
defaults<br />
log global<br />
mode http<br />
option httplog<br />
option dontlognull<br />
option forwardfor<br />
option http-server-close<br />
frontend http<br />
bind *:80<br />
redirect scheme https code 301 if !{ ssl_fc }<br />
frontend https<br />
bind *:443 ssl crt /etc/haproxy/cert.pem<br />
http-request add-header X-Forwarded-Proto https<br />
acl acmepath path_beg /.well-known/acme-challenge/<br />
acl meshcentralhost hdr(host) -i mesh.sample.com<br />
acl meshcentralhost hdr(host) -i mesh.sample.com:443<br />
use_backend acme if acmepath<br />
use_backend meshcentral if meshcentralhost<br />
backend acme<br />
server certbot localhost:54321<br />
backend meshcentral<br />
http-request add-header X-Forwarded-Host %[req.hdr(Host)]<br />
server meshcentral 127.0.0.1:444<br />
On the MeshCentral side, we are not going to use port 80 and need the main HTTPS port to not<br />
perform TLS and listen on port 444.<br />
{<br />
"settings": {<br />
"Cert": "myservername.domain.com"<br />
"Port": 444,<br />
"AliasPort": 443,<br />
"RedirPort": 0,<br />
"TlsOffload": "127.0.0.1"<br />
},<br />
"domains": {<br />
"": {<br />
"certUrl": "https://127.0.0.1:443/"<br />
}<br />
}<br />
}<br />
We also specify “127.0.0.1” in TLS offload since we want MeshCentral to make use of the X-<br />
Forwarded-Host header that is set by HAProxy.</p>
]]></description><link>https://forum.netgate.com/topic/167095/haproxy-and-meshcentral2-server-websockets</link><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 16:46:06 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/167095.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Oct 2021 16:20:26 GMT</pubDate><ttl>60</ttl></channel></rss>