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