What's new

OpenDNS IP update

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Ragpuss

Regular Contributor
hi all,
Sorry if this has been asked but I couldn’t find anything relevant and that I could follow (me being very new to Linux and this firmware).
My Router is an Asus RT-AC86U running Merlin firmware and have Entware installed (both latest)
I have an OpenDNS account and am trying to find the best way to setup the automatic IP updates as I have a dynamic IP from my ISP.
I have an asuscomm.com name setup but cant see a way to use that for OpenDNS.
They have there ddclient software but all the advice I can find comes from optware and not Entware.
I tried the install command that they give on there site but that does nothing, so I assume that the Merlin firmware needs something else installed to be able to use that.
I am still trying to learn the basics of Linux and my RT-AC86U router so ATM this is beyond my own knowledge.
Can anyone tell me the best and simplest way to setup something that will automatically tell OpenDNS when my IP changes ?
If possible I would like to keep using my Asuscomm.com but if this makes it a problem then it would have to go.
Thank you.
 
.... To keep it short dnsomatic is an update service made by opendns that can update any ddns service for you that you like to it (it has to be one they support though)... it will also update your opendns account as well once you link it to it. This script will update all dns linked to the dnsomatic account this is great for when your IP changes.

First you want to make an dnsomatic account at https://dnsomatic.com . I personally use the same user name and password. You add your Opendns account to this and make it updateable by marking it active..
I used scripts from here https://www.snbforums.com/threads/dynamic-dns-and-wan-start.10983/#post-398525 and modified to fit my needs. The main difference in mine is I made mine to not have to use ez-ipupdate.conf , I noticed that when using mods to that it affects the natural DDNS for a short period of time... The method I have described below updates via the custom DDNS service... you can still run your regular DDNS service in conjunction with this without touching any of the settings in the GUI for the DDNS

First script is added to /jffs/scripts/
I just nano /jffs/scripts/dnsomatic.sh
Code:
#!/bin/sh

# Called by init-start. Periodically updating DNS-O-Matic
# L. de Bles, 2014

# Update the following variables:
USERNAME=dnsomatic Username
PASSWORD=dnsomatic Password
HOSTNAME=all.dnsomatic.com

# Should be no need to modify anything beyond this point
/usr/sbin/curl -k -m 60 --silent -u "$USERNAME:$PASSWORD" "https://updates.dnsomatic.com/nic/update?hostname=$HOSTNAME&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG&myip=" > /dev/null
if [ $? -eq 0 ]; then
  /sbin/ddns_custom_updated 1
else
  /sbin/ddns_custom_updated 0
fi

Next one you will add to init-start
nano /jffs/scripts/init-start

Code:
#!/bin/sh

# Periodically updating DNS-O-Matic.
# L. de Bles, 2014
#
# * * * * *  command to execute
# - - - - -
# ¦ ¦ ¦ ¦ ¦
# ¦ ¦ ¦ ¦ ¦
# ¦ ¦ ¦ ¦ +----- day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use
# ¦ ¦ ¦ +---------- month (1 - 12)
# ¦ ¦ +--------------- day of month (1 - 31)
# ¦ +-------------------- hour (0 - 23)
# +------------------------- min (0 - 59)
#
# ------------------------------------------------------------------------------

cru a DNS-O-Matic "*/10 * * * * /jffs/scripts/dnsomatic.sh"
you can set the time to whatever time you want I have mine set to 10 minutes.






What about when the wan changes.....
nano /jffs/scripts/wan

Code:
#!/bin/sh
sleep 5

/jffs/scripts/dnsomatic.sh start

don't for get to type in the SSH (chmod a+rx /jffs/scripts/*) this will make commands executable.
Note if you already have stuff in wan-start and ini-start just add the stuff at the end with out modifying what was originally in the scripts... you just wont have to start off with #!/bin/sh b/c you will be adding to the already end of the scripts.
 
Last edited:
If you want it to start right away just type
/jffs/scripts/init-start start otherwise just wait until you reboot.
 
.... To keep it short dnsomatic is an update service made by opendns that can update any ddns service for you that you like to it (it has to be one they support though)... it will also update your opendns account as well once you link it to it.

If you are going to register for DNSOMATIC, why not then eschew the scripts/cron etc. and simply use the GUI?

upload_2018-4-19_17-49-48.png
 
dude he wants to keep his asuscomm.com dns address
 
hi all,
Sorry if this has been asked but I couldn’t find anything relevant and that I could follow (me being very new to Linux and this firmware).
My Router is an Asus RT-AC86U running Merlin firmware and have Entware installed (both latest)
I have an OpenDNS account and am trying to find the best way to setup the automatic IP updates as I have a dynamic IP from my ISP.
I have an asuscomm.com name setup but cant see a way to use that for OpenDNS.
They have there ddclient software but all the advice I can find comes from optware and not Entware.
I tried the install command that they give on there site but that does nothing, so I assume that the Merlin firmware needs something else installed to be able to use that.
I am still trying to learn the basics of Linux and my RT-AC86U router so ATM this is beyond my own knowledge.
Can anyone tell me the best and simplest way to setup something that will automatically tell OpenDNS when my IP changes ?
If possible I would like to keep using my Asuscomm.com but if this makes it a problem then it would have to go.
Thank you.
 
dude he wants to keep his asuscomm.com dns address

But doesn't the GUI login to DNSOMATIC which then propagates the new IP to all of the services?
 
