Copyright notice
================
janus 1.3 (c) 2004 Tiago Freitas Leal <tfl@netcabo.pt>

janus is a fork of ipsec_monitor v.0.1
Copyright (C) 2003 by Tim Niemueller <tim@niemueller.de>
Website: http://www.niemueller.de/software/perl/ipsecmonitor

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.


janus - Dynamic DNS watcher for FreeS/WAN & forks
=================================================
Watches dynamic DNS host name and replaces the connection when 
the IP address changes.

NOTE - janus should go into /usr/local/bin directory

---------------------------------------------------------------------

Usage:
janus [--script=SCRIPT -t t -d -nolog]
     Starts janus.
janus --restart [--script=SCRIPT -t t -d -nolog]
     Kills the present janus task and starts a new one.
janus --stop
     Stops janus.
Options:
     --script=SCRIPT: Path to an additional script that is executed
                      1 minute after the connection has been replaced.
                      For example routing stuff that needs to be done.
                      Script must be executable!
     -t t: Checks every t seconds if connection parameters have changed.
           Default is 180 seconds
     -d: Debug mode. Do not fork to background, log output to STDOUT.
     --nolog: Don't log.
     --ver Outputs version information


1 - CONFIGURATION
=================
At startup time janus reads its configuration from /etc/ipsec.conf.
Its parameters begin with "x_" but it also looks into other parameters.
Note - The "also" section is not recognized by janus.


1.1 - config setup section
	x_localdynamic=		acceptable value: host name

When this host name changes IP address, the whole IPSec subsystem
(including janus) is restarted and thus the local IP address is
updated on every connection. This also avoids the need to specify
the local host name on each and every connection.


1.2 - conn section (including conn %default)
	left=			acceptable value for janus: host name
	x_leftdynamic=		acceptable values: yes or no
	right=			acceptable value for janus: host name
	x_rightdynamic=		acceptable values: yes or no
	auto=			janus only cares about value start

If left isn't an host name, janus will ignore x_leftdynamic setting.
Likewise for right side.
Note - janus can watch only host names and not IP addresses.

When a "x_.....dynamic" host name change IP address, janus will force
the re-read of all secrets and replace (or add) the connection.
If "auto" is set to "start", it will also pull up the connection.


2 - ERRORS
==========
ERROR :"ignoring host"
REASON:
 - no host name specified
 - IP address specified instead of an host name
 - %any or 0.0.0.0 specified

ERROR: "name lookup failed"
REASON:
 - the host name couldn't be translated to an IP address but janus
   will keep watching it as this could be a temporary DNS server problem


Extract of ipsec.conf.5.html
----------------------------
Parameter names beginning with x- (or X-, or x_, or X_) are reserved for
user extensions and will never be assigned meanings by IPsec. Parameters
with such names must still observe the syntax rules (limits on characters
used in the name; no white space in a non-quoted value; no newlines or
double quotes within the value).
