Closed michael-pellegrini closed 3 years ago
For DDNS subdomains you create subdomains with CNAME records (with the domain name in the A record as the target). Then everything changes to the new IP as soon as the A record is updated.
I'm using a wildcard A record *
to resolve all subdomains. This way I don't have to add a Cname record for every new subdomain. I can not add *
as a cname. It has to be an A record.
So you would have to either proxy everything or nothing on CloudFlare if you had a wildcard A record?
Yes, I'm using a reverse proxy for all subdomains to conserve IP addresses. I only update the proxy when names are changed or added. Having the ability to update the wildcard A record would be beneficial to anyone using a reverse proxy.
@michael-pellegrini Out of curiosity I tried *
and it seems to work? I also played with the Cloudflare API directly and nothing seems to be special about the wildcard domains. That is, if your zone is example.com
, Cloudflare seems to treat *.example.com
and *
interchangeably.
@favonia Started over with a fresh image and wildcard updates without issue.
@favonia With the config below, only the wildcard *
A record is updated. I also need the example.com
A record to be updated.
If I remove the wildcard subdomain, the example.com
A record will update. It seems that I cannot update both together.
version: '3.7'
services:
ddns:
image: oznu/cloudflare-ddns:latest
restart: unless-stopped
environment:
- API_KEY=***********************************
- ZONE=example.com
- SUBDOMAIN=*
ports:
- 8080:80
@michael-pellegrini That is a limitation of this tool. See https://github.com/oznu/docker-cloudflare-ddns/issues/60. You have to follow the workaround there or use another tool. BTW, I'm not using this tool as I'm maintaining my own.
@favonia Thanks for the update. Work around is run two instances. Since only two records need updated.
Is it possible to update A record with name set as
*
?I can update the root domain example.com without issue. I'm trying to update the wildcard record but unable to, instead a new record is added when I specify
subdomain=*
This does not work with cloudflare because the name has to be set as
*
and not*.example.com