Settings

Theme

Duck DNS – free dynamic DNS hosted on AWS

duckdns.org

174 points by phantom_oracle 4 years ago · 102 comments

Reader

mittermayr 4 years ago

For anyone hosting their domain on Google Domains, there's a neat API endpoint they're offering for updating the DNS with a simple CURL. I've been using this for years now for a public Raspberry PI behind a home router that changes IPs every other day.

  curl -s -k --user "username:password" "https://domains.google.com/nic/update?hostname=yourdomain.com"
There's more parameters (and you can specify an IP, the above request only takes the caller's IP).

Here are the docs: https://support.google.com/domains/answer/6147083?hl=en#zipp...

  • petercooper 4 years ago

    I don't know if it's relevant but there was an article the other day about how Google is phasing out username:password logins for most Google related services and APIs, so if you have a script running quietly for years doing this task, it might be worth double checking if it will continue to be fine. (It might be, if this u/p is unique to the domain as the docs suggest - but I thought I'd mention it just in case!)

  • haxxorfreak 4 years ago

    I had no idea about this, really handy!

    Quick question, is there a reason the -k (--insecure) flag is included? I imagine that https://domains.google.com would use a cert trusted by curl so it seems unnecessary and adds a risk that your traffic could be MitM.

    • benmanns 4 years ago

      I could see people doing this on old routers with outdated CA certs and etc. But agreed, it seems like a bad idea unless absolutely necessary.

  • remram 4 years ago

    Not only did I have no idea about this, but I was certain this didn't exist on purpose as there is a paid "Cloud DNS" in Google Cloud.

    Does this mean Let's Encrypt dns-01 challenges could be automated?

    [edit: Oh the API only allows changing an A record, for dynamic DNS, not updating anything else in the zone. That makes more sense.]

  • compsciphd 4 years ago

    so I mentioned the same thing, though one thing to note (which I doubt duck dns helps with either). Is one can't use google's dynamic dns with AAAA records (i.e. ipv6). Personally, I think this is massive oversight on their part.

    • rahimnathwani 4 years ago

      I have dynamic A and AAAA records with Google Domains. I'm not sure why it doesn't work for you.

      Here's the relevant portion of my ddclient config:

        protocol=googledomains                                  
        login=XXXXXXX
        password=XXXXXXX                            
        host4.mydomain.com
      
        protocol=googledomains                                  
        use=web                                                 
        web=checkipv6.dyndns.org/                               
        ipv6=yes                                                
        login=XXXXXXXC                                  
        password=XXXXXXX                             
        host6.mydomain.com
      • compsciphd 4 years ago

        ok, so you're doing a manual update?

        when I go into the web ui for my domain and go to create a dynamic dns name, it only gives me an option for only an A record.

        My "guess" is that your solution is to create a normal AAAA record and ddclient can update that record with the info retrieved from checkipv6.dyndns.org? so not using google's UI to setup a AAAA dyn dns record? and my guess is that username/password scoping that you got for host4 worked the same for the "fake static" AAAA record?

        or you could have the ability to create AAAA dyn dns records via the UI and for some reason I'm just blind.

    • vxNsr 4 years ago

      Likely because the person/team that built this got their annual bonus for making something new and moved on to other things before ipv6 became relevant in their eyes.

  • nickweb 4 years ago

    It seems unsafe to me to be passing your username and password over the open every second day. Especially one that links to Google - which for the majority of people is their life.

    As a side note - will the recent announcement by Google about unsafe logins being denied affect you?

jzzskijj 4 years ago

I was quite surprised to learn this has nothing to do with DDG. Interesting how DDG seem to have taken the meaning of "duck" in (my) mind.

  • godelski 4 years ago

    What's more interesting is that DDG had disputes with Google over the ownership of the duck.com domain. Google was squatting on the domain and redirected it to Google (dirty tactic). But I guess it could just as easily have gone to the Oregon Ducks or some duck based website. (interestingly "ducks.com" doesn't go anywhere for me)

    • ca98am79 4 years ago

      Google became the owner of Duck.com back in 2010 when it acquired On2 Technologies, a company formerly known as The Duck Corporation. It gifted the domain to DuckDuckGo in 2018

    • GordonS 4 years ago

      Hmm, I remember it differently, with Google redirecting duck.com to DDG, and then later just handing the domain over to them.

      • voxadam 4 years ago

        You're remembering things correctly. The WHOIS record for duck.com shows that it's owned by Duck Duck Go, Inc.

    • bil7 4 years ago

      google already does enough atrocious things, you don't have to make them up.

