ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/doc/gvpe.conf.5.pod
(Generate patch)

Comparing gvpe/doc/gvpe.conf.5.pod (file contents):
Revision 1.26 by root, Sat Feb 12 04:15:29 2011 UTC vs.
Revision 1.34 by root, Thu Jul 18 17:35:10 2013 UTC

28= value> pairs. Empty lines are ignored. Comments start with a C<#> and 28= value> pairs. Empty lines are ignored. Comments start with a C<#> and
29extend to the end of the line. They can be used on their own lines, or 29extend to the end of the line. They can be used on their own lines, or
30after any directives. Whitespace is allowed around the C<=> sign or after 30after any directives. Whitespace is allowed around the C<=> sign or after
31values, but not within the variable names or values themselves. 31values, but not within the variable names or values themselves.
32 32
33The only exception to the above is the "on" directive that can prefix any 33All settings are applied "in order", that is, later settings of the same
34C<name = value> setting and will only "execute" it on the named node, or 34variable overwrite earlier ones.
35(if the nodename starts with "!") on all nodes except the named one.
36 35
36The only exceptions to the above are the following directives:
37
38=over 4
39
40=item node nodename
41
42Introduces a node section. The nodename is used to select the right
43configuration section and is the same string as is passed as an argument
44to the gvpe daemon.
45
46Multiple C<node> statements with the same node name are supported and will
47be merged together.
48
49=item global
50
51This statement switches back to the global section, which is mainly
52useful if you want to include a second config file, e..g for local
53customisations. To do that, simply include this at the very end of your
54config file:
55
56 global
57 include local.conf
58
59=item on nodename ...
60
61=item on !nodename ...
62
63You can prefix any configuration directive with C<on> and a nodename. GVPE
64will will only "execute" it on the named node, or (if the nodename starts
65with C<!>) on all nodes except the named one.
66
37For example, set the MTU to C<1450> everywhere, loglevel to C<noise> on 67Example: set the MTU to C<1450> everywhere, C<loglevel> to C<noise> on
38branch1, and connect to C<ondemand> everywhere but on branch2: 68C<branch1>, and C<connect> to C<ondemand> everywhere but on branch2.
39 69
40 mtu = 1450 70 mtu = 1450
41 on branch1 loglevel = noise 71 on branch1 loglevel = noise
42 on !branch2 connect = ondemand 72 on !branch2 connect = ondemand
43 73
44All settings are applied "in order", that is, later settings of the same 74=item include relative-or-absolute-path
45variable overwrite earlier ones. 75
76Reads the specified file (the path must not contain whitespace or C<=>
77characters) and evaluate all config directives in it as if they were
78spelled out in place of the C<include> directive.
79
80The path is a printf format string, that is, you must escape any C<%>
81by doubling it, and you can have a single C<%s> inside, which will be
82replaced by the current nodename.
83
84Relative paths are interpreted relative to the GVPE config directory.
85
86Example: include the file F<local.conf> in the config directory on every
87node.
88
89 include local.conf
90
91Example: include a file F<conf/>nodenameF<.conf>
92
93 include conf/%s.conf
94
95=back
46 96
47=head1 ANATOMY OF A CONFIG FILE 97=head1 ANATOMY OF A CONFIG FILE
48 98
49Usually, a config file starts with a few global settings (like the UDP 99Usually, a config file starts with a few global settings (like the UDP
50port to listen on), followed by node-specific sections that begin with a 100port to listen on), followed by node-specific sections that begin with a
67values on different nodes using C<on>), but will affect the behaviour of 117values on different nodes using C<on>), but will affect the behaviour of
68the gvpe daemon and all connections it creates. 118the gvpe daemon and all connections it creates.
69 119
70=over 4 120=over 4
71 121
122=item chroot = path or /
123
124Tells GVPE to chroot(2) to the specified path after reading all necessary
125files, binding to sockets and running the C<if-up> script, but before
126running C<node-up> or any other scripts.
127
128The special path F</> instructs GVPE to create (and remove) an empty
129temporary directory to use as new root. This is most secure, but makes it
130impossible to use any scripts other than the C<if-up> one.
131
132=item chuid = numerical-uid
133
134=item chgid = numerical-gid
135
136These two options tell GVPE to change to the given user and/or group id
137after reading all necessary files, binding to sockets and running the
138C<if-up> script.
139
140Other scripts, such as C<node-up>, are run with the new user id or group id.
141
142=item chuser = username
143
144Alternative to C<chuid> and C<chgid>: Sets both C<chuid> and C<chgid>
145to the user and (primary) group ids of the specified user (for example,
146C<nobody>).
147
72=item dns-forw-host = hostname/ip 148=item dns-forw-host = hostname/ip
73 149
74The DNS server to forward DNS requests to for the DNS tunnel protocol 150The DNS server to forward DNS requests to for the DNS tunnel protocol
75(default: C<127.0.0.1>, changing it is highly recommended). 151(default: C<127.0.0.1>, changing it is highly recommended).
76 152
77=item dns-forw-port = port-number 153=item dns-forw-port = port-number
78 154
79The port where the C<dns-forw-host> is to be contacted (default: C<53>, 155The port where the C<dns-forw-host> is to be contacted (default: C<53>,
80which is fine in most cases). 156which is fine in most cases).
157
158=item dns-case-preserving = yes|true|on | no|false|off
159
160Sets whether the DNS transport forwarding server preserves case (DNS
161servers have to, but some access systems are even more broken than others)
162(default: true).
163
164Normally, when the forwarding server changes the case of domain names then
165GVPE will automatically set this to false.
81 166
82=item dns-max-outstanding = integer-number-of-requests 167=item dns-max-outstanding = integer-number-of-requests
83 168
84The maximum number of outstanding DNS transport requests 169The maximum number of outstanding DNS transport requests
85(default: C<100>). GVPE will never issue more requests then the given 170(default: C<100>). GVPE will never issue more requests then the given
284 369
285=item keepalive = seconds 370=item keepalive = seconds
286 371
287Sets the keepalive probe interval in seconds (default: C<60>). After this 372Sets the keepalive probe interval in seconds (default: C<60>). After this
288many seconds of inactivity the daemon will start to send keepalive probe 373many seconds of inactivity the daemon will start to send keepalive probe
289every 3 seconds until it receives a reply from the other end. If no reply 374every 3 seconds until it receives a reply from the other end. If no reply
290is received within 15 seconds, the peer is considered unreachable and the 375is received within 15 seconds, the peer is considered unreachable and the
291connection is closed. 376connection is closed.
292 377
293=item loglevel = noise|trace|debug|info|notice|warn|error|critical 378=item loglevel = noise|trace|debug|info|notice|warn|error|critical
294 379
304 389
305Recommended values are 1500 (ethernet), 1492 (pppoe), 1472 (pptp). 390Recommended values are 1500 (ethernet), 1492 (pppoe), 1472 (pptp).
306 391
307This value must be the minimum of the MTU values of all nodes. 392This value must be the minimum of the MTU values of all nodes.
308 393
309=item node = nickname 394=item nfmark = integer
310 395
311Not really a config setting but introduces a node section. The nickname is 396This advanced option, when set to a nonzero value (default: C<0>), tries
312used to select the right configuration section and must be passed as an 397to set the netfilter mark (or fwmark) value on all sockets gvpe uses to
313argument to the gvpe daemon. 398send packets.
399
400This can be used to make gvpe use a different set of routing rules. For
401example, on GNU/Linux, the C<if-up> could set C<nfmark> to 1000 and then
402put all routing rules into table C<99> and then use an ip rule to make
403gvpe traffic avoid that routing table, in effect routing normal traffic
404via gvpe and gvpe traffic via the normal system routing tables:
405
406 ip rule add not fwmark 1000 lookup 99
314 407
315=item node-up = relative-or-absolute-path 408=item node-up = relative-or-absolute-path
316 409
317Sets a command (default: none) that should be called whenever a connection 410Sets a command (default: none) that should be called whenever a connection
318is established (even on rekeying operations). Note that node-up/down 411is established (even on rekeying operations). Note that node-up/down
358 451
359 #!/bin/sh 452 #!/bin/sh
360 { 453 {
361 echo update delete $DESTNODE.lowttl.example.net. a 454 echo update delete $DESTNODE.lowttl.example.net. a
362 echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP 455 echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP
363 echo 456 echo
364 } | nsupdate -d -k $CONFBASE:key.example.net. 457 } | nsupdate -d -k $CONFBASE:key.example.net.
365 458
366=item node-change = relative-or-absolute-path 459=item node-change = relative-or-absolute-path
367 460
368Same as C<node-change>, but gets called whenever something about a 461Same as C<node-change>, but gets called whenever something about a
373Same as C<node-up>, but gets called whenever a connection is lost. 466Same as C<node-up>, but gets called whenever a connection is lost.
374 467
375=item pid-file = path 468=item pid-file = path
376 469
377The path to the pid file to check and create 470The path to the pid file to check and create
378(default: C<LOCALSTATEDIR/run/gvpe.pid>). 471(default: C<LOCALSTATEDIR/run/gvpe.pid>). The first C<%s> is replaced by
472the nodename - any other use of C<%> must be written as C<%%>.
379 473
380=item private-key = relative-path-to-key 474=item private-key = relative-path-to-key
381 475
382Sets the path (relative to the config directory) to the private key 476Sets the path (relative to the config directory) to the private key
383(default: C<hostkey>). This is a printf format string so every C<%> must 477(default: C<hostkey>). This is a printf format string so every C<%> must
389private key file should be kept secret per-node to avoid spoofing, it is 483private key file should be kept secret per-node to avoid spoofing, it is
390not recommended to use this feature. 484not recommended to use this feature.
391 485
392=item rekey = seconds 486=item rekey = seconds
393 487
394Sets the rekeying interval in seconds (default: C<3600>). Connections are 488Sets the rekeying interval in seconds (default: C<3607>). Connections are
395reestablished every C<rekey> seconds, making them use a new encryption 489reestablished every C<rekey> seconds, making them use a new encryption
396key. 490key.
397 491
398=item nfmark = integer 492=item seed-device = path
399 493
400This advanced option, when set to a nonzero value (default: C<0>), tries 494The random device used to initially and regularly seed the random
401to set the netfilter mark (or fwmark) value on all sockets gvpe uses to 495number generator (default: F</dev/urandom>). Randomness is of paramount
402send packets. 496importance to the security of the algorithms used in gvpe.
403 497
404This can be used to make gvpe use a different set of routing rules. For 498On program start and every seed-interval, gvpe will read 64 octets.
405example, on GNU/Linux, the C<if-up> could set C<nfmark> to 1000 and then
406put all routing rules into table C<99> and then use an ip rule to make
407gvpe traffic avoid that routing table, in effect routing normal traffic
408via gvpe and gvpe traffic via the normal system routing tables:
409 499
410 ip rule add not fwmark 1000 lookup 99 500Setting this path to the empty string will disable this functionality
501completely (the underlying crypto library will likely look for entropy
502sources on it's own though, so not all is lost).
503
504=item seed-interval = seconds
505
506The number of seconds between reseeds of the random number generator
507(default: C<3613>). A value of C<0> disables this regular reseeding.
508
509=item serial = string
510
511The configuration serial number. This can be any string up to 16 bytes
512length. Only when the serial matches on both sides of a conenction will
513the connection succeed. This is I<not> a security mechanism and eay to
514spoof, this mechanism exists to alert users that their config is outdated.
515
516It's recommended to specify this is a date string such as C<2013-05-05> or
517C<20121205084417).
518
519The exact algorithm is as this: if a connection request is received form a
520node with an identical serial, then it succeeds normally.
521
522If the remote serial is lower than the local serial, it is ignored.
523
524If the remote serial is higher than the local serial, a warning message is
525logged.
411 526
412=back 527=back
413 528
414=head2 NODE SPECIFIC SETTINGS 529=head2 NODE SPECIFIC SETTINGS
415 530
530 645
531=item enable-udp = yes|true|on | no|false|off 646=item enable-udp = yes|true|on | no|false|off
532 647
533See gvpe.protocol(7) for a description of the UDP transport protocol. 648See gvpe.protocol(7) for a description of the UDP transport protocol.
534 649
535Enable the UDPv4 transport using the C<udp-port> port (default: C<no>, 650Enable the UDPv4 transport using the C<udp-port> port (default: C<no>).
536unless no other protocol is enabled for a node, in which case this
537protocol is enabled automatically).
538
539NOTE: Please specify C<enable-udp = yes> if you want to use it even though
540it might get switched on automatically, as some future version might
541default to another default protocol.
542 651
543=item hostname = hostname | ip [can not be defaulted] 652=item hostname = hostname | ip [can not be defaulted]
544 653
545Forces the address of this node to be set to the given DNS hostname or IP 654Forces the address of this node to be set to the given DNS hostname or IP
546address. It will be resolved before each connect request, so dyndns should 655address. It will be resolved before each connect request, so dyndns should
652 761
653If used the node up or node-down scripts. 762If used the node up or node-down scripts.
654 763
655=item hostkey 764=item hostkey
656 765
657The private key (taken from C<hostkeys/nodename>) of the current host. 766The (default path of the) private key of the current host.
658 767
659=item pubkey/nodename 768=item pubkey/nodename
660 769
661The public keys of the other nodes, one file per node. 770The public keys of the other nodes, one file per node.
662 771

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines