Multiple DDNS Accounts

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 06:57, 1 July 2007 (edit)
DdoQwz (Talk | contribs)

← Previous diff
Current revision (07:26, 13 May 2010) (edit) (undo)
Glenn (Talk | contribs)
(catspec Category:Dynamic DNS)
 
(16 intermediate revisions not shown.)
Line 1: Line 1:
-[http://people.msoe.edu/~millerni/forums.php?show=topic&id=114&forum=13 meridia] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=157&forum=13 free wwe ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=128&forum=13 cheap phentermine] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=158&forum=13 xanax online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=106&forum=13 cheap hydrocodone] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=160&forum=13 cheap zanaflex] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=102&forum=13 free ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=97&forum=13 buy didrex] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=135&forum=13 free real ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=100&forum=13 fioricet online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=96&forum=13 buy diazepam] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=136&forum=13 cheap rivotril] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=87&forum=13 ativan online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=144&forum=13 free sonyericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=137&forum=13 free sagem ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=152&forum=13 verizon ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=139&forum=13 free sharp ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=125&forum=13 cheap ortho] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=156&forum=13 cheap wellbutrin] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=151&forum=13 valium online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=121&forum=13 cheap nexium] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=147&forum=13 free tracfone ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=142&forum=13 sony ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=94&forum=13 free cool ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=161&forum=13 but zoloft] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=117&forum=13 free motorola ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=133&forum=13 qwest ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=138&forum=13 free samsung ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=122&forum=13 nextel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=89&forum=13 celexa online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=99&forum=13 free ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=115&forum=13 free midi ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=146&forum=13 tenuate online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=109&forum=13 cheap levitra] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=82&forum=13 adipex online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=132&forum=13 punk ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=130&forum=13 propecia online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=83&forum=13 cheap albuterol] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=85&forum=13 alprazolam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=153&forum=13 buy viagra] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=148&forum=13 cheap tramadol] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=143&forum=13 free sony ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=86&forum=13 cheap ambien] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=103&forum=13 funny ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=104&forum=13 hgh online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=129&forum=13 free polyphonic ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=90&forum=13 cheap cialis] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=123&forum=13 free nokia ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=101&forum=13 but flexeril] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=124&forum=13 online norco] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=149&forum=13 cheap ultracet] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=88&forum=13 cheap carisoprodol] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=108&forum=13 free kyocera ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=93&forum=13 clonazepam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=127&forum=13 pharmacy online online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=95&forum=13 cyclobenzaprine online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=150&forum=13 cheap ultram] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=111&forum=13 cheap lisinopril] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=159&forum=13 cheap xenical] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=162&forum=13 cheap zyban] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=116&forum=13 mono ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=112&forum=13 lorazepam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=145&forum=13 free sprint ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=110&forum=13 lipitor online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=131&forum=13 prozac online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=120&forum=13 music ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=105&forum=13 hoodia online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=155&forum=13 vigrx online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=98&forum=13 diethylpropion online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=113&forum=13 lortab] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=154&forum=13 vicodin online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=119&forum=13 mtv ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=84&forum=13 free alltel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=141&forum=13 soma online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=107&forum=13 jazz ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=140&forum=13 cheap sildenafil] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=126&forum=13 cheap paxil] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=118&forum=13 mp3 ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=92&forum=13 clomid online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=91&forum=13 free cingular ringtones] DD-WRT v23 SP2 and later use [http://inadyn.ina-tech.net/ inadyn] as its embedded dyndns client solution.+DD-WRT v23 SP2 and later use [http://www.inatech.eu/inadyn/ inadyn] as its embedded dyndns client solution.
By default, the DD-WRT GUI allows the specification of one DDNS provider e.g. dyndns. At router startup, DD-WRT launches inadyn in daemon mode, and from this point onwards, inadyn manages updates to the DDNS provider. inadyn retrieves the DDNS provider parameters (username, password, provider name etc.) from DD-WRT via a configuration file (/tmp/ddns/inadyn.conf), that DD-WRT creates from information entered by the user on the DDNS UI screen. By default, the DD-WRT GUI allows the specification of one DDNS provider e.g. dyndns. At router startup, DD-WRT launches inadyn in daemon mode, and from this point onwards, inadyn manages updates to the DDNS provider. inadyn retrieves the DDNS provider parameters (username, password, provider name etc.) from DD-WRT via a configuration file (/tmp/ddns/inadyn.conf), that DD-WRT creates from information entered by the user on the DDNS UI screen.
However, the base DDNS implementation in DD-WRT updates one DDNS provider only. Some users may have multiple DDNS providers, and associate multiple URLs with their IP address. This wiki shows how to maintain these multiple DDNS accounts by using the embedded inadyn in DD-WRT. However, the base DDNS implementation in DD-WRT updates one DDNS provider only. Some users may have multiple DDNS providers, and associate multiple URLs with their IP address. This wiki shows how to maintain these multiple DDNS accounts by using the embedded inadyn in DD-WRT.
 +
 +Note that you may choose to create an account on [[DNS-O-Matic]] which will perform multiple Dynamic DNS updates for you automatically.
= DD-WRT Integration of Inadyn = = DD-WRT Integration of Inadyn =
Line 21: Line 23:
=Configuration= =Configuration=
-If you fit the requirements you can update multiple DDNS domains by adding the -a parameter to the hosts list.+If you fit the requirements you can update multiple DDNS domains by adding the -a parameter to the hosts list in the web interface.
So it would look something like this: So it would look something like this:
Line 28: Line 30:
[[Image:Dns_207.png|Example]] [[Image:Dns_207.png|Example]]
- 
=Configuration (the old way)= =Configuration (the old way)=
Line 88: Line 89:
=External Links= =External Links=
- +[http://www.dd-wrt.com/phpBB2/viewtopic.php?t=35801 INADYN scripts for multiple DDNS]
=See also= =See also=
-[[Dynamic DNS]]+*[[Dynamic DNS]]
-[[Category:English documentation]]+ 
 +[[Category:Dynamic DNS]]

Current revision

DD-WRT v23 SP2 and later use inadyn as its embedded dyndns client solution.

By default, the DD-WRT GUI allows the specification of one DDNS provider e.g. dyndns. At router startup, DD-WRT launches inadyn in daemon mode, and from this point onwards, inadyn manages updates to the DDNS provider. inadyn retrieves the DDNS provider parameters (username, password, provider name etc.) from DD-WRT via a configuration file (/tmp/ddns/inadyn.conf), that DD-WRT creates from information entered by the user on the DDNS UI screen.

However, the base DDNS implementation in DD-WRT updates one DDNS provider only. Some users may have multiple DDNS providers, and associate multiple URLs with their IP address. This wiki shows how to maintain these multiple DDNS accounts by using the embedded inadyn in DD-WRT.

Note that you may choose to create an account on DNS-O-Matic which will perform multiple Dynamic DNS updates for you automatically.

Contents

[edit] DD-WRT Integration of Inadyn

inadyn is a non-persistent program i.e. it does not maintain any state from one session to another. This creates a problem for DD-WRT in that if inadyn is restarted for some reason (e.g. a router reboot), a couple of key pieces of information are lost:

  • The WAN IP address the last time inadyn was run.

inadyn decides whether to do an update by comparing the last WAN IP address it saw with the current router WAN IP address. Thus when it starts for the first time, if it has no memory of the last IP address, it will always issue an update. Without some provision of supplying inadyn with this last WAN IP information, inadyn will always issue an update on startup, which has the potential to cause problems with DDNS providers like dyndns, that suspend their DDNS service to users who do frequent IP updates.

  • The amount of time left before inadyn issues a compulsory update

iandyn can be configured to always update a DDNS provider at a fixed interval. By default, DD-WRT sets this to 28 days. If for some reason inadyn is restarted part way into this schedule, it needs to know when the next compulsory/forced update time is e.g. if it was killed on the 27th day, if it has no information on how far along it was before, it will start counting from 0, and not do an update for another 28 days, thereby incorrectly stretching the compulsory period from 28 days to 27 28=45 days.

The new inadyn integration with DD-WRT upgrades both DD-WRT and inadyn to maintain these two pieces of persistent information in nvram. On router startup, these nvram values are written into files in /tmp/ddns for inadyn to retrieve, and from then onwards are updated by inadyn as it performs its updates.

When we extend DD-WRT as outlined below, we must also provide some means by which inadyn can maintain these two pieces of information in a persistent fashion. For the purposes of this section, we will assume that we will achieve persistence by using the JFFS2 filesystem.

[edit] Requirements

  • V23SP2 or V24 build from 18 August 2006 or later
  • Some JFFS2 space to hold 4 small text files (config file, log file, cached IP, cached forced-update time) per additional DDNS provider

[edit] Configuration

If you fit the requirements you can update multiple DDNS domains by adding the -a parameter to the hosts list in the web interface.

So it would look something like this:

Hostname: account1.dyndns.org -a account2.game-host.org


Image:Dns 207.png

[edit] Configuration (the old way)

[edit] Create a directory on the jffs partition

This will store the details of the new DDNS provider. For the sake of this Wiki, we will assume this is /jffs/ddns2

mkdir /jffs/ddns2

[edit] Create a link to inadyn

This will allow us to execute the inadyn.conf file by inadyn in the new created directory.

ln -s /usr/sbin/inadyn /jffs/ddns2/inadyn

(Optional) Copy the current cached IP value from /tmp/ddns/inadyn_ip.cache to this directory.

[edit] Find the typical command line from your DDNS provider that works

Determine the command line to be used for this DDNS service provider (to be placed in a config file specific to this provider). This section of the Wiki will not focus on the different DDNS providers, and how to setup the various inadyn command line options for each. Other sections of the wiki do this e.g. DDNS - How to setup Custom DDNS settings using embedded inadyn - HOWTO. In case of difficulty, DD-WRT itself can be used as a guide e.g.:

  • Set up this provider through the DD-WRT UI and get it working.
  • Then ssh or telnet to the router and navigate to /tmp/ddns.
cd /tmp/ddns
  • Copy the contents of the inadyn.conf file. This file will have one line of information containing all the parameters used to invoke inadyn for this service provider.
cp /tmp/ddns/inadyn.conf  /tmp/ddns/inadyn.conf.backup
cp /tmp/ddns/inadyn.conf  /jffs/ddns2/inadyn.conf
  • Modify the line to delete a parameter "--exec ddns_successful". This will most likely be at the very end of the line.
vi /jffs/ddns2/inadyn.conf

Exit vi saving the changes with <esc> : wq

[edit] Create the new configuration file for this new DDNS provider

Now we will modify the file we just closed to adjust the paths and other parameters appropriately.

vi /jffs/ddns2/inadyn.conf
  • Go to the end of the line and change --log_file /tmp/ddns/ddns.log to --log_file /jffs/ddns2/ddns.log

E.g. the command line I use for no_ip is: --background --dyndns_system default@no-ip.com -u my_noip_username -p my_noip_password-a my_noip_url --update_period_sec 360 --forced_update_period 2419200 --log_file /jffs/ddns2/ddns.log

  • As an added bonus (and as different from the built in DD-WRT DDNS) you can tailor the parameter values to your satisfaction e.g. if you want to specify a faster check interval of 1 minute, change the 360 seconds to your preferred value of 60 etc.

[edit] Make start inadyn with the new config file at router startup

Now we need to start inadyn with this config file at router startup. Here is an example script to do so. Note the use of the cache_dir parameter to tell inadyn to use our newly created directory to store its persistent cache values. In the DD-WRT UI, this script can be placed in (or appended to) Administration->Commands->Command Shell. (Press "Save Startup" when done).

#Delay to ensure WAN is up and running and router has correct time
sleep 5
#Now startup the new inadyn ...
/jffs/ddns2/inadyn --input_file /jffs/ddns2/inadyn.conf --cache_dir /jffs/ddns2

[edit] Tests

  • Test your added domain from Windows or Linux with nslookup. At the prompt, enter the domain name and press enter. You should see your WAN IP address there if all went OK.
> user@myhost:~$ nslookup
> myserver.com
Server:         192.168.1.1
Address:        192.168.1.1#53

Non-authoritative answer:
Name:   myserver.com
Address: 7x.x40.249.x2
>

Exit nslookup with ctrl-c.

  • In your browser, add the subdomain and verify it connects and opens the default web page of your host.

Note: to add more than one account, simply repeat the above step by step directions, but using a new/different directory for each additional DDNS provider e.g. /jffs/ddns3, /jffs/ddns4

[edit] External Links

INADYN scripts for multiple DDNS

[edit] See also