treesknees 4 years ago

I have been using Cloudflare Tunnel for several months now to get around dynamic DNS requirements and port forwarding. It creates a secure tunnel between your server and their edge, and supports name-based service config (domain X points to localhost Y.) Downside is they only supports HTTP(s).

There is a free tier, although you need to provide them a full domain (not a subdomain) for it to work, and then each site/tunnel will create a subdomain. It does work with free domains like .tk if you really want to go that route.

https://developers.cloudflare.com/cloudflare-one/connections...

There are also open-source alternatives using VPNs like Wireguard + nginx, but typically these solutions require you to run a publicly-accessible server already to host the proxy.

1MachineElf 4 years ago

I'm currently on the search for a service to facilitate DDNS. Duck DNS seems popular, but I'm skeptical of things that are simply offered for free. What assurance do we have that Duck DNS is secure, or that it will not just disappear one day? The alternative that seems better to me is Namecheap with their API.

  • pygar 4 years ago

    I cobbled together a bash script that used the cloudflare API to update the A record when my IP changed. It worked well.

    Prior to that i used https://freedns.afraid.org which is free if you are willing to share your domain (people can create subdomains that point to their IP) or you can pay to keep it private. It's been around for a very long time, so it's unlikely to vanish. It's a very good service.

    • creeble 4 years ago

      +1 on Cloudflare’s API for this. You can generate an API key (per domain only, I think) and it’s a simple curl call from there.

      And it works on their free account level! Maybe someday they’ll kill that, but they have a history of keeping features in free going.

  • ringworld 4 years ago

    https://freedns.afraid.org has been running forever and a day, has thousands (?) of domain names donated for use, two APIs (v1 and v2), and the free tier is subsidized by paying premium members (premium gets extra features). Highly recommended.

  • k8sToGo 4 years ago

    Why does it matter if it just disappears one day if you are not paying for it anyways?

    • HWR_14 4 years ago

      Because then you have a ticking time problem. Some automatic service might just silently start failing deep in your tech stack. And yes, you can monitor that. But then your monitoring software might fail, etc.

      • k8sToGo 4 years ago

        If you are having a serious (= where failures matter a lot) tech stack, use something that is paid and supported or host it yourself.

    • 1MachineElf 4 years ago

      I think I see your point, however, what I'm saying is I'd rather pay for something in exchange for some semblance of availability and security guarantees.

      • k8sToGo 4 years ago

        That's ok. But I think for private projects something like this is fine. That's why I meant that even if it disappears it doesn't matter.

        I would definitely not use something like this commercially.

    • koolba 4 years ago

      If it disappears how do you get a refund?

    • 0thgen 4 years ago

      this comment hit me pretty hard. why do we expect longevity in the free open source world?

  • tikkabhuna 4 years ago

    I’m using ddclient [0] with Google Domains. Pretty easy to set up on a raspberry pi.

    [0] https://github.com/ddclient/ddclient

  • btgeekboy 4 years ago

    My router supports Route53, so I just pay the $0.50/month for them to host the domain. I don't foresee Route53 going away anytime soon.

    • giorgioz 4 years ago

      How does your router support Route53? Does your router have a static IP address and you just created an entry in Route53 mapping a subdomain.example.com to the static IP of your router? DuckDNS is a Dynamic DNS and can work with common dynamic IPs... How do you update the entry in Route53 when the IP address of your router changes?

      • btgeekboy 4 years ago

        OPNSense saves an AWS keypair. When it detects my IP changes, it updates a Route53 record using the AWS API. It’s one of the options alongside a bunch of other DDNS providers.

      • vladvasiliu 4 years ago

        My router supports no-ip and other dyndns providers. I expect if that particular router supports Route 53 than it'll do the same: just update the entry in Route53.

  • blowfish721 4 years ago

    I went the API way but with Gandi, works like a charm!

    • 1MachineElf 4 years ago

      Gandi is my registrar! Yes, I'm a fan. I may be mistaken, but something I worry about after trying Gandi's API for Let's Encrypt is the API keys provide permission for everything. I would love it if the permissions could be narrowed down to specific domains, records, and operations on them... AWS Route53 comes to mind, but my router (OPNsense) didn't have it available as an option. :(

  • nextlevelwizard 4 years ago

    Maybe I'm missing something obvious, but why not just pay for a domain and run a cronjob to update the IP in case it changes?

  • Lammy 4 years ago

    Anecdote: I am happily using DNS Made Easy (paid) with ‘ddclient’ for dynamic updates via their API

  • alpenbazi 4 years ago

    ddnss.de

fomine3 4 years ago

This service is infamous to be abused by spammer.

  • lewantmontreal 4 years ago

    I can imagine. Last year I tried to sign up to create a domain for my home server. Despite having my own IP address and a Google account I pay for recaptcha v3 they use would not let me through.

eternityforest 4 years ago

I love DuckDNS but we seriously need a more automated and integrated solution to this kind of thing. It's the missing piece that holds self hosted back.

Something that:

* Lets you set up a domain with a single command

* Handles security for you. There shouldn't be any manual admin needed to make a secure context site

* Works offline on the LAN if possible, and on Yggdrasil meshes.

I should be able to buy a device, plug it in, then scan the QR code on it's display and be instantly taken to its website, no setup or account creation.

Unfortunately the web blocks all insecure requests from within secure contexts, and has no MDNS type functionality, so building a P2P solution with service workers or something is very hard/impossible.

DuckDNS is really almost there. It's the security that makes it hard, Let's Encrypt is not exactly consumer grade.

  • anaganisk 4 years ago

    Why is let’sencrypt not consumer grade? I dont think it uses any inferior algorithm. Am I missing something?

    • eternityforest 4 years ago

      An average user probably wouldn't want to set it up though.

      The security is fine, but it's definitely not plug and play like I'd expect a commercial NAS or something to be.

      • anaganisk 4 years ago

        That is true but then again, it is designed to be used automated afaik may be thats why it became instant hit among developers. There are services like ZeroSSL which would be a better fit for average user.

adrianomartins 4 years ago

I've been using noip.com for my projects, works quite well except that you have to confirm you still want your noip domain reserved every once in a while. I'll try Duck Dns in my next project. Thanks for the share.

RicoElectrico 4 years ago

Be aware that Facebook Messenger blocks URLs with duckdns.org as unsafe links. The workaround is probably to find a cheap domain (not free, these are blocked as well) and attach it using CNAME.

scim-knox-twox 4 years ago

This has nothing in common with DuckDuckGo?

DDG (unfortunately) is bigger and bigger with every year. They are developing desktop browser, email proxy etc.

I wouldn't be surprised if they'd lunched DDGDNS.

  • samtheprogram 4 years ago

    Why is it unfortunate that DDG is bigger and bigger every year?

    • mPReDiToR 4 years ago

      The larger the crowd the more likely the company is to monetise the service? Or just sell the eyeballs?

      I'd like to think DDG were too principled to do this, but money can really direct moral compasses in large enough quantities.

      • scim-knox-twox 4 years ago

        That's exactly what I meant :)

        There are many companies / sites / blogs / YT channels etc that put quantity over quality.

mattrighetti 4 years ago

I’ve been using DuckDNS for a couple of years now but one day I discovered that Reddit login is no more so I’m locked out of my account, still works though!

giorgioz 4 years ago

In the past I've tried using the free tier of other DynDNS services but with 2 commercial routers I had it always boiled down to the firmware being crap and having some bug that wasn't working with the free DynDNS. Many people recommend OpenWRT but you need to plan in advance which router you are going to buy to be compatibile with OpenWRT and I never planned so much in advance.

m-s 4 years ago

I have my own domain and run a Cloudflare Workers endpoint that updates a DNS record. It’s quite simple to run one’s own dDNS service.

mrguyorama 4 years ago

I have used DuckDNS for nearly a decade. I highly, highly recommend them. It's never not worked, super simple to set up on any server or always on system, and just is exactly what you want if you're a hobbyist.

The only possible downside is that you end up with a url with "duckdns.org" in it, but I don't mind

bullen 4 years ago

That's great and all but since dyndns providers are hardcoded in my router this does not help.

  • goosedragons 4 years ago

    If you have a machine running all the time anyways you can have it update the IP instead of the router. They have instructions for a bunch of different ways to do it on various OSs.

  • awill 4 years ago

    You can use DuckDNS through DNSOMatic. That's in many routers. That's what I do

quyleanh 4 years ago

I use Cloudflare, and there are also tons of APIs for update IP of DNS configuration.

Darmody 4 years ago

I remember using it years ago to be able to point from the outside to a dynamic IP.

I used an old Android phone with their app to keep the IP updated. Like the old no-ip but without a PC.

passerby1 4 years ago

Just curious, how does this project pays bills?

  • Dma54rhs 4 years ago

    It's not expensive to run a project like this to begin with but donations.

  • fuzzfactor 4 years ago

    I wonder about that too.

    When a pro duck needs another roll of duct tape from his industrial supplier, they just put it on his bill and he's good to go.

  • k8sToGo 4 years ago

    Donation. Just like many projects like this.

softwarebeware 4 years ago

Happy user here. DuckDNS is one of those great things that does one thing simply and just works

aidog 4 years ago

For some time I kept getting SMS phishing mails with duckdns.org urls here in Japan.

zsolt_terek 4 years ago

Thank you. This was exactly what I've been looking for for a while now.

spants 4 years ago

It is a great service - I have been using it for over 6 years now.

mlatu 4 years ago

anyone knows why reddit doesnt like them using the reddit api?

  • slig 4 years ago

    >We unfortunately do not allow use of Reddit’s API for account authentication with third-party sites or applications that have no partnership, affiliation, or connection with Reddit. Reddit does not offer or support “log in with Reddit” or “use Reddit” to login services. Use of any sort of button, including a “use Reddit” login button like the one currently featured on your site, is unauthorized.

ectospheno 4 years ago

I know it is significantly less easy and not free, but wouldn’t a dedicated $6 vps running a level 4 haproxy to get access be a lot safer? A script to ssh to the vps to update your backend ip is pretty trivial.

ctxc 4 years ago

To me, this domain is synonymous with phishing.

dynamohk 4 years ago

to avoid reverse proxy, dynamic dns to access servers at home, maybe try tailscale to achieve same thing

compsciphd 4 years ago

one could just pay a small yearly fee to register their domain with google and get easy/unlimited ddns.

  • vetinari 4 years ago

    You can also host your zone with Hurricane Electric and skip the part about paying a small yearly fee to Google.

    • compsciphd 4 years ago

      there's no cost to google besides the registration fee, if it's your zone, you're paying that fee anyways. The only way to not pay a fee is to go through a free dyndns provider that you have to use a hostname off of their zone.

      • vetinari 4 years ago

        Is the DNS free, even if you use other registrar than Google?

        I have some domains with country-specific tlds, and I'm using small registrars there. he.net is free even in this case.

  • shoelessone 4 years ago

    I don't believe this solves the issue if your IP changes all the time.

    • dewey 4 years ago

      Why not? As OP said you'll get an easy way to update the dns entry with the new IP.

alimbada 4 years ago

Why AWS? How about we start building services that work anywhere instead of targeting a platform owned by a company that avoids paying billions in taxes?

Edit - I'll leave my original comment up but I originally thought this was a service that users could deploy themselves into their own AWS accounts which it is not. It is, as it says, a DDNS service which is free. The fact that it's hosted in AWS should be neither here nor there.

  • eternityforest 4 years ago

    It kinda gives a sense of how it works. AWS means it's not just a handwritten script on a VPS somewhere, it's probably maintained with lots of automation, etc.

    It kind of gives it a sense of professionalism for marketing purposes.

vorejdajo 4 years ago

New to this. "Practically", it seems the same as ngrok or tor onion services. Is that right?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection