9ba15fc81bde9695f8e3f512acc262d5000329a0
[tinc] / doc / tinc.conf.5
1 .TH TINC 5 "Jan 2001" "tinc version 1.0pre4" "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 \fBtincd\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>
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 \fBPrivateKeyFile\fR = <\fIfilename\fR>
112 The file in which the private RSA key of this tinc daemon resides.
113
114 Note that there must be exactly one of \fBPrivateKey\fR or \fBPrivateKeyFile\fR
115 specified in the configuration file.
116 .TP
117 \fBTapDevice\fR = <\fIdevice\fR> (/dev/tap0)
118 The ethertap or tun/tap device to use. tinc will automatically detect what
119 kind of tapdevice it is.
120 Note that you can only use one device per
121 daemon. The info pages of the tinc package contain more information
122 about configuring an ethertap device for Linux.
123 .PP
124 .SH "HOST CONFIGURATION FILES"
125 The host configuration files contain all information needed to establish a
126 connection to those hosts. A host configuration file is also required for the
127 local tinc daemon, it will use it to read in it's listen port, public key and
128 subnets.
129
130 The idea is that these files are ``portable''. You can safely mail your own host
131 configuration file to someone else. That other person can then copy it to his
132 own hosts directory, and now his tinc daemon will be able to connect to your
133 tinc daemon. Since host configuration files only contain public keys, no secrets
134 are revealed by sending out this information.
135 .PP
136 .TP
137 \fBAddress\fR = <\fIIP address\fR> (required)
138 The real address or hostname of this tinc daemon.
139 .TP
140 \fBPort\fR = <\fIport number\fR> (655)
141 The port on which this tinc daemon is listening for incoming connections.
142 .TP
143 \fBPublicKey\fR = <\fIkey\fR>
144 The public RSA key of this tinc daemon. It will be used to cryptographically
145 verify it's identity and to set up a secure connection.
146 .TP
147 \fBPublicKeyFile\fR = <\fIfilename\fR>
148 The file in which the public RSA key of this tinc daemon resides.
149
150 Note that there must be exactly one of \fBPublicKey\fR or \fBPublicKeyFile\fR
151 specified in each host configuration file, if you want to be able to establish
152 a connection with that host.
153 .TP
154 \fBSubnet\fR = <\fIaddress/masklength\fR> (optional)
155 The subnet which this tinc daemon will serve. tinc tries to look up which other
156 daemon it should send a packet to by searching the appropiate subnet. If the
157 packet matches a subnet, it will be sent to the daemon who has this subnet in his
158 host configuration file. Multiple subnet lines can be specified.
159
160 At the moment, this directive is only used in the host configuration file of
161 the local tinc daemon itself. In upcoming versions of tinc, it will be possible to
162 restrict other hosts in which subnets they server.
163
164 The subnets must be in a form like \fI192.168.1.0/24\fR, where 192.168.1.0 is the
165 network address and 24 is the number of bits set in the netmask. Note that subnets
166 like \fI192.168.1.1/24\fR are invalid! Read a networking howto/FAQ/guide if you
167 don't understand this.
168 .SH "FILES"
169 .TP
170 \fI/etc/tinc/\fR
171 The top directory for configuration files.
172 .TP
173 \fI/etc/tinc/\fBnn\fI/tinc.conf\fR
174 The default name of the server configuration file for net
175 \fBnn\fR.
176 .TP
177 \fI/etc/tinc/\fBnn\fI/hosts/\fR
178 Host configuration files are kept in this directory.
179 .TP
180 \fI/etc/tinc/\fBnn\fI/tinc-up\fR
181 If an executable file with this name exists, it will be executed
182 right after the tinc daemon has connected to the tap device. It can
183 be used to ifconfig the network interface.
184
185 If the tapdevice is a tun/tap device, the evironment variable
186 \fB$IFNAME\fR will be set to the name of the network interface.
187 .TP
188 \fI/etc/tinc/\fBnn\fI/tinc-down\fR
189 If an executable file with this name exists, it will be executed
190 right before the tinc daemon is going to close it's connection to the
191 tap device.
192 .PP
193 .SH "SEE ALSO"
194 \fBtincd\fR(8)
195 .TP
196 \fBhttp://tinc.nl.linux.org/\fR
197 .TP
198 \fBhttp://www.kernelnotes.org/guides/NAG/\fR
199 .PP
200 The full documentation for
201 .B tinc
202 is maintained as a Texinfo manual.  If the
203 .B info
204 and
205 .B tinc
206 programs are properly installed at your site, the command
207 .IP
208 .B info tinc
209 .PP
210 should give you access to the complete manual.
211 .PP
212 tinc comes with ABSOLUTELY NO WARRANTY.  This is free software,
213 and you are welcome to redistribute it under certain conditions;
214 see the file COPYING for details.