An open-source alternative to DynDNS.
This was originally created to be ran on a Fritz!Box, since the popular DynDNS providers like DynDNS and No-IP are becoming more and more difficult to use for free, but it should run on almost every router that is able to provide a shell.
Rename config-template.sh
to config.sh
and fill in your data (or run bash setup-config.sh
).
Then copy the scripts to any Unix-machine (even your router) and let it run at specific intervals (I'd recommend 1 min).
All configuration lies in config.sh
. Read registrar-specific config at your registrar.
GET_IP_FROM
: The internet address to get your public IP from (on the public ip)LOGFILE
: The name of the file where the ip changes will be logged
This one's easy.
REGISTRAR
: 0DOMAIN
: The domain to updateEMAIL
: The email address you've registered withPASSWORD
: Your password
CloudFlare only supports updating a record with it's id. To determine the ID of the record you want to use, you can either:
-
Use the script at server/cloudflare. (This doesn't need to be on a webserver, you can also run it locally (e.g. via MAMP).)
-
You can also make an API call to manually find out the id.
REGISTRAR
: 1DOMAIN
: The domain to updateEMAIL
: The email address you've registered with at your registrarTOKEN
: The API token (get it here)REC_ID
: The id of the a-record to update
You have to get your public ip address and this is only possible via a remote webserver. When you trust me, just use http://arne.me/owndns/ip
. But if you don't, you can copy the folder server/ip to any PHP webserver and use it's address as GET_IP_FROM
.
If you're not familiar with cronjobs, just run crontab -e
from your command line and add this line:
1 * * * * /path/to/owndns.sh --force
#FAQ
-
Q: Dude, $REGISTRAR is not supported, what the f*ck?
-
A: Well, unfortunately, not every registrar has an API that we can use, so we would have to manually parse the web page, log in, change everything, etc. Even if we would do this (which is a humongous) amount of work, the slightest change on the web page will break the script.
-
Q: But, dude, my registrar has an API!
-
A: Awesome! Then just open an issue like this : 'FR: $YOURREGISTRAR' and please do link your registrar's API documentation :)
-
Q: But, dude, my question is not here!
-
A: Open an issue and ask ❤️
This project is licensed under the MIT License, for more information see LICENSE.txt.