xyzzy

rxdyndns.zip 1.3

0.      Contents of rxdyndns.zip 1.3:
0.1     RXDYNDNS.HTML   this text
0.2     RXDYNDNS.CMD    simple DynDNS update script for OS/2 REXX
0.3     WATCHPPP.CMD    simple OS/2 ppp0 daemon using RXDYNDNS.CMD
0.4     WATCHPPP.ICO    a nice icon for <WATCHPPP.CMD> PPP0.DAEMON

1.      Prerequisites
1.1     RXSOCK.DLL      REXX sockets library from IBM
1.2     ppp0.pid        ?:\mptn\etc\ppp0.pid watched by WATCHPPP.CMD
        ifconfig.exe    dynamic IP determined by IFCONFIG PPP0
1.3     HOSTNAME        your DynDNS host(s) , e.g. test.dnsalias.org
        USERNAME        your DynDNS loginid., e.g. test
        PASSWORD        your DynDNS password, e.g. test for test

2.      Installation
2.1     Copy WATCHPPP.CMD and RXDYNDNS.CMD to a directory in your PATH.
        Edit WATCHPPP.CMD to reflect your HOSTNAME, USERNAME, PASSWORD.

2.2     Optionally specify multiple comma separated hosts as HOSTNAME.
        Optionally specify DynDNS parameters in VARIABLE, i.e. replace
        the dummy 'system=dyndns' by one or more parameter=value pairs
        separated by & or semicolon.  You cannot use wildcard=YES or
        wildcard=NO, RXDYNDNS automatically forces wildcard=NOCHG.  Do
        not use any myip=... or hostname=... (handled by RXDYNDNS.CMD).

2.3     Please note that system=custom and offline=YES are no free
        services.  RXDYNDNS does not support system=statdns.

2.4     Use 'WATCHPPP *' (once) to (re)create a WPS object PPP0.DAEMON.
        Edit PPP0.DAEMON settings as needed, e.g. add the WATCHPPP.ICO
        or modify argument 10 (the ppp0.pid check interval in seconds).

2.5     Create a shadow of PPP0.DAEMON in startup folder <WP_START>.
        Start PPP0.DAEMON manually for the first time, or reboot :-).
        Move object PPP0.DAEMON from the desktop to any other folder.

3.      WATCHPPP.CMD
3.1     The shipped version of WATCHPP.CMD updates a DynDNS host with
        call RXDYNDNS 'ppp0', 'test.dnsalias.org', 'test', 'test'
        You can edit this script as needed, e.g. start other tasks as
        soon as a new IP (= dialup internet connection) is detected.

3.2     WATCHPPP.CMD can be used as VIO program on the command line or
        as PM program (started by CMD.EXE or PMREXX.EXE).  At most one
        instance of WATCHPPP.CMD can run for any given interface, the
        default interface is IFCONFIG = 'ppp0'.

3.3     To start a new PPP0.DAEMON call e.g. WATCHPPP 10 for a poll
        cycle of 10 seconds.  The new PPP0.DAEMON automatically sends
        a termination request to a running daemon.  PPP0.DAEMON uses
        a REXX queue 'PPP0.DAEMON' to read the output of IFCONFIG.EXE,
        and terminates itself if anybody else writes into its queue.
        Use WATCHPPP 0 to send a termination request to a PPP0.DAEMON
        without starting a new instance - or simply abort it with ^C.

3.4     Specify a negative number like WATCHPPP -10 for a poll cycle
        of 10 seconds and messages even for successful (good) updates.
        Normally (positive number) only problems are displayed.

        Please note that WATCHPPP waits for OKAY / CANCEL (in PM) or
        ENTER / ESC (VIO) after each message.  There is no unattended
        error recovery.  Don't run WATCHPPP in a DETACHed session, use
        a minimized VIO or PM session.

3.5     WATCHPPP called without argument displays a short usage info
        and its actual configuration, the defaults on my system are:
      |  usage: G:\BIN\watchppp.cmd [seconds|0|-|*]
      |  checks E:\MPTN\ETC\ppp0.pid cyclically with the given delay.
      |  If changed and IFCONFIG ppp0 shows a new IP, then host(list)
      |  test.dnsalias.org
      |  is updated with the configured parameters:
      | G:\BIN\RXDYNDNS.CMD ppp0 host(list) test test system=dyndns
      |
      |  Specify seconds < 0 to get a message even for GOOD updates,
      |  use "G:\BIN\watchppp.cmd 0" to kill a running PPP0.DAEMON,
      |  use "G:\BIN\watchppp.cmd -" for offline=YES
      |  use "G:\BIN\watchppp.cmd *" to create a PPP0.DAEMON object.

3.6     Again, to change the default configuration just edit HOSTNAME,
        USERNAME, PASSWORD, and VARIABLE at the begin of WATCHPPP.CMD.

4.      RXDYNDNS.CMD
4.1     RXDYNDNS can be used directly on the command line to update
        a DynDNS host: RXDYNDNS interface hostname username password,
        e.g. try RXDYNDNS ppp0 test.dyndns.org test test

4.2     Please edit the line COPYLEFT = ... in RXDYNDNS.CMD as soon
        as you change anything else in this script, because DynDNS
        can block erroneous or abusive update clients.

4.3     RXDYNDNS.CMD does not actually handle the DynDNS protocol,
        it only displays or returns the result of an attempted
        update. The caller has to evaluate the result messages as
        specified in DynDNS return codes.

