Spectrum & "named tunnel"

Does anynody has Spectrum working, together with named tunnel?

I am migrating from legacy Argo , to CF named tunnels. However, can’t get the named tunnels to work with Spectrum, which is setup for a few hostnames.
Client receives 404 error

Support ticket has been created, but
CF support has not solved it so far.

When I remove Spectrum and just create CNAME or LB ,together with named tunnel, it works.

I’m not sure what you mean - if you want a Cloudflare Tunnel to be your Spectrum origin as opposed to pointing Spectrum at a domain name or IP addresses, this isn’t possible at the moment as far as I’m aware.

1 Like

Spectrum offers the feature of URL/hostname rewriting based on (TCP) port numbers.
This works well together with legacy Argo tunnels , as I have been using for years.
But once I replace the Cloudflare Tunnel with named tunnel , this stops working.

There are two hostnames/URL’s
Which need to be processed differently , based on their port numbers.
Spectrum “rewrites” the hostnames for further processing, like example below:
domain.com:1 > x.domain.com
domain.com:2 > y.domain.com

Cloudflare Tunnel prcesses traffic based on x.domain.com and y.domain.com.
This can be done either by DNS record/CNAME, or Load Balancer.

I found a way to make Spectrum work with CF named tunnel.
It may not be the official solution, but haven’t heard a better one from CF support.

The config.yml needs the initial hostname entered in Spectrum and used at the client side.
Following my example that would be

Now this creates a problem with multiple Spectrum entries in the same domain , using different ports.
As you cannot have the same hostname in the config.yml multiple times.
This can be solved by creating a separate CF tunnel for each Spectrum entry in the same domain.
Each CF tunnel then has a separate config.yml with the Spectrum hostname .

Do you have an example of your config.yaml?
I’m struggling to connect it with Spectrum as well.

Spectrum configuration with Cloudflare Named Tunnel

Random example Spectrum record pointing to a URL, on a different port:
domain.com:1 points to ORIGIN x.domain.com:2

The point is that the hostname entry below URL:port , is the same as configured in Spectrum.
The service ip address is anonymized, using random private address

Working config.yml of the named tunnel

# cat config.yml
- hostname: domain.com:1
      noTLSVerify: true