aeleos / cloudflared

Cloudflare Tunnel Instructions and Template for Unraid
173 stars 21 forks source link

issue with cloudflared and NPM #21

Closed AbzHussain closed 2 years ago

AbzHussain commented 2 years ago

2021-12-18T11:23:47Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: x509: certificate is not valid for any names, but wanted to match MYDOMAIN.com" cfRay=6bf80565ebeb772c-LHR originService=https://192.168.1.100:4443

I tried this: Try changing yourdomain.com to host.yourdomain.com, where host is a valid subdomain that you have a DNS record for. Despite this being a specific hostname, cloudflared should be able this name to verify certificates for your other subdomains as they pass through the tunnel.

but still getting the same error.

any ideas what else could be causing the issue?

thanks

aeleos commented 2 years ago

The issue could be related to whatever certificate is NPM is returning, specifically the domain name associated with the certificate.. If you had mismatched domains, it would cause the same error. I would recommend using a cert that contains two domains, yourdomain.com and *.domain.com. You should be able to do this in NPM. This is what works for me. An alternative if you want to just get it working is using the option noTLSVerify. This will prevent the error you are seeing, but make it so your web traffic will not securely encrypted inside your network (but cloud flare will make sure its secure for the outside internet).

Shad9w commented 2 years ago

Enabling HTTP/2 in NginxProxyManager and adding a cloudflare certificate (origin) fixed this for me.