What's new

DNS-O-MATIC Update Only 1 Network?

  • 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!

pendetim

Occasional Visitor
On a Asus RT-68 I am trying to use the built in DDNS updater for one of 3 networks I have on DNSOMATIC and don't think it is working.

On DNSOMATIC I have 3 routers that I am tracking with network names of "Cable", "Creek" and "Green". They are linked to 3 networks on OpenDNS.
My understanding is that in order to just update, lets say, Cable, I put username, password etc and then for hostname I would enter Cable.dnsomatic.com

When I do that the log on the ASus shows:



Nov 30 20:26:21 watchdog: start ddns.
Nov 30 20:26:21 rc_service: watchdog 243:notify_rc start_ddns
Nov 30 20:26:21 start_ddns: update WWW.DNSOMATIC.COM default@dnsomatic.com, wan_unit 0
Nov 30 20:26:25 inadyn[18221]: Fatal error in DDNS server response:
Nov 30 20:26:25 inadyn[18221]: [200 OK] nohost

And some times:
Nov 30 20:32:01 watchdog: start ddns.
Nov 30 20:32:01 rc_service: watchdog 243:notify_rc start_ddns
Nov 30 20:32:01 start_ddns: update WWW.DNSOMATIC.COM default@dnsomatic.com, wan_unit 0
Nov 30 20:32:03 inadyn[18440]: Failed to get IP address for default@dnsomatic.com, giving up!

And the DNS-O-MATIC page does not show any update. But on the DDNS page sometimes it shows "Update Is Successful" sometimes it shows "Error, please try again"

Help, please.
 
Nov 30 20:26:25 inadyn[18221]: [200 OK] nohost
Do you have a host name filled in that field? I have all.dnsomatic.com in that field.
 
Thanks for the reply.

If I use "all.dnsomatic.com" it updates all 3 networks. I only want to update "cable.dnsomatic.com"
 
Hmm, maybe we're talking about doing different things here. The way I've used DOM is to have a single IP update multiple DDNS hosts and services (e.g., OpenDNS) with the SAME ip address. To my recollection I've never tried to have multiple hosts update a single DOM account. So the all.dnsomatic.com approach has always worked for me.

OTOH, I do have several remote locations that I need to track (parents, siblings, etc). I use Namecheap's freeDNS for those (I am a NC customer, but I believe it is open even to non-customers).

Others will hopefully have alternative approaches.
 
Thanks, Again.

I am trying to use OpenDNS service with some custom filtering at several sites as well as keep the dynamic address updated so I can access a P2P VPN and do some remote management.

Would you ( or anyone else reading this ) know if there are any other DDNS services that can feed changing IPs into OpenDNS?
 
CLI via cron perhaps? See: https://support.opendns.com/hc/en-us/community/posts/220029187-how-to-update-ip-using-curl . Be sure to include the --basic --user email:password authentication at the end or it won't work.

I run an update from my parent's router every two days using a cron job, without issues (create a script called odns-update.sh with the shebang and command - set the permissions to at least 0755, then in services-start, add the entry cru a ODS-update "0 23 */2 * * /jffs/scripts/odns-update.sh" and re-execute services-start, then check the status by issuing a cru l from the command line). Calling the curl command from a cron job might also work.

But this all presumes you have multiple ODNS accounts to cover the multiple hosts. If you already have mulitple ODNS accounts, you (should) have corresponding DOM accounts, no? If you have multiple hosts on a single ODNS account, then the CLI via cron should work for you.

Or better describe your current setup so others can contribute.
 
CLI via cron perhaps? See: https://support.opendns.com/hc/en-us/community/posts/220029187-how-to-update-ip-using-curl . Be sure to include the --basic --user email:password authentication at the end or it won't work.

I run an update from my parent's router every two days using a cron job, without issues (create a script called odns-update.sh with the shebang and command - set the permissions to at least 0755, then in services-start, add the entry cru a ODS-update "0 23 */2 * * /jffs/scripts/odns-update.sh" and re-execute services-start, then check the status by issuing a cru l from the command line). Calling the curl command from a cron job might also work.

But this all presumes you have multiple ODNS accounts to cover the multiple hosts. If you already have mulitple ODNS accounts, you (should) have corresponding DOM accounts, no? If you have multiple hosts on a single ODNS account, then the CLI via cron should work for you.

Or better describe your current setup so others can contribute.
Thanks for the idea. However I have absolutely no idea how the add a cron job. I am a real NOOB at this stuff. Sorry.

My configuration is as follows:
3 Asus Routers at different locations, call them Cable, Creek and Green
3 Networks on OpenDNS with Names Cable, Creek and Green
3 Networks mapped from OpenDNS to DNS-O-MATIC
3 DNS records in freedns.afraid.org

What I want to do:
Track WAN IP addresses for all 3 networks
Pass the new addresses to OpenDNS so that filtering can be applied to selected MAC addresses
Pass the new addresses to freedns.afraid.org so I can P2P into the routers at each location

