I was a free-rider of their free tier for a while, but I totally understand and respect their decision. My main problem is not that I do not want to pay 20-30$ a year for a dynamic DNS, my problem is that it is either one of their domains or I have to bring domain services to them.
I own a VPS, I own a domain and I was wondering if I could do something myself. Does anyone have any recommendations how to set up DIY dynamic DNS? I would like home.mydomainexample.com or even home.homelan.mydomainexample.com to point to my home dynamic IP.
Surprised nobody has mentioned this yet, but if you use (or can move to) Namecheap for your domain registration, they provide free DNS service that includes dynamic DNS [1]. The script to set it is merely an HTTP GET to a URL. A lot of routers provide that ability as part of their dynamic DNS set up (I know dd-wrt does, as does the Mikrotik router I currently own).
I have setup my own DDNS server, in two Digital Ocean boxes.
- You have to run your own DNS service.
- And setup a PHP page on the server, which when called will update the zone file.
But the next problem is elsewhere. All routers seem to have hardcoded DDNS server names. Therefore even if you install your own service, there is no way you can call it from a router.
It would have been better if routers had accepted a "DDNS protocol" + "a server IP" instead.
I have my home linux server. But I can't share this solution with my friends that don't run home servers.
I wonder if the router would resolve dyn.com (or similar hardcoded domains) through the user's resolver/hosts file.. You can see where I'm going.
Personally, I always pick routers I can run a custom firmware on (have run {DD-,Open}WRT). DD-WRT has an additional field for a single url to update IP. I use namecheap's API endpoint there.
I've been thinking about this prior to this announcement.
The way I am planning to (try to) solve this is by way of a cron script running on the host box at the location with the non static ip address.
The cron script running ever minute "gets" a page on a remote server [1] (say using curl). Actually see [2].
Another script running on the remote server monitors the apache logs and notes when the particular page is requested (along with some possibly unique and changing random number). Another script then takes that IP and updates the dns server that you have running and restarts it.
All of this should be able to be done with shell scripting and use of cron.
Thoughts? I'm not proposing this as a robust solution to everyone's issues but I think it will work.
[1] ssh to the server and gets the page locally or by VPN so that the page being requested is obscure.
[2] Of course I guess you could cut just out the apache part and also just ssh into the server, do "last" piped into "cut" then nslookup and get it that way as well.
It's not really a DIY solution, but Hurricane Electric offers support for dynamic DNS subdomains with their free DNS service. It's super easy to throw in a cronjob with curl and have work. https://dns.he.net/
For this purpose I wrote a script which is run every minute by cron.
It checks if current IP has been changed since last run, and if yes, sends an API request to my VPS provider to update a DNS A record with the new value.
You might also want to check if you have IPv6 connectivity on your home connection. If all you want to do is to ssh/rsync/sftp etc to your home computers from the VPS, you might get lucky if your provider assigned you a static IPv6 prefix. Then you are just a hosts entry away from easy access (going from VPS to home machines over v6).
I own a VPS, I own a domain and I was wondering if I could do something myself. Does anyone have any recommendations how to set up DIY dynamic DNS? I would like home.mydomainexample.com or even home.homelan.mydomainexample.com to point to my home dynamic IP.