the only way to do that is with custom ddns scripts lol
 
well you could just download the windows app and wait until you turn on your computer each time. I personally think that is easiest but my ip changes so much to keep my opendns protected for my kids I need to do a cron update or use DNScrypt that does it as well....
 
Last edited:
Just went though all this a few weeks ago.

Since you already have a OpenDNS account, you can sign up for a free DNSOMATIC account with the same credentials (it is run by OpenDNS). DNSOMATIC is a free utility that keeps OpenDNS updated with your current IP and it can also keep a bunch of other ddns providers updated as well (see the list on their site). The biggest thing is it can run on your router, unlike other utilities that need to be run on a computer that always needs to be on. I have it running on my 86U. It keeps OpenDNS and my free ddns service (dynu.net) both updated to my current IP. Here is how it's setup on my ddns page:
upload_2018-4-19_15-5-16.png
 
Thank you all, I will give this a go although I’m a bit confused :/
Do I need to set up those scripts that swistheater kindly detailed or is it just like like JAF has shown here, except, presumably, I would put in my asuscomm.com address instead of the dyne.net one ?
That sounds a lot easier than doing the scripts but looks to easy, lol :confused:
Is JAFs one going to update automatically or only on a reboot and being as the server has changed is my asuscomm.com still going to work ?
Thank you :)
 
You need to check dns-o-matic's website. Asuscomm.com's ddns service is NOT supported. So my setup won't work for you that way. You'll need to chose a ddns service from their list...there are many. And you do not need the scripts if you do it the way I did. It updates both automatically as long as your router is running. When you logon to their site it will show you both services being updated and shows a log.
 
You need to check dns-o-matic's website. Asuscomm.com's ddns service is NOT supported. So my setup won't work for you that way. You'll need to chose a ddns service from their list...there are many. And you do not need the scripts if you do it the way I did. It updates both automatically as long as your router is running. When you logon to their site it will show you both services being updated and shows a log.

if you are following what I said ... this method doesn't mess with the already set ddns on the router.. it allows you to invoke custom ddns script to allow it to ping dnsomatic to keep the IP updated for opendns or any other service that may be linked to dnsomatic account.. that is it.
 
Thank you all, I will give this a go although I’m a bit confused :/
Do I need to set up those scripts that swistheater kindly detailed or is it just like like JAF has shown here, except, presumably, I would put in my asuscomm.com address instead of the dyne.net one ?
That sounds a lot easier than doing the scripts but looks to easy, lol :confused:
Is JAFs one going to update automatically or only on a reboot and being as the server has changed is my asuscomm.com still going to work ?
Thank you :)
If you don't use windows updater or dnscrypt and would like for your router to update the opendns then the method above in my scripts is a great method you wont have to mess with your current ddns settings//// Or you could use one of the methods described by these gentlemen and in order for you to Still have your asuscomm.com dns you will have to use a method described in https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS and also scripts from https://github.com/RMerl/asuswrt-merlin/wiki/DDNS-Sample-Scripts for you to make a custom ddns script for asuscomm.com dns
 
Just another quick question,
Is there not a way to install OpenDNS ‘s own updater (ddclient) on the AC86U with Merlin and Entware running ?
It has a version for Linux so I would have thought that it could be installed on the router :confused:
Thank you
 
Is there not a way to install OpenDNS ‘s own updater (ddclient) on the AC86U with Merlin and Entware running ?
It has a version for Linux so I would have thought that it could be installed on the router :confused:
Maybe, I don't know. But as ddclient was written for Debian and consists of over 4200 lines of Perl code, personally I'd look for another solution.
 
Maybe, I don't know. But as ddclient was written for Debian and consists of over 4200 lines of Perl code, personally I'd look for another solution.
Ah!! Would sound like a bad idea on my poor little router then, lol
Looks like I will have to try and get my head around Swistheaters scripts :)
 
Code:
#!/bin/sh

# Periodically updating DNS-O-Matic.
# L. de Bles, 2014
#
# * * * * * command to execute
# - - - - -
# ¦ ¦ ¦ ¦ ¦
# ¦ ¦ ¦ ¦ ¦
# ¦ ¦ ¦ ¦ +----- day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use
# ¦ ¦ ¦ +---------- month (1 - 12)
# ¦ ¦ +--------------- day of month (1 - 31)
# ¦ +-------------------- hour (0 - 23)
# +------------------------- min (0 - 59)
#
# ------------------------------------------------------------------------------

cru a DNS-O-Matic "*/10 * * * * /jffs/scripts/dnsomatic.sh"
So at 10 minutes, is this going to check the IP every 10 minutes ?
 
#!/bin/sh

# Called by init-start. Periodically updating DNS-O-Matic
# L. de Bles, 2014

# Update the following variables:
USERNAME=dnsomatic Username
PASSWORD=dnsomatic Password
HOSTNAME=all.dnsomatic.com

# Should be no need to modify anything beyond this point
/usr/sbin/curl -k -m 60 --silent -u "$USERNAME:$PASSWORD" "https://updates.dnsomatic.com/nic/u...ME&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG&myip=" > /dev/null
if [ $? -eq 0 ]; then
/sbin/ddns_custom_updated 1
else
/sbin/ddns_custom_updated 0
fi
is the hostname as you have put it here or is it the actual web address of dnsomatic (https://dnsomatic.com)
thanks
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top