4.4     WATCHPPP.CMD simply displays any RXDYNDNS.CMD problem, so the
        user is responsible for the proper reaction like waiting for
        a certain period or correcting invalid WATCHPPP parameters.

4.5     RXDYNDNS.CMD called without argument shows a short usage info:
      |  usage: rxdyndns.cmd interface hosts login password [param]
      |   e.g.: rxdyndns.cmd ppp0 test.dnsalias.org test test mx=NOCHG
      |   e.g.: rxdyndns.cmd ppp0 test.dnsalias.org test test
      |  where multiple comma separated hosts are allowed.
      |  Separate parameters with "&" or ";" (not spaces),
      |  parameter wildcard=NOCHG enforced by rxdyndns.cmd.

4.6     If called as REXX FUNCTION / PROCEDURE by WATCHPPP (instead of
        a COMMAND line call) RXDYNDNS only returns the update result
        to its caller.  Otherwise the result is also written on STDOUT,
        normally the screen.  In both cases update results are sent to
        a local SysLog daemon (RfC 3164, UDP port 514) if available.

5.      History
5.1     I've written RXDYNDNS 0.3 because DNSAlias-Net 2.0 had been
        removed from the list of "other clients" for some time 2002.
        It's now back again, see the list of other DynDNS clients.

5.2     New features in RXDYNDNS.CMD version 0.7:
        You can specify multiple comma separated hosts, example line:
        RXDYNDNS.CMD ppp0 test.dnsalias.org,test.dyndns.org test test

        Updates are sent to http://members.dydns.org:8245/nic/update.
        You can add certain DynDNS parameters as fifth argument, e.g.:
        RXDYNDNS.CMD ppp0 test.dnsalias.org test test offline=YES
        RXDYNDNS.CMD ppp0 test.dnsalias.org test test system=custom
        RXDYNDNS.CMD ppp0 test.dnsalias.org test test mx=your.mx.test

        Separate multiple additional parameters with '&' or semicolon
        as in system=custom&offline=YES or system=custom;offline=YES
        Internally commata, ampersands, semicolons, and even blanks
        are accepted as separators, but in the resulting GET HTTP/1.0
        query parameters are separated by ampersands and hostnames by
        commata, resulting in query parameter hostname=host1,host2 etc.

        Normally RXDYNDNS does not allow you to update a host, if its
        IP is already set.  Now the presence of parameter &offline=YES
        bypasses this restriction.   You MUST NOT specify &offline=NO,
        this feature is reserved for manual tests.  Only donators are
        allowed to use &offline=YES, otherwise you'd get a "!donator".

        The error message "nohost" normally indicates an unknown host.
        In the case of parameter &system=custom or &system=statdns
        "nohost" can also indicate a host not known in the specified
        system.

5.3     Do not use parameters mx=what.ever.test and backmx=NO (or YES)
        without the prior consent of postmaster@what.ever.test, and do
        not specify your own single host as MX.  With dynamic IPs it's
        utter dubious to run a SMTP daemon.  At certain times your host
        name will be resolved to a dynamic IP of another online system,
        e.g. if old (= cached) DNS records are used beyond expiration.

5.4     In one trivial case feel free to edit RXDYNDNS.CMD keeping its
        original COPYLEFT:  If you're behind a firewall blocking port
        8245, simply replace 8245 by 80.  A certain German ISP is known
        to redirect the very first HTTP GET on port 80 to its own site.
        Maybe add a dummy RXGETURL to WATCHPPP before calling RXDYNDNS
        if you are forced to use this ISP and port 80.

5.5     Version 0.8 was a bug fix, for details see the RXSYSLOG demo.

        Version 0.9 reports "IP already set" as "nochg IP already set".
        WATCHPPP now supports retries after errors, because I often got
        spurious "unknown host" errors caused by DNS delays.  Use OKAY
        (Enter) to continue in these cases.  Please use CANCEL (Esc)
        after real errors reported by DynDNS to kill WATCHPP.  It is
        still your job to interpret error messages, WATCHPPP recognizes
        only "good" and "nochg".

        SPF (Sender Policy Framework) can be used with system=custom.
        Use the advanced interface to create a corresponding DNS TXT
        record once, a powerful example is "v=spf1 a mx -all".

5.6     Version 1.0 supports the new (2005) mx=NOCHG and backmx=NOCHG
        parameters.  The latter is now the default, use backmx=OFF to
        disable it.

        Version 1.1 supports hosts in the noxadyndns.de or h3c.de
        domains.  See http://www.noxa.de/?noxadyndns-compat for
        details (German text).  Only a minimal subset of the DynDNS
        protocol is supported, they offer their own SMTP-like telnet
        user interface for complex tasks.

        With noxa.de users can define TXT records for SPF policies.
        Please note that RXDYNDNS doesn't support mixtures of hosts,
        each call only updates hosts at one DNS provider.

        Version 1.2 was another attempt to unify the RxSock.dll use,
        minor bugs not affecting good updates fixed in version 1.3.

5.7     This is version 1.3 of RXDYNDNS.CMD, for future updates see
        <URL:http://purl.net/xyzzy/src/rxdyndns.zip> (= ZIP archive),
        <URL:http://purl.net/xyzzy/rxdyndns.htm>     (= HTML manual),
        <URL:http://purl.net/xyzzy/sources.htm>      (other scripts).

W3 validator Last update: 15 Jun 2007 15:00 by F.Ellermann