OK, Since dyndns.org is now exit for free users, a little contribution from my side in howto automatically update dnsomatic to prevent an account loss.
Ofcourse you need a dnsomatic account (
www.dnsomatic.com) and a DDNS account (for instance noip.me). Make sure dnsomatic works.
Router setup:
Use putty.exe and logon to the router. (enable SSH in router -Administration -System)
I created a file called
ez-ipupdate.conf in /jffs with content:
Code:
service-type=dnsomatic
user=[yourusername]:[yourpassword]
interface=eth0
host=all.dnsomatic.com
I then created a file called
dnsomatic.sh in /jffs/scripts with content:
Code:
#!/bin/sh
# Called by init-start. Periodically updating DNS-O-Matic
# L. de Bles, 2014
/usr/sbin/ez-ipupdate -c /jffs/ez-ipupdate.conf
Another file called
init-start in /jffs/scripts with content:
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 "00 18 * * 0 /jffs/scripts/dnsomatic.sh"
Don't forget to make files executable:
chmod a+rx /jffs/scripts/* .
Just to check: run /jffs/scripts/init-start.
Check if updateschedule is set (crontab -l)
After rebooting dnsomatic is updated every sunday at 1800.
Just for fun: If you would like to auto update dnsomatic every time your WAN ip is changed, create or edit the file /jffs/scripts/wan-start
Code:
#!/bin/sh
# Auto updating DNS-O-Matic at WAN IP change.
# L. de Bles, 2014
sleep 5
/usr/sbin/ez-ipupdate -c /jffs/ez-ipupdate.conf
Make sure to make file executable (chmod a+rx /jffs/scripts/*)
Reboot your router to make changes effective.
Tip:
Edit a file with: vi /jffs/[filename]
Insert tekst by hitting "i" (insert)
Exit inserting by using [ESC]
Save file with: :wq
Exit file without saving: :q!