… | |
… | |
97 | is, they are in some sense node-specific (config files can set different |
97 | is, they are in some sense node-specific (config files can set different |
98 | values on different nodes using C<on>), but will affect the behaviour of |
98 | values on different nodes using C<on>), but will affect the behaviour of |
99 | the gvpe daemon and all connections it creates. |
99 | the gvpe daemon and all connections it creates. |
100 | |
100 | |
101 | =over 4 |
101 | =over 4 |
|
|
102 | |
|
|
103 | =item chroot = path or / |
|
|
104 | |
|
|
105 | Tells GVPE to chroot(2) to the specified path after reading all necessary |
|
|
106 | files, binding to sockets and running the C<if-up> script, but before |
|
|
107 | running C<node-up> or any other scripts. |
|
|
108 | |
|
|
109 | The special path F</> instructs GVPE to create (and remove) an empty |
|
|
110 | temporary directory to use as new root. This is most secure, but makes it |
|
|
111 | impossible to use any scripts other than the C<if-up> one. |
|
|
112 | |
|
|
113 | =item chuid = numerical-uid |
|
|
114 | |
|
|
115 | =item chgid = numerical-gid |
|
|
116 | |
|
|
117 | These two options tell GVPE to change to the given user and/or group id |
|
|
118 | after reading all necessary files, binding to sockets and running the |
|
|
119 | C<if-up> script. |
|
|
120 | |
|
|
121 | Other scripts, such as C<node-up>, are run with the new user id or group id. |
|
|
122 | |
|
|
123 | =item chuser = username |
|
|
124 | |
|
|
125 | Alternative to C<chuid> and C<chgid>: Sets both C<chuid> and C<chgid> |
|
|
126 | to the user and (primary) group ids of the specified user (for example, |
|
|
127 | C<nobody>). |
102 | |
128 | |
103 | =item dns-forw-host = hostname/ip |
129 | =item dns-forw-host = hostname/ip |
104 | |
130 | |
105 | The DNS server to forward DNS requests to for the DNS tunnel protocol |
131 | The DNS server to forward DNS requests to for the DNS tunnel protocol |
106 | (default: C<127.0.0.1>, changing it is highly recommended). |
132 | (default: C<127.0.0.1>, changing it is highly recommended). |
… | |
… | |
324 | |
350 | |
325 | =item keepalive = seconds |
351 | =item keepalive = seconds |
326 | |
352 | |
327 | Sets the keepalive probe interval in seconds (default: C<60>). After this |
353 | Sets the keepalive probe interval in seconds (default: C<60>). After this |
328 | many seconds of inactivity the daemon will start to send keepalive probe |
354 | many seconds of inactivity the daemon will start to send keepalive probe |
329 | every 3 seconds until it receives a reply from the other end. If no reply |
355 | every 3 seconds until it receives a reply from the other end. If no reply |
330 | is received within 15 seconds, the peer is considered unreachable and the |
356 | is received within 15 seconds, the peer is considered unreachable and the |
331 | connection is closed. |
357 | connection is closed. |
332 | |
358 | |
333 | =item loglevel = noise|trace|debug|info|notice|warn|error|critical |
359 | =item loglevel = noise|trace|debug|info|notice|warn|error|critical |
334 | |
360 | |
… | |
… | |
344 | |
370 | |
345 | Recommended values are 1500 (ethernet), 1492 (pppoe), 1472 (pptp). |
371 | Recommended values are 1500 (ethernet), 1492 (pppoe), 1472 (pptp). |
346 | |
372 | |
347 | This value must be the minimum of the MTU values of all nodes. |
373 | This value must be the minimum of the MTU values of all nodes. |
348 | |
374 | |
|
|
375 | =item nfmark = integer |
|
|
376 | |
|
|
377 | This advanced option, when set to a nonzero value (default: C<0>), tries |
|
|
378 | to set the netfilter mark (or fwmark) value on all sockets gvpe uses to |
|
|
379 | send packets. |
|
|
380 | |
|
|
381 | This can be used to make gvpe use a different set of routing rules. For |
|
|
382 | example, on GNU/Linux, the C<if-up> could set C<nfmark> to 1000 and then |
|
|
383 | put all routing rules into table C<99> and then use an ip rule to make |
|
|
384 | gvpe traffic avoid that routing table, in effect routing normal traffic |
|
|
385 | via gvpe and gvpe traffic via the normal system routing tables: |
|
|
386 | |
|
|
387 | ip rule add not fwmark 1000 lookup 99 |
|
|
388 | |
349 | =item node = nickname |
389 | =item node = nickname |
350 | |
390 | |
351 | Not really a config setting but introduces a node section. The nickname is |
391 | Not really a config setting but introduces a node section. The nickname is |
352 | used to select the right configuration section and must be passed as an |
392 | used to select the right configuration section and must be passed as an |
353 | argument to the gvpe daemon. |
393 | argument to the gvpe daemon. |
… | |
… | |
398 | |
438 | |
399 | #!/bin/sh |
439 | #!/bin/sh |
400 | { |
440 | { |
401 | echo update delete $DESTNODE.lowttl.example.net. a |
441 | echo update delete $DESTNODE.lowttl.example.net. a |
402 | echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP |
442 | echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP |
403 | echo |
443 | echo |
404 | } | nsupdate -d -k $CONFBASE:key.example.net. |
444 | } | nsupdate -d -k $CONFBASE:key.example.net. |
405 | |
445 | |
406 | =item node-change = relative-or-absolute-path |
446 | =item node-change = relative-or-absolute-path |
407 | |
447 | |
408 | Same as C<node-change>, but gets called whenever something about a |
448 | Same as C<node-change>, but gets called whenever something about a |
… | |
… | |
413 | Same as C<node-up>, but gets called whenever a connection is lost. |
453 | Same as C<node-up>, but gets called whenever a connection is lost. |
414 | |
454 | |
415 | =item pid-file = path |
455 | =item pid-file = path |
416 | |
456 | |
417 | The path to the pid file to check and create |
457 | The path to the pid file to check and create |
418 | (default: C<LOCALSTATEDIR/run/gvpe.pid>). |
458 | (default: C<LOCALSTATEDIR/run/gvpe.pid>). The first C<%s> is replaced by |
|
|
459 | the nodename - any other use of C<%> must be written as C<%%>. |
419 | |
460 | |
420 | =item private-key = relative-path-to-key |
461 | =item private-key = relative-path-to-key |
421 | |
462 | |
422 | Sets the path (relative to the config directory) to the private key |
463 | Sets the path (relative to the config directory) to the private key |
423 | (default: C<hostkey>). This is a printf format string so every C<%> must |
464 | (default: C<hostkey>). This is a printf format string so every C<%> must |
… | |
… | |
429 | private key file should be kept secret per-node to avoid spoofing, it is |
470 | private key file should be kept secret per-node to avoid spoofing, it is |
430 | not recommended to use this feature. |
471 | not recommended to use this feature. |
431 | |
472 | |
432 | =item rekey = seconds |
473 | =item rekey = seconds |
433 | |
474 | |
434 | Sets the rekeying interval in seconds (default: C<3600>). Connections are |
475 | Sets the rekeying interval in seconds (default: C<3607>). Connections are |
435 | reestablished every C<rekey> seconds, making them use a new encryption |
476 | reestablished every C<rekey> seconds, making them use a new encryption |
436 | key. |
477 | key. |
437 | |
478 | |
438 | =item nfmark = integer |
479 | =item seed-device = path |
439 | |
480 | |
440 | This advanced option, when set to a nonzero value (default: C<0>), tries |
481 | The random device used to initially and regularly seed the random |
441 | to set the netfilter mark (or fwmark) value on all sockets gvpe uses to |
482 | number generator (default: F</dev/urandom>). Randomness is of paramount |
442 | send packets. |
483 | importance to the security of the algorithms used in gvpe. |
443 | |
484 | |
444 | This can be used to make gvpe use a different set of routing rules. For |
485 | On program start and every seed-interval, gvpe will read 64 octets. |
445 | example, on GNU/Linux, the C<if-up> could set C<nfmark> to 1000 and then |
|
|
446 | put all routing rules into table C<99> and then use an ip rule to make |
|
|
447 | gvpe traffic avoid that routing table, in effect routing normal traffic |
|
|
448 | via gvpe and gvpe traffic via the normal system routing tables: |
|
|
449 | |
486 | |
450 | ip rule add not fwmark 1000 lookup 99 |
487 | Setting this path to the empty string will disable this functionality |
|
|
488 | completely (the underlying crypto library will likely look for entropy |
|
|
489 | sources on it's own though, so not all is lost). |
|
|
490 | |
|
|
491 | =item seed-interval = seconds |
|
|
492 | |
|
|
493 | The number of seconds between reseeds of the random number generator |
|
|
494 | (default: C<3613>). A value of C<0> disables this regular reseeding. |
451 | |
495 | |
452 | =back |
496 | =back |
453 | |
497 | |
454 | =head2 NODE SPECIFIC SETTINGS |
498 | =head2 NODE SPECIFIC SETTINGS |
455 | |
499 | |
… | |
… | |
686 | |
730 | |
687 | If used the node up or node-down scripts. |
731 | If used the node up or node-down scripts. |
688 | |
732 | |
689 | =item hostkey |
733 | =item hostkey |
690 | |
734 | |
691 | The private key (taken from C<hostkeys/nodename>) of the current host. |
735 | The (default path of the) private key of the current host. |
692 | |
736 | |
693 | =item pubkey/nodename |
737 | =item pubkey/nodename |
694 | |
738 | |
695 | The public keys of the other nodes, one file per node. |
739 | The public keys of the other nodes, one file per node. |
696 | |
740 | |