Merge branch 'master' of git://tinc-vpn.org/tinc into 1.1
[tinc] / doc / tinc.conf.5.in
1 .Dd 2010-01-16
2 .Dt TINC.CONF 5
3 .\" Manual page created by:
4 .\" Ivo Timmermans
5 .\" Guus Sliepen <guus@tinc-vpn.org>
6
7 .Sh NAME
8 .Nm tinc.conf
9 .Nd tinc daemon configuration
10
11 .Sh DESCRIPTION
12 The files in the
13 .Pa @sysconfdir@/tinc/
14 directory contain runtime and security information for the tinc daemon.
15
16 .Sh NETWORKS
17 It is perfectly ok for you to run more than one tinc daemon.
18 However, in its default form,
19 you will soon notice that you can't use two different configuration files without the
20 .Fl c
21 option.
22
23 .Pp
24 We have thought of another way of dealing with this: network names.
25 This means that you call
26 .Nm
27 with the
28 .Fl n
29 option, which will assign a name to this daemon.
30
31 .Pp
32 The effect of this is that the daemon will set its configuration root to
33 .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa / ,
34 where 
35 .Ar NETNAME
36 is your argument to the
37 .Fl n
38 option.
39 You'll notice that messages appear in syslog as coming from
40 .Nm tincd. Ns Ar NETNAME .
41
42 .Pp
43 However, it is not strictly necessary that you call tinc with the
44 .Fl n
45 option.
46 In this case, the network name would just be empty,
47 and it will be used as such.
48 .Nm tinc
49 now looks for files in
50 .Pa @sysconfdir@/tinc/ ,
51 instead of 
52 .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa / ;
53 the configuration file should be
54 .Pa @sysconfdir@/tinc/tinc.conf ,
55 and the host configuration files are now expected to be in
56 .Pa @sysconfdir@/tinc/hosts/ .
57
58 .Pp
59 But it is highly recommended that you use this feature of
60 .Nm tinc ,
61 because it will be so much clearer whom your daemon talks to.
62 Hence, we will assume that you use it.
63
64 .Sh NAMES
65 Each tinc daemon should have a name that is unique in the network which it will be part of.
66 The name will be used by other tinc daemons for identification.
67 The name has to be declared in the
68 .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
69 file.
70
71 .Pp
72 To make things easy,
73 choose something that will give unique and easy to remember names to your tinc daemon(s).
74 You could try things like hostnames, owner surnames or location names.
75
76 .Sh PUBLIC/PRIVATE KEYS
77 You should use 
78 .Ic tincd -K
79 to generate public/private keypairs.
80 It will generate two keys.
81 The private key should be stored in a separate file
82 .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /rsa_key.priv
83 \-\- where 
84 .Ar NETNAME
85 stands for the network (see 
86 .Sx NETWORKS )
87 above.
88 The public key should be stored in the host configuration file
89 .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Va NAME
90 \-\- where
91 .Va NAME
92 stands for the name of the local tinc daemon (see
93 .Sx NAMES ) .
94
95 .Sh SERVER CONFIGURATION
96 The server configuration of the daemon is done in the file
97 .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf .
98 This file consists of comments (lines started with a
99 .Li # )
100 or assignments in the form of:
101
102 .Pp
103 .Va Variable Li = Ar Value .
104
105 .Pp
106 The variable names are case insensitive, and any spaces, tabs,
107 newlines and carriage returns are ignored.
108 Note: it is not required that you put in the 
109 .Li =
110 sign, but doing so improves readability.
111 If you leave it out, remember to replace it with at least one space character.
112
113 .Pp
114 The server configuration is complemented with host specific configuration (see the next section).
115 Although all configuration options for the local host listed in this document can also be put in
116 .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf ,
117 it is recommended to put host specific configuration options in the host configuration file,
118 as this makes it easy to exchange with other nodes.
119
120 .Pp
121 Here are all valid variables, listed in alphabetical order.
122 The default value is given between parentheses.
123 .Bl -tag -width indent
124
125 .It Va AddressFamily Li = ipv4 | ipv6 | any Pq any
126 This option affects the address family of listening and outgoing sockets.
127 If
128 .Qq any
129 is selected, then depending on the operating system both IPv4 and IPv6 or just
130 IPv6 listening sockets will be created.
131
132 .It Va BindToAddress Li = Ar address Bq experimental
133 If your computer has more than one IPv4 or IPv6 address,
134 .Nm tinc
135 will by default listen on all of them for incoming connections.
136 Multiple
137 .Va BindToAddress
138 variables may be specified,
139 in which case listening sockets for each specified address are made.
140
141 .Pp
142 This option may not work on all platforms.
143
144 .It Va BindToInterface Li = Ar interface Bq experimental
145 If your computer has more than one network interface,
146 .Nm tinc
147 will by default listen on all of them for incoming connections.
148 It is possible to bind only to a single interface with this variable.
149
150 .Pp
151 This option may not work on all platforms.
152
153 .It Va Broadcast Li = yes | no Po yes Pc Bq experimental
154 When disabled, tinc will drop all broadcast and multicast packets, in both router and switch mode.
155
156 .It Va ConnectTo Li = Ar name
157 Specifies which other tinc daemon to connect to on startup.
158 Multiple
159 .Va ConnectTo
160 variables may be specified,
161 in which case outgoing connections to each specified tinc daemon are made.
162 The names should be known to this tinc daemon
163 (i.e., there should be a host configuration file for the name on the
164 .Va ConnectTo
165 line).
166
167 .Pp
168 If you don't specify a host with
169 .Va ConnectTo ,
170 .Nm tinc
171 won't try to connect to other daemons at all,
172 and will instead just listen for incoming connections.
173
174 .It Va DecrementTTL Li = yes | no Po yes Pc
175 When enabled,
176 .Nm tinc
177 will decrement the Time To Live field in IPv4 packets, or the Hop Limit field in IPv6 packets,
178 before forwarding a received packet to the virtual network device or to another node,
179 and will drop packets that have a TTL value of zero,
180 in which case it will send an ICMP Time Exceeded packet back.
181
182 .It Va Device Li = Ar device Po Pa /dev/tap0 , Pa /dev/net/tun No or other depending on platform Pc
183 The virtual network device to use.
184 .Nm tinc
185 will automatically detect what kind of device it is.
186 Note that you can only use one device per daemon.
187 Under Windows, use
188 .Va Interface
189 instead of
190 .Va Device .
191 The info pages of the tinc package contain more information
192 about configuring the virtual network device.
193
194 .It Va DeviceType Li = Ar type Pq platform dependent
195 The type of the virtual network device.
196 Tinc will normally automatically select the right type of tun/tap interface, and this option should not be used.
197 However, this option can be used to select one of the special interface types, if support for them is compiled in.
198 .Bl -tag -width indent
199
200 .It dummy
201 Use a dummy interface.
202 No packets are ever read or written to a virtual network device.
203 Useful for testing, or when setting up a node that only forwards packets for other nodes.
204
205 .It raw_socket
206 Open a raw socket, and bind it to a pre-existing
207 .Va Interface
208 (eth0 by default).
209 All packets are read from this interface.
210 Packets received for the local node are written to the raw socket.
211 However, at least on Linux, the operating system does not process IP packets destined for the local host.
212
213 .It uml Pq not compiled in by default
214 Create a UNIX socket with the filename specified by
215 .Va Device ,
216 or
217 .Pa @localstatedir@/run/ Ns Ar NETNAME Ns Pa .umlsocket
218 if not specified.
219 .Nm tinc
220 will wait for a User Mode Linux instance to connect to this socket.
221
222 .It vde Pq not compiled in by default
223 Uses the libvdeplug library to connect to a Virtual Distributed Ethernet switch,
224 using the UNIX socket specified by
225 .Va Device ,
226 or
227 .Pa @localstatedir@/run/vde.ctl
228 if not specified.
229 .El
230
231 Also, in case tinc does not seem to correctly interpret packets received from the virtual network device,
232 it can be used to change the way packets are interpreted:
233
234 .Bl -tag -width indent
235
236 .It tun Pq BSD and Linux
237 Set type to tun.
238 Depending on the platform, this can either be with or without an address family header (see below).
239
240 .It tunnohead Pq BSD
241 Set type to tun without an address family header.
242 Tinc will expect packets read from the virtual network device to start with an IP header.
243 On some platforms IPv6 packets cannot be read from or written to the device in this mode.
244
245 .It tunifhead Pq BSD
246 Set type to tun with an address family header.
247 Tinc will expect packets read from the virtual network device
248 to start with a four byte header containing the address family,
249 followed by an IP header.
250 This mode should support both IPv4 and IPv6 packets.
251
252 .It tap Pq BSD and Linux
253 Set type to tap.
254 Tinc will expect packets read from the virtual network device
255 to start with an Ethernet header.
256 .El
257
258 .It Va DirectOnly Li = yes | no Po no Pc Bq experimental
259 When this option is enabled, packets that cannot be sent directly to the destination node,
260 but which would have to be forwarded by an intermediate node, are dropped instead.
261 When combined with the IndirectData option,
262 packets for nodes for which we do not have a meta connection with are also dropped.
263
264 .It Va ECDSAPrivateKeyFile Li = Ar filename Po Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /ecdsa_key.priv Pc
265 The file in which the private ECDSA key of this tinc daemon resides.
266 This is only used if
267 .Va ExperimentalProtocol
268 is enabled.
269
270 .It Va ExperimentalProtocol Li = yes | no Po no Pc Bq experimental
271 When this option is enabled, experimental protocol enhancements will be used.
272 Ephemeral ECDH will be used for key exchanges,
273 and ECDSA will be used instead of RSA for authentication.
274 When enabled, an ECDSA key must have been generated before with
275 .Nm tincctl generate-ecdsa-keys .
276 The experimental protocol may change at any time,
277 and there is no guarantee that tinc will run stable when it is used.
278
279 .It Va Forwarding Li = off | internal | kernel Po internal Pc Bq experimental
280 This option selects the way indirect packets are forwarded.
281 .Bl -tag -width indent
282
283 .It off
284 Incoming packets that are not meant for the local node,
285 but which should be forwarded to another node, are dropped.
286
287 .It internal
288 Incoming packets that are meant for another node are forwarded by tinc internally.
289
290 .Pp
291 This is the default mode, and unless you really know you need another forwarding mode, don't change it.
292
293 .It kernel
294 Incoming packets are always sent to the TUN/TAP device, even if the packets are not for the local node.
295 This is less efficient, but allows the kernel to apply its routing and firewall rules on them,
296 and can also help debugging.
297 .El
298
299 .It Va GraphDumpFile Li = Ar filename Bq experimental
300 If this option is present,
301 .Nm tinc
302 will dump the current network graph to the file
303 .Ar filename
304 every minute, unless there were no changes to the graph.
305 The file is in a format that can be read by graphviz tools.
306 If
307 .Ar filename
308 starts with a pipe symbol |,
309 then the rest of the filename is interpreted as a shell command
310 that is executed, the graph is then sent to stdin.
311
312 .It Va Hostnames Li = yes | no Pq no
313 This option selects whether IP addresses (both real and on the VPN) should
314 be resolved. Since DNS lookups are blocking, it might affect tinc's
315 efficiency, even stopping the daemon for a few seconds every time it does
316 a lookup if your DNS server is not responding.
317
318 .Pp
319 This does not affect resolving hostnames to IP addresses from the
320 host configuration files.
321
322 .It Va IffOneQueue Li = yes | no Po no Pc Bq experimental
323 (Linux only) Set IFF_ONE_QUEUE flag on TUN/TAP devices.
324
325 .It Va Interface Li = Ar interface
326 Defines the name of the interface corresponding to the virtual network device.
327 Depending on the operating system and the type of device this may or may not actually set the name of the interface.
328 Under Windows, this variable is used to select which network interface will be used.
329 If you specified a
330 .Va Device ,
331 this variable is almost always already correctly set.
332
333 .It Va KeyExpire Li = Ar seconds Pq 3600
334 This option controls the period the encryption keys used to encrypt the data are valid.
335 It is common practice to change keys at regular intervals to make it even harder for crackers,
336 even though it is thought to be nearly impossible to crack a single key.
337
338 .It Va MACExpire Li = Ar seconds Pq 600
339 This option controls the amount of time MAC addresses are kept before they are removed.
340 This only has effect when
341 .Va Mode
342 is set to
343 .Qq switch .
344
345 .It Va MaxTimeout Li = Ar seconds Pq 900
346 This is the maximum delay before trying to reconnect to other tinc daemons.
347
348 .It Va Mode Li = router | switch | hub Pq router
349 This option selects the way packets are routed to other daemons.
350 .Bl -tag -width indent
351
352 .It router
353 In this mode
354 .Va Subnet
355 variables in the host configuration files will be used to form a routing table.
356 Only unicast packets of routable protocols (IPv4 and IPv6) are supported in this mode.
357
358 .Pp
359 This is the default mode, and unless you really know you need another mode, don't change it.
360
361 .It switch
362 In this mode the MAC addresses of the packets on the VPN will be used to
363 dynamically create a routing table just like an Ethernet switch does.
364 Unicast, multicast and broadcast packets of every protocol that runs over Ethernet are supported in this mode
365 at the cost of frequent broadcast ARP requests and routing table updates.
366
367 .Pp
368 This mode is primarily useful if you want to bridge Ethernet segments.
369
370 .It hub
371 This mode is almost the same as the switch mode, but instead
372 every packet will be broadcast to the other daemons
373 while no routing table is managed.
374 .El
375
376 .It Va Name Li = Ar name Bq required
377 This is the name which identifies this tinc daemon.
378 It must be unique for the virtual private network this daemon will connect to.
379
380 .It Va PingInterval Li = Ar seconds Pq 60
381 The number of seconds of inactivity that
382 .Nm tinc
383 will wait before sending a probe to the other end.
384
385 .It Va PingTimeout Li = Ar seconds Pq 5
386 The number of seconds to wait for a response to pings or to allow meta
387 connections to block. If the other end doesn't respond within this time,
388 the connection is terminated,
389 and the others will be notified of this.
390
391 .It Va PriorityInheritance Li = yes | no Po no Pc Bq experimental
392 When this option is enabled the value of the TOS field of tunneled IPv4 packets
393 will be inherited by the UDP packets that are sent out.
394
395 .It Va PrivateKey Li = Ar key Bq obsolete
396 The private RSA key of this tinc daemon.
397 It will allow this tinc daemon to authenticate itself to other daemons.
398
399 .It Va PrivateKeyFile Li = Ar filename Po Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /rsa_key.priv Pc
400 The file in which the private RSA key of this tinc daemon resides.
401 Note that there must be exactly one of
402 .Va PrivateKey
403 or
404 .Va PrivateKeyFile
405 specified in the configuration file.
406
407 .It Va ProcessPriority Li = low | normal | high
408 When this option is used the priority of the tincd process will be adjusted.
409 Increasing the priority may help to reduce latency and packet loss on the VPN.
410
411 .It Va ReplayWindow Li = Ar bytes Pq 16
412 This is the size of the replay tracking window for each remote node, in bytes.
413 The window is a bitfield which tracks 1 packet per bit, so for example
414 the default setting of 16 will track up to 128 packets in the window.  In high
415 bandwidth scenarios, setting this to a higher value can reduce packet loss from
416 the interaction of replay tracking with underlying real packet loss and/or
417 reordering.  Setting this to zero will disable replay tracking completely and
418 pass all traffic, but leaves tinc vulnerable to replay-based attacks on your
419 traffic.
420
421 .It Va StrictSubnets Li = yes | no Po no Pc Bq experimental
422 When this option is enabled tinc will only use Subnet statements which are
423 present in the host config files in the local
424 .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
425 directory.
426
427 .It Va TunnelServer Li = yes | no Po no Pc Bq experimental
428 When this option is enabled tinc will no longer forward information between other tinc daemons,
429 and will only allow connections with nodes for which host config files are present in the local
430 .Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
431 directory.
432 Setting this options also implicitly sets StrictSubnets.
433
434 .It Va UDPRcvBuf Li = Ar bytes Pq OS default
435 Sets the socket receive buffer size for the UDP socket, in bytes.
436 If unset, the default buffer size will be used by the operating system.
437
438 .It Va UDPSndBuf Li = Ar bytes Pq OS default
439 Sets the socket send buffer size for the UDP socket, in bytes.
440 If unset, the default buffer size will be used by the operating system.
441 .El
442
443 .Sh HOST CONFIGURATION FILES
444 The host configuration files contain all information needed
445 to establish a connection to those hosts.
446 A host configuration file is also required for the local tinc daemon,
447 it will use it to read in it's listen port, public key and subnets.
448
449 .Pp
450 The idea is that these files are portable.
451 You can safely mail your own host configuration file to someone else.
452 That other person can then copy it to his own hosts directory,
453 and now his tinc daemon will be able to connect to your tinc daemon.
454 Since host configuration files only contain public keys,
455 no secrets are revealed by sending out this information.
456 .Bl -tag -width indent
457
458 .It Va Address Li = Ar address Oo port Oc Bq recommended
459 The IP address or hostname of this tinc daemon on the real network.
460 This will only be used when trying to make an outgoing connection to this tinc daemon.
461 Optionally, a port can be specified to use for this address.
462 Multiple
463 .Va Address
464 variables can be specified, in which case each address will be tried until a working
465 connection has been established.
466
467 .It Va Cipher Li = Ar cipher Pq blowfish
468 The symmetric cipher algorithm used to encrypt UDP packets.
469 Any cipher supported by OpenSSL is recognised.
470 Furthermore, specifying
471 .Qq none
472 will turn off packet encryption.
473 It is best to use only those ciphers which support CBC mode.
474
475 .It Va ClampMSS Li = yes | no Pq yes
476 This option specifies whether tinc should clamp the maximum segment size (MSS)
477 of TCP packets to the path MTU. This helps in situations where ICMP
478 Fragmentation Needed or Packet too Big messages are dropped by firewalls.
479
480 .It Va Compression Li = Ar level Pq 0
481 This option sets the level of compression used for UDP packets.
482 Possible values are 0 (off), 1 (fast zlib) and any integer up to 9 (best zlib),
483 10 (fast lzo) and 11 (best lzo).
484
485 .It Va Digest Li = Ar digest Pq sha1
486 The digest algorithm used to authenticate UDP packets.
487 Any digest supported by OpenSSL is recognised.
488 Furthermore, specifying
489 .Qq none
490 will turn off packet authentication.
491
492 .It Va IndirectData Li = yes | no Pq no
493 This option specifies whether other tinc daemons besides the one you specified with
494 .Va ConnectTo
495 can make a direct connection to you.
496 This is especially useful if you are behind a firewall
497 and it is impossible to make a connection from the outside to your tinc daemon.
498 Otherwise, it is best to leave this option out or set it to no.
499
500 .It Va MACLength Li = Ar length Pq 4
501 The length of the message authentication code used to authenticate UDP packets.
502 Can be anything from
503 .Qq 0
504 up to the length of the digest produced by the digest algorithm.
505
506 .It Va PMTU Li = Ar mtu Po 1514 Pc
507 This option controls the initial path MTU to this node.
508
509 .It Va PMTUDiscovery Li = yes | no Po yes Pc
510 When this option is enabled, tinc will try to discover the path MTU to this node.
511 After the path MTU has been discovered, it will be enforced on the VPN.
512
513 .It Va Port Li = Ar port Pq 655
514 The port number on which this tinc daemon is listening for incoming connections,
515 which is used if no port number is specified in an
516 .Va Address
517 statement.
518
519 .It Va PublicKey Li = Ar key Bq obsolete
520 The public RSA key of this tinc daemon.
521 It will be used to cryptographically verify it's identity and to set up a secure connection.
522
523 .It Va PublicKeyFile Li = Ar filename Bq obsolete
524 The file in which the public RSA key of this tinc daemon resides.
525
526 .Pp
527 From version 1.0pre4 on
528 .Nm tinc
529 will store the public key directly into the host configuration file in PEM format,
530 the above two options then are not necessary.
531 Either the PEM format is used, or exactly one of the above two options must be specified
532 in each host configuration file,
533 if you want to be able to establish a connection with that host.
534
535 .It Va Subnet Li = Ar address Ns Op Li / Ns Ar prefixlength Ns Op Li # Ns Ar weight
536 The subnet which this tinc daemon will serve.
537 .Nm tinc
538 tries to look up which other daemon it should send a packet to by searching the appropriate subnet.
539 If the packet matches a subnet,
540 it will be sent to the daemon who has this subnet in his host configuration file.
541 Multiple
542 .Va Subnet
543 variables can be specified.
544
545 .Pp
546 Subnets can either be single MAC, IPv4 or IPv6 addresses,
547 in which case a subnet consisting of only that single address is assumed,
548 or they can be a IPv4 or IPv6 network address with a prefixlength.
549 Shorthand notations are not supported.
550 For example, IPv4 subnets must be in a form like 192.168.1.0/24,
551 where 192.168.1.0 is the network address and 24 is the number of bits set in the netmask.
552 Note that subnets like 192.168.1.1/24 are invalid!
553 Read a networking HOWTO/FAQ/guide if you don't understand this.
554 IPv6 subnets are notated like fec0:0:0:1:0:0:0:0/64.
555 MAC addresses are notated like 0:1a:2b:3c:4d:5e.
556
557 .Pp
558 A Subnet can be given a weight to indicate its priority over identical Subnets
559 owned by different nodes.  The default weight is 10. Lower values indicate
560 higher priority. Packets will be sent to the node with the highest priority,
561 unless that node is not reachable, in which case the node with the next highest
562 priority will be tried, and so on.
563
564 .It Va TCPOnly Li = yes | no Pq no Bq obsolete
565 If this variable is set to yes,
566 then the packets are tunnelled over the TCP connection instead of a UDP connection.
567 This is especially useful for those who want to run a tinc daemon
568 from behind a masquerading firewall,
569 or if UDP packet routing is disabled somehow.
570 Setting this options also implicitly sets IndirectData.
571
572 .Pp
573 Since version 1.0.10, tinc will automatically detect whether communication via
574 UDP is possible or not.
575 .El
576
577 .Sh SCRIPTS
578 Apart from reading the server and host configuration files,
579 tinc can also run scripts at certain moments.
580 Under Windows (not Cygwin), the scripts should have the extension
581 .Pa .bat .
582 .Bl -tag -width indent
583
584 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
585 This is the most important script.
586 If it is present it will be executed right after the tinc daemon has been started and has connected to the virtual network device.
587 It should be used to set up the corresponding network interface,
588 but can also be used to start other things.
589 Under Windows you can use the Network Connections control panel instead of creating this script.
590
591 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down
592 This script is started right before the tinc daemon quits.
593
594 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar HOST Ns Pa -up
595 This script is started when the tinc daemon with name
596 .Ar HOST
597 becomes reachable.
598
599 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/ Ns Ar HOST Ns Pa -down
600 This script is started when the tinc daemon with name
601 .Ar HOST
602 becomes unreachable.
603
604 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /host-up
605 This script is started when any host becomes reachable.
606
607 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /host-down
608 This script is started when any host becomes unreachable.
609
610 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /subnet-up
611 This script is started when a Subnet becomes reachable.
612 The Subnet and the node it belongs to are passed in environment variables.
613
614 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /subnet-down
615 This script is started when a Subnet becomes unreachable.
616 .El
617
618 .Pp
619 The scripts are started without command line arguments, but can make use of certain environment variables.
620 Under UNIX like operating systems the names of environment variables must be preceded by a
621 .Li $ 
622 in scripts.
623 Under Windows, in
624 .Pa .bat
625 files, they have to be put between
626 .Li %
627 signs.
628 .Bl -tag -width indent
629
630 .It Ev NETNAME
631 If a netname was specified, this environment variable contains it.
632
633 .It Ev NAME
634 Contains the name of this tinc daemon.
635
636 .It Ev DEVICE
637 Contains the name of the virtual network device that tinc uses.
638
639 .It Ev INTERFACE
640 Contains the name of the virtual network interface that tinc uses.
641 This should be used for commands like
642 .Pa ifconfig .
643
644 .It Ev NODE
645 When a host becomes (un)reachable, this is set to its name.
646 If a subnet becomes (un)reachable, this is set to the owner of that subnet.
647
648 .It Ev REMOTEADDRESS
649 When a host becomes (un)reachable, this is set to its real address.
650
651 .It Ev REMOTEPORT
652 When a host becomes (un)reachable, this is set to the port number it uses for communication with other tinc daemons.
653
654 .It Ev SUBNET
655 When a subnet becomes (un)reachable, this is set to the subnet.
656
657 .It Ev WEIGHT
658 When a subnet becomes (un)reachable, this is set to the subnet weight.
659 .El
660
661 .Sh FILES
662 The most important files are:
663 .Bl -tag -width indent
664
665 .It Pa @sysconfdir@/tinc/
666 The top directory for configuration files.
667
668 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc.conf
669 The default name of the server configuration file for net
670 .Ar NETNAME .
671
672 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /hosts/
673 Host configuration files are kept in this directory.
674
675 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up
676 If an executable file with this name exists,
677 it will be executed right after the tinc daemon has connected to the virtual network device.
678 It can be used to set up the corresponding network interface.
679
680 .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down
681 If an executable file with this name exists,
682 it will be executed right before the tinc daemon is going to close
683 its connection to the virtual network device.
684 .El
685
686 .Sh SEE ALSO
687 .Xr tincd 8 ,
688 .Pa http://www.tinc-vpn.org/ ,
689 .Pa http://www.linuxdoc.org/LDP/nag2/ .
690
691 .Pp
692 The full documentation for
693 .Nm tinc
694 is maintained as a Texinfo manual.
695 If the info and tinc programs are properly installed at your site, the command
696 .Ic info tinc
697 should give you access to the complete manual.
698
699 .Pp
700 .Nm tinc
701 comes with ABSOLUTELY NO WARRANTY.
702 This is free software, and you are welcome to redistribute it under certain conditions;
703 see the file COPYING for details.