cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

🐛 "cloudflared tunnel route dns" uses incorrect domain name

Open ysmood opened this issue 3 years ago • 3 comments

I have two domains, one is a.com another is b.com.

I want to create a dns route for test.a.com, but it it will instead create a route for test.a.com.b.com.

Here's the command to reproduce it:

$ cloudflared tunnel route dns ys-pc test.a.com             
2022-10-31T05:56:58Z INF Added CNAME test.a.com.b.com which will route to this tunnel tunnelID=xxxxxxxx

ysmood avatar Oct 31 '22 06:10 ysmood

Is there a workaround for this?

anacrolix avatar Feb 16 '23 22:02 anacrolix

I think you have to make an additional tunnel for domain a.com. Seems that you only have one active on the b.com domain.

pestevao avatar Mar 31 '23 11:03 pestevao

Duplicate with #905 ?

Though the documentation is misleading and perhaps could be more clear? It provides an example config file for a locally-managed tunnel, where it allows two different domains.

tunnel: 6ff42ae2-765d-4adf-8112-31c55c1551ef
credentials-file: /root/.cloudflared/6ff42ae2-765d-4adf-8112-31c55c1551ef.json
originRequest: # Top-level configuration
  connectTimeout: 30s

ingress:
  # The localhost:8000 service inherits all root-level configuration.
  # In other words, it will use a connectTimeout of 30 seconds.
  - hostname: example.com
    service: localhost:8000
  - hostname: example2.com
    service: localhost:8001

zhaoruibing avatar Jan 13 '24 18:01 zhaoruibing