INADYN - Simple DYNAMIC DNS client.

Version 1.96.2, 12.March.2007

INADYN Help

INADYN is a dynamic DNS client. That is, it maintains the IP address of a host name. It periodically checks whether the IP address stored by the DNS server is the real current address of the machine that is running INADYN.

Download




Last version (1.96.2)
Complete: source code + binaries:
Inadyn ver. 1.96.2 Source Code + binary for Windows and Linux



Older versions:

Source Code + binary for Windows and Linux ver. 1.96
Binary 1.96 version for MAC OS
Source Code + binary for Windows and Linux ver. 1.95
Source Code + binary for Windows and Linux ver. 1.90


Features:

  • supports the following dynamic DNS services:
  • dyndns.org (in all three flavors: dynamic, static, custom)
  • freedns.afraid.org
  • zoneedit.com
  • no-ip.com
  • maintains up multiple aliases of the same IP address
  • runs as a service (Windows 2000/XP, Linux)
  • or runs as a console application
  • updates the correct IP address even behind a NAT router.
  • supports access via http proxy
  • does not perform unnecessary updates.
  • has 'install and forget it feature'. That is, after install one can completely forget about it. No maintenance required. (as long as no bugs are found;-)


Installation

    For Windows:
  1. IF you are planning to let inadyn run as a service. For installation you need Administrator rights and you need to launch the utility batch: install_inadyn_service.bat from the same directory where inadyn.exe is located. This will allow a standard console application like inadyn to run as a service. The programs intsrv.exe, srvany.exe are standard programs that can be also found on Windows 2000 res Kit CD. 
    Note:  Since re-distributing the above mentioned programs seems to be illegal, they are not provided in  the inadyn package. These programs have to be downloaded (if don't already have them) and copied in the inadyn/bin/win32 directory. After a bit of googling I found some links where one can download them:
    Download the whole Windows Server 2003 Resource Kit Tools from Microsoft or the following alternate sites
    http://www.electrasoft.com/srvany/srvany.htm
     ftp://ftp.microsoft.com/bussys/winnt/winnt-public/reskit/nt40/i386/srvany_x86.exe
  2. Edit the registry file with the correct name for your service (e.g. 'configure_inadyn_service_dyndns.reg') in order to pass your username, password, aliases, and other params to inadyn. After you have finished double click on the reg file.

    Notes:

    After you have finished double click on the reg file.

  3. Go to ControlPanel/AdministrativeTools/Services/inadyn and START the service. Also make sure that the startup mode is 'automatic'.
    For Linux:
  1. No installation necessary. The inadyn executable found in bin/linux/inadyn is self contained and can be launched at any time
    For Macintosh (thanks to Rob.S)
  1. Put the binary somewhere in path (e.g. ~/bin),
    Start it with the following AppleScript saved as an Application and dragged to
    System Preferences -> Accounts -> Login Items:

    do shell script "~/bin/inadyn -a HOST.dyndns.org -u USER -p PASSWORD"


    Alternatively, one can put it in the system startup scripts.

    For other operating systems:
  1. Recompile and set the TARGET_ARCH to your own: 
  2. make TARGET_ARCH=myOS clean all
  3. This will produce an executable in the bin/myOS directory.
 

Example usage:

(See command line options below in order to build your own command line)

 1. Update every minute, in console mode, for a dyndns.org system.
inadyn --username test --password test --update_period 60000 --alias test.homeip.net --alias my.second.domain

2. Update every minute, in demon mode (background task), with log file, of an dyndns.org address:
inadyn --background -u test -p test --update_period 60000 --alias inarcis.homeip.net --alias my.second.domain --log_file inadyn_srv.log

3. Update every minute, in daemon mode, with configuration read from file of an address from freedns.afraid.org
Config file (can be placed anywhere, but in linux is convenient in default location: /etc/inadyn.conf
Content of cfg file:
--update_period 60000
--alias test.homeip.net,hash_for_host1
--log_file /var/log/inadyn.log
--change_persona 10012 #to change to another user id after init. (less rights, more secure)
Launching of inadyn does not need any params. It looks for /etc/inadyn.config

4. Freedns update in console
inadyn --update_period 60000 --alias test.homeip.net,hash_for_host1 -a my.second.domain,hash2 --dyndns_system default@freedns.afraid.org
Note:
    'hash' is extracted from the grab url batch file that is downloaded from freedns.afraid.org
(See also special note)

5. DynDns update of a custom DNS service
inadyn --dyndns_system custom@dyndns.org -u USER -p PASS -a HOST

6. no-ip.com update
inadyn --dyndns_system default@no-ip.com -u USER-p PASS -a HOST


Configuration file

Inadyn can read the very same options which can be present in the command line from a configuration file. This feature allows the user to write the options only once, and avoids frequent retyping.
Default configuration file is /etc/inadyn.conf under Unix systems.
The location of the config file can be given ot inadyn via --input_file option

The format :
- '#' is a comment sign.
- the long options (those with '--' in front) can also be placed at the beginning of the line without '--' signs

Examples:
1.
#Some comment about  inadyn  cfg file
--username test --password test --update_period 60000 --alias test.homeip.net --alias my.second.domain

2.
--username test #user
--password test
update_period 60000  #some other param without '--'
alias test.homeip.net


LOG Output
Inadyn prints some message when the ip is updated. If no update is needed by default it prints a '.' every time when it performs a name check. So typically you will see a lot of dots in the log file. (only if verbose level is greater than 0).
When the connection goes down it is possible that inadyn displays some errors. But they should be followed by 'OK' messages after the connection is up again.


Special notes for freedns.afraid.org

They prefer to get as parameter a single hashed (base64 encoded) value instead username, password.
This saves some computing resources apparently. The hash cannot be computed by inadyn because it involve the database index of your username in freedns database which is not known.
The simplest solution seems to be the copy-paste action from the graburl batch file offered on their website.

Example: The batch file looks like this:
graburl http://freedns.afraid.org/dynamic/update.php?YUGIUGSEIUFGOUIHEOIFEOIHJFEIO=
The user has to copy and paste the hash value after the '?' until the end of line.
The hash will be used as additional param in --alias option. (see typical usage above)

Command line options

They are automatically printed if inadyn gets wrong parameters or if --help option is used.

Parameters:

'--help': help
'-h': help

'--username': your membername/ hash
'-u': your membername / hash

'--password': your password. Optional.
'-p': your password

'--alias': alias host name. this option can appear multiple times. (for each domain that has the same IP)
'-a': alias host name. this option can appear multiple times.

'--input_file': input file name that contains inadyn command options (adds to those already present in the cmd line). The default configuration file name is '/etc/inadyn.conf'. It is only used if inadyn is called without any command line options. This allows inadyn to be called without any arguments. The format is as expected for a **NIX config  file. See below for details.

'--ip_server_name[:port] url': The client IP is detected by calling 'url' from this 'ip_server_name:port'. Defaults to checkip.dyndns.org:80 /.

     '--dyndns_server_name': [[:port]]

The server that receives the update DNS request.
If no proxy is wanted, then it is enough to set the dyndns system. The default servers will be taken.

'--dyndns_server_url'
full URL relative to DynDNS server root.

'--dyndns_system': [NAME] - optional DYNDNS service type. SHOULD be one of the following:

-For dyndns.org DNS system: dyndns@dyndns.org OR statdns@dyndns.org OR custom@dyndns.org.
-For freedns.afraid.org DNS system: default@freedns.afraid.org .
-For the servcie ofered by zoneedit.com: default@zoneedit.com.
- For no-ip.com : default@no-ip.com
-For generic DNS system: custom@http_svr_basic_auth
DEFAULT value is intended for default service at dyndns.org: dyndns@dyndns.org

'--proxy_server': [NAME[:port]] - the http proxy server name and port. Default is none.
'--update_period': how often the IP is checked. The period is in [ms]. Default is about 1 min. Max is 10 days
'--update_period_sec': how often the IP is checked. The period is in [sec]. Default is about 1 min. Max is 10 days
'--forced_update_period': how often the IP is updated even if it is not changed. [in sec]
'--log_file': log file path abd name
'--background': runs in background.  Output to syslog or to log file [if specified].
'--verbose': set dbg level. 0 to 5
'--iterations': set the number of DNS updates. Default is 0, which means infinity.
'--syslog': explicit set output to syslog. (e.g. /var/log/messages). Works on **NIX systems only.
'--change_persona uid[:gid]': After init changes user ID and group ID to the provided ones. This allows dropping unneeded [root] privileges after startup. Works for **NIX only.

Support and Bug reports


Since this is free software the support [for free] is quite thin. However, the bugs are usually fixed very fast if they are reported.
No active testing is performed so without user feedback the bugs won't get discovered and fixed.

Contact info:

Web: inadyn.inatech.eu

HISTORY


Ver.  1.96.2 - 12 March 2007
    Fixes:
       - If the Dynamic DNS server responds with an error Inadyn will abort. This will prevent further retries with wrong dyndns credentials.
       - Default port number included in the request, to support the requests via Proxy, to ports different than 80.
       - Simplified main inadyn update loop function. (there was no bug there)

Ver.  1.96 - 09 September 2005
    New features:
       - zoneedit.com supported.
       - no-ip.com supported.
       - support for generic DNS services that support HTTP updates
   Fixes:
       - immediate exit in case of --iterations=1 (not after a sleep period)
       - added missing option for specifying the path in the DNS server

Ver.  1.95 - 20 July 2005
    New features:
       - UNIX signals supported - inadyn will stop gracefully in case of  ALRM, HUP, INT, ...
       - new dynamic dns service supported - www.zoneedit.com - Not tested!
       - makefile adjusted for Solaris - compilable under Solaris.
       - support for generic DYNDNS service that supports update via HTTP with basic authentication
          - not  yet fully complete. Not known where might be applicable.

Ver. 1.90 - 24 February 2005
    New features/enhancements:
       - new option '--change_persona uid:gid' - inadyn can switch the user after launch. Typical feature for daemons.
       - addition to '--ip_server_name' feature,  now it has another parameter: the URL to read from the given server name.
       -  reduced  some error messages
       - manual pages updated. (thanks to Shaul Karl)
    Bugfixes:
       - typo fixed (--ip_server_name option)

Ver. 1.86 - 30 January 2005
    Updated UNIX man pages for inadyn. Even a page for inadyn.conf! (thanks to Shaul Karl)
    Enhancement: - Inadyn doesn't print anything (e.g. ver. number) anymore when goes to background.
    Enhancement: - new config file parser. Accepts ESCAPE character: '\'.
    Bugfix: - Corrected check of the return code from socket() call.

Ver. 1.85 - 10 January 2005
    Config file related enhancements:
       - a default location for the config file in case of no arguments for inadyn
       - a more **NIX like format for the config file. Thanks to Jerome Benoit.

    Small bugfix:
       - in case when 'iterations' option is specified as being '1', inadyn exits immediately after first update, not after the sleep period as before.

Ver. 1.81 - 23 November 2004
    No new features. Just a better integration with Linux OS:
Reviewed usage of syslog and fork to background in 'daemon mode', thanks to Shaul Karl.

Ver. 1.80  - 16 October 2004
    New feature:
        --syslog: output to syslog for Linux (should work for all **nix systems)
    New feature:
        run in background for Linux (should work for all **nix systems)

    Minor compile warnings removed.

Ver. 1.70  - 5 July 2004
    Bugfix:
        custom dns from dyndns option was not accepted by the cmd line parser. "Copy-paste" error :-( !

    New option: (not tested. It was a debug option now made accessible via cmd line. It should work)
        --iterations. Now one can run inadyn with only one iteration.

Ver. 1.60  - 5 June 2004
    On users' request the inadyn can read the options from file. Ver. 1.5 - 1 May 2004
- Support for dynamic DNS service offered by freedns.afraid.org
- support for http proxy
- GPL Copyright notice added.

Ver. 1.4 - 1 March 2004
- Support for custom DNS and static DNS services offered by dyndns.org.
- support for forced IP update (so the account will not expire even though the IP never changes)

Ver. 1.35 - 04 february, 2004
- Bugfixes: - It supports AGAIN the multiple aliases for the same IP address
- Under Windows the OS signal handler is installed only once no matter if IP update errors occur

Ver. 1.34 - 6 Novemeber 2003
- first port *NIX (Linux)
- Linux version running as console app
- bugfixes

Ver. 1.2 - June 2003
- port to embedded system pSOS. Runs on the Remote management card.
Note:
No DNS support under pSOS -> input params are the IP addresses of the servers used (DynDNS, CGI)

Ver. 1.0 - 20 May 2003 - first stable version.
main features ready:

- DYNDNS client

- free
- works fine behind a NAT router
- runs fine as a service
- has a nice log file
- it is MINE ;)

Future plans:

- port to some other DNS services.



This page was visited so many times: since 11.Jan.2005