Comment:
If I can get the cron job running I probably can do away with the freedns.afraid.org update and use the GUI update from Asuscomm.com that is baked into the router. However it looks like DNS-O-MATIC may not be selective in passing IP addresses to freedns.afraid.org and will pass the same address to all 3 freedns.faraid.org records. So if there is a cookbook explanation how to set up that script, that should solve my troubles. Right?
 
First, test that this command works from each of the routers. Issue this from a terminal window: curl https://updates.opendns.com/nic/update?hostname=CABLE --basic --user ODNS-email:password . You should see a response that says "good" with or without the IP address (I've see it both ways). If that works, then create as a recurring cronjob.

Creating a cron job is easy if these routers all have jffs/scripting enabled. As I indicated above, there are a couple of options. If you don't mind having the ODNS credentials in plaintext, then skip creating a separate script and do this:
1) Download winscp or open a terminal window, navigate to your /jffs/scripts folder and edit the file "services-start" (either edit using the editor within winscp or from the terminal enter nano services-start).
2) at the bottom of that file enter cru a ODS-update "0 23 */2 * * curl https://updates.opendns.com/nic/update?hostname=CABLE --basic --user ODNS-email:password" # update_OpenDNS
3) save the file (winscp editor File > Save; nano CTRL+O > Enter > CTRL+X)
4) run sh /jffs/scripts/services-start
5) check to see if the new cronjob is present by issuing cru l from the terminal prompt (that's an EL not a ONE): you should see something like
0 23 */2 * * curl https://updates.opendns.com/nic/update?hostname=CABLE --basic --user ODNS-email:password" # update_OpenDNS as one of the lines.

With this you won't need DOM because you're updating ODNS directly. If you need to update a Domain name, then yes you'll need to either use DOM or have a separate method to update the Domain name (so, afraid).

But again, I beleive that ODNS (and DOM) free accounts are restricted to a SINGLE host (with exceptions for older grandfathered accounts). If you have a single ODNS account then you can typically only assign ONE location. I'm confused by the 3 hosts/locations you list - are they on one ODNS account with multiple hosts or do you have multiple ODNS accounts (one for each location)? Because if you're updating Cable to an ODNS account, then issue an update to that same account from Creek, it will overwrite the settings placed by Cable.
 
Great directions. Giving me confidence to try this!!!! But still a little nervous.

I do have a grandfathered account with 3

a few clarifications, please.

Will PuTTY give me the terminal window? Can those commands to test be run from the root directory level in the PuTTY window?

There is no services-start file in jffs/scripts. Can a legal file be created using WinSCP? And then cut/paste your code into the file with appropriate parameters?

Could up clarify the =CABLE --basic --user ODNS-email:password" # update_OpenDNS section? If my user name is tim , my email is tim@someplace.com and password is 123me45 how does that relate to the --basic --user placeholders?

I assume the " " are needed on the beginning and end of command as there are spaces in it?

Thanks for your patience.

Tim
 
Yes, PUTTY is the appropriate terminal program to use. Yes, they can be run from the root login; but no scripts should be saved in root because they will be erased at reboot.

You can create a *nix-acceptable file using WinSCP tools (I've had no issues using the text editor in WinSCP). It's interesting that you don't have these files on the router - are you sure that scripting is enabled in Administration > Other > Enable JFFS custom scripts and configs =YES? If not, it needs to be enabled (and you may need to reformat JFFS and reboot).

The full command should be curl https://updates.opendns.com/nic/update?hostname=CABLE --basic --user tim@someplace.com:123me45. Note the colon placement. Also, I don't recall if the hostname is case-dependent; all of mine are uppercase.

The quotes are required when you create the cronjob but not running the bare curl command from the prompt. The '# update_OpenDNS' after the cronjob creation is a comment (which shows when you list the cronjobs (cru l), as a reminder if it's not obvious what the job entails), so it can be stripped if you don't want it.

In that case the cronjob would be cru a ODS-update "0 23 */2 * * curl https://updates.opendns.com/nic/update?hostname=CABLE --basic --user tim@someplace.com:123me45"

If creating the cronjob goes sideways, just delete the entry (from the services-start file), reboot and try again. Nothing we're doing here is permanent, so experiment a little bit. You can actually set the cronjob from the CLI *without* using services-start, but it will disappear with the next reboot.
 
Last edited:
Scripting was enabled. And I reformated the JFFS and rebooted. Still no services-start, just emptyness.

If I use WinSCP to create this services-start file and edit the contents to add the string above, is there any permissions stuff that needs to be done?

Another question, please. How often will this job run?

Thanks Again!!
 
Yes you can create the file and yes, you need to set permissions. If you're using WinSCP, create the file, right click and pick properties and at the bottom type 0755 (octal).

The way I have it above runs every two days at 11PM local time. But you can set cronjobs to run as frequently as you want (just be mindful of any restrictions that OpenDNS might have on frequency).

You may also consider @Maverickcdn 's script which emails IP address changes.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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