- Changed license of AVL tree library to GPL.
[tinc] / doc / tinc.conf.5
1 .TH TINC 5 "May 2000" "tinc version 1.0" "FSF"
2 .SH NAME
3 tinc.conf \- tinc daemon configuration
4 .SH "DESCRIPTION"
5 The files in the \fI/etc/tinc\fR directory contain runtime and
6 security information for the \fBtinc\fR(8) daemon.
7 .PP
8 .SH "NETWORKS"
9 It is perfectly ok for you to run more than one tinc daemon. However,
10 in its default form, you will soon notice that you can't use two
11 different configuration files without the \fI-c\fR option.
12
13 We have thought of another way of dealing with this: network
14 names. This means that you call \fBtincd\fR with the \fI-n\fR argument,
15 which will assign a name to this daemon.
16
17 The effect of this is that the daemon will set its configuration
18 ``root'' to \fI/etc/tinc/\fBnn\fI/\fR, where \fBnn\fR is your argument
19 to the \fI-n\fR option. You'll notice that it appears in syslog as
20 ``tincd.\fBnn\fR''.
21
22 However, it is not strictly necessary that you call tinc with the -n
23 option. In this case, the network name would just be empty, and it
24 will be used as such. tinc now looks for files in \fI/etc/tinc/\fR,
25 instead of \fI/etc/tinc/\fBnn\fI/\fR; the configuration file should be
26 \fI/etc/tinc/tinc.conf\fR, and the passphrases are now expected to be
27 in \fI/etc/tinc/passphrases/\fR.
28
29 But it is highly recommended that you use this feature of tinc,
30 because it will be so much clearer whom your daemon talks to. Hence,
31 we will assume that you use it.
32 .PP
33 .SH "NAMES"
34 Each tinc daemon should have a name that is unique in the network which
35 it will be part of. The name will be used by other tinc daemons for
36 identification. The name has to be declared in the
37 \fI/etc/tinc/\fBnn\fI/tinc.conf\fR file.
38
39 To make things easy, choose something that will give unique and easy
40 to rememebr names to your tinc daemon(s).
41 You could try things like hostnames, owner surnames or location names.
42 .PP
43 .SH "PUBLIC/PRIVATE KEYS"
44 You should use \fBtincd --generate-keys\fR to generate public/private
45 keypairs. It will generate two keys. The line containing the private
46 key should be completely copied to \fI/etc/tinc/\fBnn\fI/tinc.conf\fR
47 \-\- where \fBnn\fR stands for the network (See under \fBNETWORKS\fR)
48 above. The line containing the public key should be completely copied
49 to \fI/etc/tinc/\fBnn\fI/hosts/\fBname\fR \-\- where \fBname\fR stands
50 for the name of the tinc daemon (See \fBNAMES\fR).
51 .PP
52 .SH "SERVER CONFIGURATION"
53 The server configuration of the daemon is done in the file
54 \fI/etc/tinc/\fBnn\fI/tinc.conf\fR.
55
56 This file consists of comments (lines started with a \fB#\fR) or
57 assignments in the form of
58 .PP
59 .Vb 1
60 \&    \fIVariable \fB= \fIValue\fR.
61 .Ve
62 .PP
63 The variable names are case insensitive, and any spaces, tabs,
64 newlines and carriage returns are ignored. \fINote\fR: it is not
65 required that you put in the \fB=\fR sign, but doing so improves
66 readability. If you leave it out, remember to replace it with at least
67 one space character.
68 .PP
69 Here are all valid variables, listed in alphabetical order. The default
70 value, required or optional is given between parentheses.
71 .TP
72 \fBConnectTo\fR = <\fIname\fR> (optional)
73 Specifies which host to connect to on startup. Multiple \fBConnectTo\fR variables
74 may be specified, if connecting to the first one fails then tinc will try
75 the next one, and so on. The names should be known to this tinc daemon
76 (i.e., there should be a host configuration file for the name on the ConnectTo
77 line).
78
79 If you don't specify a host with \fBConnectTo\fR, tinc won't connect at all,
80 and will instead just listen for incoming connections.
81 .TP
82 \fBHostnames\fR = <\fIyes|no\fR> (no)
83 This option selects whether IP addresses (both real and on the VPN) should
84 be resolved. Since DNS lookups are blocking, it might affect tinc's
85 efficiency, even stopping the daemon for a few seconds everytime it does
86 a lookup if your DNS server is not responding.
87
88 This does not affect resolving hostnames to IP addresses from the
89 host configuration files.
90 .TP
91 \fBKeyExpire\fR = <\fIseconds\fR> (3600)
92 This option controls the time the encryption keys used to encrypt the data
93 are valid. It is common practice to change keys at regular intervals to
94 make it even harder for crackers, even though it is thought to be nearly
95 impossible to crack a single key.
96 .TP
97 \fBName\fR = <\fIname\fR> (required)
98 This is the name which identifies this tinc daemon. It must be unique for
99 the virtual private network this daemon will connect to.
100 .TP
101 \fBPingTimeout\fR = <\fIseconds\fR> (5)
102 The number of seconds of inactivity that tinc will wait before sending a
103 probe to the other end. If that other end doesn't answer within that
104 same amount of seconds, the connection is terminated, and the others
105 will be notified of this.
106 .TP
107 \fBPrivateKey\fR = <\fIkey\fR> (required)
108 The private RSA key of this tinc daemon. It will allow this tinc daemon to
109 authenticate itself to other daemons.
110 .TP
111 \fBTapDevice\fR = <\fIdevice\fR> (/dev/tap0)
112 The ethertap or tun/tap device to use. tinc will automatically detect what
113 kind of tapdevice it is.
114 Note that you can only use one device per
115 daemon. The info pages of the tinc package contain more information
116 about configuring an ethertap device for Linux.
117 .PP
118 .SH "HOST CONFIGURATION FILES"
119 The host configuration files contain all information needed to establish a
120 connection to those hosts. A host configuration file is also required for the
121 local tinc daemon, it will use it to read in it's listen port, public key and
122 subnets.
123
124 The idea is that these files are ``portable''. You can safely mail your own host
125 configuration file to someone else. That other person can then copy it to his
126 own hosts directory, and now his tinc daemon will be able to connect to your
127 tinc daemon. Since host configuration files only contain public keys, no secrets
128 are revealed by sending out this information.
129 .PP
130 .TP
131 \fBAddress\fR = <\fIIP address\fR> (required)
132 The real address or hostname of this tinc daemon.
133 .TP
134 \fBPort\fR = <\fIport number\fR> (655)
135 The port on which this tinc daemon is listening for incoming connections.
136 .TP
137 \fBPublicKey\fR = <\fIkey\fR> (required)
138 The public RSA key of this tinc daemon. It will be used to cryptographically
139 verify it's identity and to set up a secure connection.
140 .TP
141 \fBSubnet\fR = <\fIaddress/masklength\fR> (optional)
142 The subnet which this tinc daemon will serve. tinc tries to look up which other
143 daemon it should send a packet to by searching the appropiate subnet. If the
144 packet matches a subnet, it will be sent to the daemon who has this subnet in his
145 host configuration file. Multiple subnet lines can be specified.
146
147 At the moment, this directive is only used in the host configuration file of
148 the local tinc daemon itself. In upcoming versions of tinc, it will be possible to
149 restrict other hosts in which subnets they server.
150
151 The subnets must be in a form like \fI192.168.1.0/24\fR, where 192.168.1.0 is the
152 network address and 24 is the number of bits set in the netmask. Note that subnets
153 like \fI192.168.1.1/24\fR are invalid! Read a networking howto/FAQ/guide if you
154 don't understand this.
155 .SH "FILES"
156 .TP
157 \fI/etc/tinc/\fR
158 The top directory for configuration files.
159 .TP
160 \fI/etc/tinc/\fBnn\fI/tinc.conf\fR
161 The default name of the server configuration file for net
162 \fBnn\fR.
163 .TP
164 \fI/etc/tinc/\fBnn\fI/hosts/\fR
165 Host configuration files are kept in this directory.
166 .TP
167 \fI/etc/tinc/\fBnn\fI/tinc-up\fR
168 If an executable file with this name exists, it will be executed
169 right after the tinc daemon has connected to the tap device. It can
170 be used to ifconfig the network interface.
171
172 If the tapdevice is a tun/tap device, the evironment variable
173 \fB$IFNAME\fR will be set to the name of the network interface.
174 .TP
175 \fI/etc/tinc/\fBnn\fI/tinc-down\fR
176 If an executable file with this name exists, it will be executed
177 right before the tinc daemon is going to close it's connection to the
178 tap device.
179 .PP
180 .SH "SEE ALSO"
181 \fBtincd\fR(8)
182 .TP
183 \fBhttp://tinc.nl.linux.org/\fR
184 .TP
185 \fBhttp://www.kernelnotes.org/guides/NAG/\fR
186 .PP
187 The full documentation for
188 .B tinc
189 is maintained as a Texinfo manual.  If the
190 .B info
191 and
192 .B tinc
193 programs are properly installed at your site, the command
194 .IP
195 .B info tinc
196 .PP
197 should give you access to the complete manual.
198 .PP
199 tinc comes with ABSOLUTELY NO WARRANTY.  This is free software,
200 and you are welcome to redistribute it under certain conditions;
201 see the file COPYING for details.