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.22 by pcg, Mon Sep 1 06:06:11 2008 UTC vs.
Revision 1.31 by root, Sat Jul 13 04:10:29 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 "on" and "include" directives:
37
38=over 4
39
40=item on nodename ...
41
42=item on !nodename ...
43
44You can prefix any configuration directive with C<on> and a nodename. GVPE
45will will only "execute" it on the named node, or (if the nodename starts
46with C<!>) on all nodes except the named one.
47
37For example, set the MTU to C<1450> everywhere, loglevel to C<noise> on 48Example: set the MTU to C<1450> everywhere, C<loglevel> to C<noise> on
38branch1, and connect to C<ondemand> everywhere but on branch2: 49C<branch1>, and C<connect> to C<ondemand> everywhere but on branch2.
39 50
40 mtu = 1450 51 mtu = 1450
41 on branch1 loglevel = noise 52 on branch1 loglevel = noise
42 on !branch2 connect = ondemand 53 on !branch2 connect = ondemand
43 54
44All settings are applied "in order", that is, later settings of the same 55=item include relative-or-absolute-path
45variable overwrite earlier ones. 56
57Reads the specified file (the path must not contain whitespace or C<=>
58characters) and evaluate all config directives in it as if they were
59spelled out in place of the C<include> directive.
60
61The path is a printf format string, that is, you must escape any C<%>
62by doubling it, and you can have a single C<%s> inside, which will be
63replaced by the current nodename.
64
65Relative paths are interpreted relative to the GVPE config directory.
66
67Example: include the file F<local.conf> in the config directory on every
68node.
69
70 include local.conf
71
72Example: include a file F<conf/>nodenameF<.conf>
73
74 include conf/%s.conf
75
76=back
46 77
47=head1 ANATOMY OF A CONFIG FILE 78=head1 ANATOMY OF A CONFIG FILE
48 79
49Usually, a config file starts with a few global settings (like the UDP 80Usually, 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 81port 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 98values on different nodes using C<on>), but will affect the behaviour of
68the gvpe daemon and all connections it creates. 99the gvpe daemon and all connections it creates.
69 100
70=over 4 101=over 4
71 102
103=item chroot = path or /
104
105Tells GVPE to chroot(2) to the specified path after reading all necessary
106files, binding to sockets and running the C<if-up> script, but before
107running C<node-up> or any other scripts.
108
109The special path F</> instructs GVPE to create (and remove) an empty
110temporary directory to use as new root. This is most secure, but makes it
111impossible to use any scripts other than the C<if-up> one.
112
113=item chuid = numerical-uid
114
115=item chgid = numerical-gid
116
117These two options tell GVPE to change to the given user and/or group id
118after reading all necessary files, binding to sockets and running the
119C<if-up> script.
120
121Other scripts, such as C<node-up>, are run with the new user id or group id.
122
123=item chuser = username
124
125Alternative to C<chuid> and C<chgid>: Sets both C<chuid> and C<chgid>
126to the user and (primary) group ids of the specified user (for example,
127C<nobody>).
128
72=item dns-forw-host = hostname/ip 129=item dns-forw-host = hostname/ip
73 130
74The DNS server to forward DNS requests to for the DNS tunnel protocol 131The DNS server to forward DNS requests to for the DNS tunnel protocol
75(default: C<127.0.0.1>, changing it is highly recommended). 132(default: C<127.0.0.1>, changing it is highly recommended).
76 133
77=item dns-forw-port = port-number 134=item dns-forw-port = port-number
78 135
79The port where the C<dns-forw-host> is to be contacted (default: C<53>, 136The port where the C<dns-forw-host> is to be contacted (default: C<53>,
80which is fine in most cases). 137which is fine in most cases).
138
139=item dns-case-preserving = yes|true|on | no|false|off
140
141Sets whether the DNS transport forwarding server preserves case (DNS
142servers have to, but some access systems are even more broken than others)
143(default: true).
144
145Normally, when the forwarding server changes the case of domain names then
146GVPE will automatically set this to false.
81 147
82=item dns-max-outstanding = integer-number-of-requests 148=item dns-max-outstanding = integer-number-of-requests
83 149
84The maximum number of outstanding DNS transport requests 150The maximum number of outstanding DNS transport requests
85(default: C<100>). GVPE will never issue more requests then the given 151(default: C<100>). GVPE will never issue more requests then the given
237other programs. 303other programs.
238 304
239The default is 47 (GRE), which has a good chance of tunneling 305The default is 47 (GRE), which has a good chance of tunneling
240through firewalls (but note that gvpe's rawip protocol is not GRE 306through firewalls (but note that gvpe's rawip protocol is not GRE
241compatible). Other common choices are 50 (IPSEC, ESP), 51 (IPSEC, AH), 4 307compatible). Other common choices are 50 (IPSEC, ESP), 51 (IPSEC, AH), 4
242(IPIP tunnels) or 98 (ENCAP, rfc1241) 308(IPIP tunnels) or 98 (ENCAP, rfc1241).
309
310Many versions of Linux seem to have a bug that causes them to reorder
311packets for some ip protocols (GRE, ESP) but not for others (AH), so
312choose wisely (that is, use 51, AH).
243 313
244=item http-proxy-host = hostname/ip 314=item http-proxy-host = hostname/ip
245 315
246The C<http-proxy-*> family of options are only available if gvpe was 316The C<http-proxy-*> family of options are only available if gvpe was
247compiled with the C<--enable-http-proxy> option and enable tunneling of 317compiled with the C<--enable-http-proxy> option and enable tunneling of
280 350
281=item keepalive = seconds 351=item keepalive = seconds
282 352
283Sets the keepalive probe interval in seconds (default: C<60>). After this 353Sets the keepalive probe interval in seconds (default: C<60>). After this
284many seconds of inactivity the daemon will start to send keepalive probe 354many seconds of inactivity the daemon will start to send keepalive probe
285every 3 seconds until it receives a reply from the other end. If no reply 355every 3 seconds until it receives a reply from the other end. If no reply
286is received within 15 seconds, the peer is considered unreachable and the 356is received within 15 seconds, the peer is considered unreachable and the
287connection is closed. 357connection is closed.
288 358
289=item loglevel = noise|trace|debug|info|notice|warn|error|critical 359=item loglevel = noise|trace|debug|info|notice|warn|error|critical
290 360
300 370
301Recommended values are 1500 (ethernet), 1492 (pppoe), 1472 (pptp). 371Recommended values are 1500 (ethernet), 1492 (pppoe), 1472 (pptp).
302 372
303This value must be the minimum of the MTU values of all nodes. 373This value must be the minimum of the MTU values of all nodes.
304 374
375=item nfmark = integer
376
377This advanced option, when set to a nonzero value (default: C<0>), tries
378to set the netfilter mark (or fwmark) value on all sockets gvpe uses to
379send packets.
380
381This can be used to make gvpe use a different set of routing rules. For
382example, on GNU/Linux, the C<if-up> could set C<nfmark> to 1000 and then
383put all routing rules into table C<99> and then use an ip rule to make
384gvpe traffic avoid that routing table, in effect routing normal traffic
385via gvpe and gvpe traffic via the normal system routing tables:
386
387 ip rule add not fwmark 1000 lookup 99
388
305=item node = nickname 389=item node = nickname
306 390
307Not really a config setting but introduces a node section. The nickname is 391Not really a config setting but introduces a node section. The nickname is
308used to select the right configuration section and must be passed as an 392used to select the right configuration section and must be passed as an
309argument to the gvpe daemon. 393argument to the gvpe daemon.
314is established (even on rekeying operations). Note that node-up/down 398is established (even on rekeying operations). Note that node-up/down
315scripts will be run asynchronously, but execution is serialised, so there 399scripts will be run asynchronously, but execution is serialised, so there
316will only ever be one such script running. 400will only ever be one such script running.
317 401
318In addition to all the variables passed to C<if-up> scripts, the following 402In addition to all the variables passed to C<if-up> scripts, the following
319environment variables will be set: 403environment variables will be set (values are just examples):
320 404
321=over 4 405=over 4
322 406
323=item DESTNODE=branch2 407=item DESTNODE=branch2
324 408
325The name of the remote node. 409The name of the remote node.
326 410
327=item DESTID=2 411=item DESTID=2
328 412
329The node id of the remote node. 413The node id of the remote node.
414
415=item DESTSI=rawip/88.99.77.55:0
416
417The "socket info" of the target node, protocol dependent but usually in
418the format protocol/ip:port.
330 419
331=item DESTIP=188.13.66.8 420=item DESTIP=188.13.66.8
332 421
333The numerical IP address of the remote node (gvpe accepts connections from 422The numerical IP address of the remote node (gvpe accepts connections from
334everywhere, as long as the other node can authenticate itself). 423everywhere, as long as the other node can authenticate itself).
335 424
336=item DESTPORT=655 # deprecated 425=item DESTPORT=655 # deprecated
337 426
338The UDP port used by the other side. 427The protocol port used by the other side, if applicable.
339 428
340=item STATE=UP 429=item STATE=up
341 430
342Node-up scripts get called with STATE=UP, node-down scripts get called 431Node-up scripts get called with STATE=up, node-change scripts get called
343with STATE=DOWN. 432with STATE=change and node-down scripts get called with STATE=down.
344 433
345=back 434=back
346 435
347Here is a nontrivial example that uses nsupdate to update the name => ip 436Here is a nontrivial example that uses nsupdate to update the name => ip
348mapping in some DNS zone: 437mapping in some DNS zone:
349 438
350 #!/bin/sh 439 #!/bin/sh
351 { 440 {
352 echo update delete $DESTNODE.lowttl.example.net. a 441 echo update delete $DESTNODE.lowttl.example.net. a
353 echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP 442 echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP
354 echo 443 echo
355 } | nsupdate -d -k $CONFBASE:key.example.net. 444 } | nsupdate -d -k $CONFBASE:key.example.net.
445
446=item node-change = relative-or-absolute-path
447
448Same as C<node-change>, but gets called whenever something about a
449connection changes (such as the source IP address).
356 450
357=item node-down = relative-or-absolute-path 451=item node-down = relative-or-absolute-path
358 452
359Same as C<node-up>, but gets called whenever a connection is lost. 453Same as C<node-up>, but gets called whenever a connection is lost.
360 454
375private key file should be kept secret per-node to avoid spoofing, it is 469private key file should be kept secret per-node to avoid spoofing, it is
376not recommended to use this feature. 470not recommended to use this feature.
377 471
378=item rekey = seconds 472=item rekey = seconds
379 473
380Sets the rekeying interval in seconds (default: C<3600>). Connections are 474Sets the rekeying interval in seconds (default: C<3607>). Connections are
381reestablished every C<rekey> seconds, making them use a new encryption 475reestablished every C<rekey> seconds, making them use a new encryption
382key. 476key.
477
478=item seed-device = path
479
480The random device used to initially and regularly seed the random
481number generator (default: F</dev/urandom>). Randomness is of paramount
482importance to the security of the algorithms used in gvpe.
483
484On program start and every seed-interval, gvpe will read 64 octets.
485
486Setting this path to the empty string will disable this functionality
487completely (the underlying crypto library will likely look for entropy
488sources on it's own though, so not all is lost).
489
490=item seed-interval = seconds
491
492The number of seconds between reseeds of the random number generator
493(default: C<3613>). A value of C<0> disables this regular reseeding.
383 494
384=back 495=back
385 496
386=head2 NODE SPECIFIC SETTINGS 497=head2 NODE SPECIFIC SETTINGS
387 498
396 507
397Allow direct connections to this node. See C<deny-direct> for more info. 508Allow direct connections to this node. See C<deny-direct> for more info.
398 509
399=item compress = yes|true|on | no|false|off 510=item compress = yes|true|on | no|false|off
400 511
512For the current node, this specified whether it will accept compressed
513packets, and for all other nodes, this specifies whether to try to
401Wether to compress data packets sent to this node (default: C<yes>). 514compress data packets sent to this node (default: C<yes>). Compression is
402Compression is really cheap even on slow computers and has no size 515really cheap even on slow computers, has no size overhead at all and will
403overhead at all, so enabling this is often a good idea. 516only be used when the other side supports compression, so enabling this is
517often a good idea.
404 518
405=item connect = ondemand | never | always | disabled 519=item connect = ondemand | never | always | disabled
406 520
407Sets the connect mode (default: C<always>). It can be C<always> (always 521Sets the connect mode (default: C<always>). It can be C<always> (always
408try to establish and keep a connection to the given node), C<never> 522try to establish and keep a connection to the given node), C<never>
499 613
500=item enable-udp = yes|true|on | no|false|off 614=item enable-udp = yes|true|on | no|false|off
501 615
502See gvpe.protocol(7) for a description of the UDP transport protocol. 616See gvpe.protocol(7) for a description of the UDP transport protocol.
503 617
504Enable the UDPv4 transport using the C<udp-port> port (default: C<no>, 618Enable the UDPv4 transport using the C<udp-port> port (default: C<no>).
505unless no other protocol is enabled for a node, in which case this
506protocol is enabled automatically).
507
508NOTE: Please specify C<enable-udp = yes> if you want to use it even though
509it might get switched on automatically, as some future version might
510default to another default protocol.
511 619
512=item hostname = hostname | ip [can not be defaulted] 620=item hostname = hostname | ip [can not be defaulted]
513 621
514Forces the address of this node to be set to the given DNS hostname or IP 622Forces the address of this node to be set to the given DNS hostname or IP
515address. It will be resolved before each connect request, so dyndns should 623address. It will be resolved before each connect request, so dyndns should
534The value specified using this directive will be passed to the C<if-up> 642The value specified using this directive will be passed to the C<if-up>
535script in the environment variable C<IFUPDATA>. 643script in the environment variable C<IFUPDATA>.
536 644
537=item inherit-tos = yes|true|on | no|false|off 645=item inherit-tos = yes|true|on | no|false|off
538 646
539Wether to inherit the TOS settings of packets sent to the tunnel when 647Whether to inherit the TOS settings of packets sent to the tunnel when
540sending packets to this node (default: C<yes>). If set to C<yes> then 648sending packets to this node (default: C<yes>). If set to C<yes> then
541outgoing tunnel packets will have the same TOS setting as the packets sent 649outgoing tunnel packets will have the same TOS setting as the packets sent
542to the tunnel device, which is usually what you want. 650to the tunnel device, which is usually what you want.
543 651
544=item max-retry = positive-number 652=item max-retry = positive-number

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines