Live data from Hacker News

Free DDNS with Cloudflare and a cronjob

github.com

11–20 of 202 posts

Re: Free DDNS with Cloudflare and a cronjob

#12

Seems to rely on https://api.ipify.org/ to determine public IP. Is there any Cloudflare service one can use to determine the IP instead? That way there’s not an extra company in addition to Cloudflare itself that you need to continue existing.

https://www.cloudflare.com/cdn-cgi/trace will return your ip.

Re: Free DDNS with Cloudflare and a cronjob

#13

I built the exact same thing 5 years ago and I'm using it daily since then. I never have any problems with it. You don't need a config file for it, just a couple of CLI options and you are good to go. You can install it with pip, docker or downloading a binary: https://github.com/kissgyorgy/cloudflare-dyndns

I guess this is something people have to make? I wrote one 6 years ago in Golang and rewrote it in Rust last year. I have stopped using it, but I had them running for 6 years without issues.

https://github.com/AndreasBackx/update-dns

Re: Free DDNS with Cloudflare and a cronjob

#14

Seems to rely on https://api.ipify.org/ to determine public IP. Is there any Cloudflare service one can use to determine the IP instead? That way there’s not an extra company in addition to Cloudflare itself that you need to continue existing.

You could do it with a cloudflare worker that just returns the ip address of the request

Re: Free DDNS with Cloudflare and a cronjob

#15

Seems to rely on https://api.ipify.org/ to determine public IP. Is there any Cloudflare service one can use to determine the IP instead? That way there’s not an extra company in addition to Cloudflare itself that you need to continue existing.

You could do it with a cloudflare worker that just returns the ip address of the request

Nevermind. The other answer is better

Re: Free DDNS with Cloudflare and a cronjob

#16

Seems to rely on https://api.ipify.org/ to determine public IP. Is there any Cloudflare service one can use to determine the IP instead? That way there’s not an extra company in addition to Cloudflare itself that you need to continue existing.

I feel like it's worth mentioning icanhazip.com [0] as well, since it's now run by Cloudflare [1]. Until recently switching to a custom CF worker, that's been by go-to for ages.

[0]: https://www.icanhazip.com/ [1]: https://major.io/p/a-new-future-for-icanhazip/

Re: Free DDNS with Cloudflare and a cronjob

#17

Instead of using DDNS, I have been using Cloudflare tunnels to expose my home services to the internet. The setup is much simpler and it seems like it's more secure too You specify a port and point it to a subdomain and it just immediately works, no maintenance necessary. The daemon only needs to be installed once with a simple terminal command

There are some limitations such as:

– TLS termination mandatorily happens at Cloudflare (i.e. your traffic is mitm'ed). That's because this free product is meant as a gateway drug (aka a loss leader) to Cloudflare's WAF/Anti-DDOS products (which require TLS termination to happen on their side for technical reasons).

– Other TCP protocols (including SSH) require every client to run the software too. So if you were thinking about bypassing the TLS termination restriction by creating a TCP tunnel instead of an HTTP(S) tunnel you can't.

– Max 100 MB uploads for HTTP(S).

– No media servers allowed.

Otherwise it's a really good service!

Re: Free DDNS with Cloudflare and a cronjob

#19
I used ddclient with Cloudflare for years with no issues.

Recently upgraded my home router and the manufacturer operates a free dynamic dns service enabled with a toggle button. I have a cname record in my domain’s dns records pointing to the dynamic dns entry. I actually don’t even need that anymore. All the services I run at home are only for immediate family so only available remotely via a Wireguard vpn connection. I migrated that to the router also because it can do 900Mbs of Wireguard traffic and has a great vpn server management implementation. By default the client configs it generates points to the dynamic dns name. No real need for the cname but I have it out of habit.

Re: Free DDNS with Cloudflare and a cronjob

#20
post #16

Seems to rely on https://api.ipify.org/ to determine public IP. Is there any Cloudflare service one can use to determine the IP instead? That way there’s not an extra company in addition to Cloudflare itself that you need to continue existing.

I feel like it's worth mentioning icanhazip.com [0] as well, since it's now run by Cloudflare [1]. Until recently switching to a custom CF worker, that's been by go-to for ages. [0]: https://www.icanhazip.com/ [1]: https://major.io/p/a-new-future-for-icanhazip/

Does Cloudflare have a history of sunsetting products they've bought? Acquisitions by Google, Apple, Meta, etc. are yellow flags that the product may cease to exist soon. I wonder if Cloudflare has a better track record in that regard.
Post reply on HN