Written down a possible solution.
[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/\fBnetname\fI/\fR, where \fBnetname\fR is your argument
19 to the \fI-n\fR option. You'll notice that it appears in syslog as
20 ``tincd.\fBnetname\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/\fBnetname\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/\fBnetname\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 private
46 key should be stored in a separate file \fI/etc/tinc/\fBnetname\fI/rsa_key.priv\fR
47 \-\- where \fBnetname\fR stands for the network (See under \fBNETWORKS\fR)
48 above. The public key should be stored in
49 the host configuration file \fI/etc/tinc/\fBnetname\fI/hosts/\fBname\fR \-\- where \fBname\fR stands
50 for the name of the local 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/\fBnetname\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 is given between parentheses.
71 .TP
72 \fBConnectTo\fR = <\fIname\fR>
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 try to connect to other daemons 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 \fBInterface\fR = <\fIdevice\fR>
92 If you have more than one network interface in your computer, tinc will
93 by default listen on all of them for incoming connections.  It is
94 possible to bind tinc to a single interface like eth0 or ppp0 with this
95 variable.
96 .TP
97 \fBInterfaceIP\fR = <\fIlocal address\fR>
98 If your computer has more than one IP address on a single interface (for
99 example if you are running virtual hosts), tinc will by default listen
100 on all of them for incoming connections.  It is possible to bind tinc to
101 a single IP address with this variable.  It is still possible to listen
102 on several interfaces at the same time though, if they share the same IP
103 address.
104 .TP
105 \fBKeyExpire\fR = <\fIseconds\fR> (3600)
106 This option controls the time the encryption keys used to encrypt the data
107 are valid. It is common practice to change keys at regular intervals to
108 make it even harder for crackers, even though it is thought to be nearly
109 impossible to crack a single key.
110 .TP
111 \fBName\fR = <\fIname\fR> [required]
112 This is the name which identifies this tinc daemon. It must be unique for
113 the virtual private network this daemon will connect to.
114 .TP
115 \fBPingTimeout\fR = <\fIseconds\fR> (60)
116 The number of seconds of inactivity that tinc will wait before sending a
117 probe to the other end. If that other end doesn't answer within that
118 same amount of seconds, the connection is terminated, and the others
119 will be notified of this.
120 .TP
121 \fBPrivateKey\fR = <\fIkey\fR> [obsolete]
122 The private RSA key of this tinc daemon. It will allow this tinc daemon to
123 authenticate itself to other daemons.
124 .TP
125 \fBPrivateKeyFile\fR = <\fIfilename\fR> [recommended]
126 The file in which the private RSA key of this tinc daemon resides.
127
128 Note that there must be exactly one of \fBPrivateKey\fR or \fBPrivateKeyFile\fR
129 specified in the configuration file.
130 .TP
131 \fBTapDevice\fR = <\fIdevice\fR> (/dev/tap0 or /dev/net/tun)
132 The ethertap or tun/tap device to use. tinc will automatically detect what
133 kind of tapdevice it is.
134 Note that you can only use one device per
135 daemon. The info pages of the tinc package contain more information
136 about configuring an ethertap device for Linux.
137 .PP
138 .SH "HOST CONFIGURATION FILES"
139 The host configuration files contain all information needed to establish a
140 connection to those hosts. A host configuration file is also required for the
141 local tinc daemon, it will use it to read in it's listen port, public key and
142 subnets.
143
144 The idea is that these files are ``portable''. You can safely mail your own host
145 configuration file to someone else. That other person can then copy it to his
146 own hosts directory, and now his tinc daemon will be able to connect to your
147 tinc daemon. Since host configuration files only contain public keys, no secrets
148 are revealed by sending out this information.
149 .PP
150 .TP
151 \fBAddress\fR = <\fIIP address\fR> [recommended]
152 The real address or hostname of this tinc daemon.
153 .TP
154 \fBIndirectData\fR = <\fIyes\fR|\fIno\fR> (no) [experimental]
155 This option specifies whether other tinc daemons besides the one you
156 specified with ConnectTo can make a direct connection to you.  This is
157 especially useful if you are behind a firewall and it is impossible to
158 make a connection from the outside to your tinc daemon.  Otherwise, it
159 is best to leave this option out or set it to no.
160 .TP
161 \fBPort\fR = <\fIport number\fR> (655)
162 The port on which this tinc daemon is listening for incoming connections.
163 .TP
164 \fBPublicKey\fR = <\fIkey\fR> [obsolete]
165 The public RSA key of this tinc daemon. It will be used to cryptographically
166 verify it's identity and to set up a secure connection.
167 .TP
168 \fBPublicKeyFile\fR = <\fIfilename\fR> [obsolete]
169 The file in which the public RSA key of this tinc daemon resides.
170
171 From version 1.0pre4 on tinc will store the public key directly into the
172 host configuration file in PEM format, the above two options then are not
173 necessary. Either the PEM format is used, or exactly
174 one of the above two options must be specified
175 in each host configuration file, if you want to be able to establish a
176 connection with that host.
177 .TP
178 \fBSubnet\fR = <\fIaddress/masklength\fR>
179 The subnet which this tinc daemon will serve. tinc tries to look up which other
180 daemon it should send a packet to by searching the appropiate subnet. If the
181 packet matches a subnet, it will be sent to the daemon who has this subnet in his
182 host configuration file. Multiple subnet lines can be specified.
183
184 At the moment, this directive is only used in the host configuration file of
185 the local tinc daemon itself. In upcoming versions of tinc, it will be possible to
186 restrict other hosts in which subnets they server.
187
188 The subnets must be in a form like \fI192.168.1.0/24\fR, where 192.168.1.0 is the
189 network address and 24 is the number of bits set in the netmask. Note that subnets
190 like \fI192.168.1.1/24\fR are invalid! Read a networking howto/FAQ/guide if you
191 don't understand this.
192 .TP
193 \fBTCPonly\fR = <\fIyes\fR|\fIno\fR> (no) [experimental]
194 If this variable is set to yes, then the packets are tunnelled over a
195 TCP connection instead of a UDP connection.  This is especially useful
196 for those who want to run a tinc daemon from behind a masquerading
197 firewall, or if UDP packet routing is disabled somehow. This is
198 experimental code, try this at your own risk. It may not work at all.
199 Setting this options also implicitly sets IndirectData.
200 .SH "FILES"
201 .TP
202 \fI/etc/tinc/\fR
203 The top directory for configuration files.
204 .TP
205 \fI/etc/tinc/\fBnetname\fI/tinc.conf\fR
206 The default name of the server configuration file for net
207 \fBnetname\fR.
208 .TP
209 \fI/etc/tinc/\fBnetname\fI/hosts/\fR
210 Host configuration files are kept in this directory.
211 .TP
212 \fI/etc/tinc/\fBnetname\fI/tinc-up\fR
213 If an executable file with this name exists, it will be executed
214 right after the tinc daemon has connected to the tap device. It can
215 be used to ifconfig the network interface.
216
217 If the tapdevice is a tun/tap device, the evironment variable
218 \fB$IFNAME\fR will be set to the name of the network interface.
219 .TP
220 \fI/etc/tinc/\fBnetname\fI/tinc-down\fR
221 If an executable file with this name exists, it will be executed
222 right before the tinc daemon is going to close it's connection to the
223 tap device.
224 .PP
225 .SH "SEE ALSO"
226 \fBtincd\fR(8)
227 .TP
228 \fBhttp://tinc.nl.linux.org/\fR
229 .TP
230 \fBhttp://www.linuxdoc.org/LDP/nag2/\fR
231 .PP
232 The full documentation for
233 .B tinc
234 is maintained as a Texinfo manual.  If the
235 .B info
236 and
237 .B tinc
238 programs are properly installed at your site, the command
239 .IP
240 .B info tinc
241 .PP
242 should give you access to the complete manual.
243 .PP
244 tinc comes with ABSOLUTELY NO WARRANTY.  This is free software,
245 and you are welcome to redistribute it under certain conditions;
246 see the file COPYING for details.