You are here

Duck DNS update script as cron job on node

3 posts / 0 new
Last post
KE0RSX's picture
Duck DNS update script as cron job on node

Hi everyone,

Currently, our ARES team has four nodes that are able to create tunnels. The problem is they are all on Dynamic IP's. My plan is to set up domains on Duck DNS (or another DynDNS alternative). One option that Duck DNS offers is using a bash script and cron job on Linux. Has anyone used this on the node itself, as opposed to a computer or other device running behind the node? The one potential issue that I can see is their script writes to a log file, but I would think if the domain is accessible, then that can be removed.

Our nodes are the MikroTik hAP ac Lite's. So, my question is would this be a workable solution (if I remove the logging command)? Or should we install it on a separate device that's connected to the node?

Thanks and have a great day. :)

P.S. For reference, here's the  information on the installation script

ve6vh's picture
DNS Update Script

Hi Patrick,
I have done this with dyndns using a curl script and a cron job. Please contact me directly (, or I can be reached at meshphone 403-5101. Be happy to pass on the information.


I have done this on a node.

I have done this on a node.

Keep in mind, when you reflash your node, you will need to re-do this.

Paste this into the command line of the node, with YOUR_DUCKDNS_HOST and YOUR_DUCKDNS_TOKEN_STRING in the places below.  Do not include the {}'s.

To get to command line, use 'putty' or another SSH client (port 2222) to your node.

(crontab -l 2>/dev/null; echo "*/5 * * * * /usr/bin/curl --interface eth0{YOUR_DUCKDNS_HOST}/{YOUR_DUCKDNS_TOKEN_STRING} >/dev/null 2>&1") | crontab -

The 'interface' option makes sure that the WAN interface is used as the IP address for the hostname.
This inserts a string into the node 'crontab' that will run every 5 minutes to push any IP change to your account on duckdns.

My example just inserts the line into the crontab.

If you want to follow a duckdns example, this would be the 'freenas' example from:


Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer