uppercase
[rrq/rrqnet.git] / rrqnet-cron.8.adoc
1 rrqnet-cron(8)
2 ==============
3 :doctype: manpage
4 :revdate: {sys:date "+%Y-%m-%d %H:%M:%S"}
5
6 NAME
7 ----
8 rrqnet-cron - Management script to uphold a *rrqnet* plug.
9
10 SYNOPSIS
11 --------
12 *rrqnet-cron* _vpn_ ...
13
14 DESCRIPTION
15 -----------
16
17 *rrqnet-cron* is a management script for upholding an *rrqnet* plug
18 for a nominated VPN confguration. The given _vpn_ (or the several) is
19 the pathname relative to the configuration root directory and with a
20 +.conf+ extension added, as in +/etc/rrqnet/conf.d/+*vpn*+.conf+.
21
22 The following is a configuration file example:
23
24 ./etc/rrqnet/conf.d/tap0-client.conf
25 ----
26 TAP=tap0
27 MAC=02:00:00:00:01:00
28 BR=
29 IP=192.168.10.2
30 PORT=1500
31 OPTIONS=( )
32 VPN=( 10.61.4.72:2020=/etc/rrqnet/keys/example.key )
33 VERBOSE=-v
34 ----
35
36  * The `TAP` assignment names the tap interface to use.
37  * The optional MAC assignment, if provided, tells *rrqnet-cron* to
38    set the Ethernet address of the tap interface as given.
39  * The optional `BR` assignment, if provided, tells *rrqnet-cron*
40    to add the tap interface to the bridge upon start.
41  * The optional `IP` assignment, if provided, tells *rrqnet-cron*
42    how to configure the tap interface when it is brought up. If empty,
43    the tap interface is brought up without confgiured IP address.
44  * The `PORT` assignment declares which port *rrqnet* should listen
45    on. It will listen on that port on all interfaces.
46  * The optional `OPTIONS` is intended for the -B and -T options to
47    *rrqnet*.
48  * The `VPN` assignment declares the remotes for *rrqnet*.
49  * The optional `VERBOSE` assignment, which must be `-v`, `-vv` or
50    `-vvv` unless empty, defines the verbosity level for *rrqnet*.
51
52 The above example declares an uplink remote at example ivp4 address
53 `10.61.4.72`, port 2020, and using a transport encryption key. The
54 remote host at that IP address should have a corresponding
55 declaration, perhaps as follows:
56
57 ./etc/rrqnet/conf.d/tap0-server.conf
58 ----
59 TAP=tap0
60 IP=192.168.10.1
61 PORT=2020
62 VPN=( 0.0.0.0/0=/etc/rrqnet/keys/example.key )
63 ----
64
65 That "server" declaration allows UDP packets from any host and port,
66 requiring the them to use the same transport encryption key. The
67 *rrqnet* "server" plug then works like a switch that forwards packets
68 between connections as well as to and from the tap. Connections are
69 identified by the remote MAC addresses, and it's up to the remote ends
70 to resolve IP addresses to the MAC addresses on the virtual net.
71
72 The +VPN+ variable may have multiple remote declarations, and include
73 both up-links and down-links, with or without thransport encryption
74 keys. E.g.,
75 ----
76 VPN=( 192.168.0.0/16:1400 10.61.4.72:2020=/sec/example.key )
77 ----
78
79 A VPN assignment like the above would downlink remotes in IP range
80 +192.168.0.0/16+, port 1400, without transport key, and uplink to
81 +10.61.4.72:2020+.
82
83 crontab set up
84 ~~~~~~~~~~~~~~
85
86 The script *rrqnet-cron* is intended to be set up in *crontab*, by
87 a line such as the following:
88 ----
89 * * * * * /usr/sbin/rrqnet-cron tap0-client
90 ----
91
92 By that *crontab* line, the script will be invoked every minute for
93 ensuring that the *rrqnet* plug declared by
94 +/etc/rrqnet/conf.d/tap0-client.conf+ is still running or otherwise
95 restart it.
96
97 NOTES
98 -----
99
100 Note that *rrqnet-cron* sources the configuration file and exits
101 after optionally spawning an *rrqnet* daemon. On may therefore safely
102 just change the cable set up, and kill *rrqnet* in order apply that
103 changed set up.
104
105 SEE ALSO
106 --------
107 *rrqnet(8)* - Packet tunneling over UDP, multiple channels
108
109 AUTHOR
110 ------
111 Ralph Rönnquist <ralph.ronnquist@gmail.com>