Add an invitation protocol.
[tinc] / doc / tinc.8.in
1 .Dd 2013-01-15
2 .Dt TINCCTL 8
3 .\" Manual page created by:
4 .\" Scott Lamb
5 .Sh NAME
6 .Nm tinc
7 .Nd tinc VPN control
8 .Sh SYNOPSIS
9 .Nm
10 .Op Fl cn
11 .Op Fl -config Ns = Ns Ar DIR
12 .Op Fl -net Ns = Ns Ar NETNAME
13 .Op Fl -pidfile Ns = Ns Ar FILENAME
14 .Op Fl -help
15 .Op Fl -version
16 .Ar COMMAND
17 .Sh DESCRIPTION
18 This is the control program of tinc, a secure virtual private network (VPN)
19 project.
20 .Nm
21 communicates with
22 .Xr tincd 8
23 to alter and inspect the running VPN's state.
24 .Sh OPTIONS
25 .Bl -tag -width indent
26 .It Fl n, -net Ns = Ns Ar NETNAME
27 Communicate with tincd(8) connected with
28 .Ar NETNAME .
29 .It Fl -pidfile Ns = Ns Ar FILENAME
30 Use the cookie from
31 .Ar FILENAME
32 to authenticate with a running tinc daemon.
33 If unspecified, the default is
34 .Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid.
35 .It Fl -help
36 Display short list of options.
37 .It Fl -version
38 Output version information and exit.
39 .El
40 .Sh ENVIRONMENT VARIABLES
41 .Bl -tag -width indent
42 .It Ev NETNAME
43 If no netname is specified on the command line with the
44 .Fl n
45 option, the value of this environment variable is used.
46 .El
47 .Sh COMMANDS
48 .Bl -tag -width indent
49 .It init Op Ar name
50 Create initial configuration files and RSA and ECDSA keypairs with default length.
51 If no
52 .Ar name
53 for this node is given, it will be asked for.
54 .It get Ar variable
55 Print the current value of configuration variable
56 .Ar variable .
57 If more than one variable with the same name exists,
58 the value of each of them will be printed on a separate line.
59 .It set Ar variable Ar value
60 Set configuration variable
61 .Ar variable
62 to the given
63 .Ar value .
64 All previously existing configuration variables with the same name are removed.
65 To set a variable for a specific host, use the notation
66 .Ar host Ns Li . Ns Ar variable .
67 .It add Ar variable Ar value
68 As above, but without removing any previously existing configuration variables.
69 .It del Ar variable Op Ar value
70 Remove configuration variables with the same name and
71 .Ar value .
72 If no
73 .Ar value
74 is given, all configuration variables with the same name will be removed.
75 .It edit Ar filename
76 Start an editor for the given configuration file.
77 You do not need to specify the full path to the file.
78 .It export
79 Export the host configuration file of the local node to standard output.
80 .It export-all
81 Export all host configuration files to standard output.
82 .It import Op Fl -force
83 Import host configuration data generated by the
84 .Nm
85 export command from standard input.
86 Already existing host configuration files are not overwritten unless the option
87 .Fl -force
88 is used.
89 .It exchange Op Fl -force
90 The same as export followed by import.
91 .It exchange-all Op Fl -force
92 The same as export-all followed by import.
93 .It invite Ar name
94 Prepares an invitation for a new node with the given
95 .Ar name ,
96 and prints a short invitation URL that can be used with the join command.
97 .It join Op Ar URL
98 Join an existing VPN using an invitation URL created using the invite command.
99 If no
100 .Ar URL
101 is given, it will be read from standard input.
102 .It start Op tincd options
103 Start
104 .Xr tincd 8 ,
105 optionally with the given extra options.
106 .It stop
107 Stop
108 .Xr tincd 8 .
109 .It restart
110 Restart
111 .Xr tincd 8 .
112 .It reload
113 Partially rereads configuration files. Connections to hosts whose host
114 config files are removed are closed. New outgoing connections specified
115 in
116 .Xr tinc.conf 5
117 will be made.
118 .It pid
119 Shows the PID of the currently running
120 .Xr tincd 8 .
121 .It generate-keys Op bits
122 Generate both RSA and ECDSA keypairs (see below) and exit.
123 .It generate-ecdsa-keys
124 Generate public/private ECDSA keypair and exit.
125 .It generate-rsa-keys Op bits
126 Generate public/private RSA keypair and exit.
127 If
128 .Ar bits
129 is omitted, the default length will be 2048 bits.
130 When saving keys to existing files, tinc will not delete the old keys;
131 you have to remove them manually.
132 .It dump [reachable] nodes
133 Dump a list of all known nodes in the VPN.
134 If the keyword reachable is used, only lists reachable nodes.
135 .It dump edges
136 Dump a list of all known connections in the VPN.
137 .It dump subnets
138 Dump a list of all known subnets in the VPN.
139 .It dump connections
140 Dump a list of all meta connections with ourself.
141 .It dump graph | digraph
142 Dump a graph of the VPN in
143 .Xr dotty 1
144 format.
145 Nodes are colored according to their reachability:
146 red nodes are unreachable, orange nodes are indirectly reachable, green nodes are directly reachable.
147 Black nodes are either directly or indirectly reachable, but direct reachability has not been tried yet.
148 .It info Ar node | subnet | address
149 Show information about a particular node, subnet or address.
150 If an address is given, any matching subnet will be shown.
151 .It purge
152 Purges all information remembered about unreachable nodes.
153 .It debug Ar N
154 Sets debug level to
155 .Ar N .
156 .It log Op Ar N
157 Capture log messages from a running tinc daemon.
158 An optional debug level can be given that will be applied only for log messages sent to
159 .Nm tinc .
160 .It retry
161 Forces
162 .Xr tincd 8
163 to try to connect to all uplinks immediately.
164 Usually
165 .Xr tincd 8
166 attempts to do this itself,
167 but increases the time it waits between the attempts each time it failed,
168 and if
169 .Xr tincd 8
170 didn't succeed to connect to an uplink the first time after it started,
171 it defaults to the maximum time of 15 minutes.
172 .It disconnect Ar NODE
173 Closes the meta connection with the given
174 .Ar NODE .
175 .It top
176 If
177 .Nm
178 is compiled with libcurses support, this will display live traffic statistics
179 for all the known nodes, similar to the UNIX
180 .Xr top 1
181 command.
182 See below for more information.
183 .It pcap
184 Dump VPN traffic going through the local tinc node in
185 .Xr pcap-savefile 5
186 format to standard output,
187 from where it can be redirected to a file or piped through a program that can parse it directly,
188 such as
189 .Xr tcpdump 8 .
190 .El
191 .Sh EXAMPLES
192 Examples of some commands:
193 .Bd -literal -offset indent
194 tinc -n vpn dump graph | circo -Txlib
195 tinc -n vpn pcap | tcpdump -r -
196 tinc -n vpn top
197 .Pp
198 .Ed
199 Example of configuring tinc using
200 .Nm :
201 .Bd -literal -offset indent
202 tinc -n vpn init foo
203 tinc -n vpn add Subnet 192.168.1.0/24
204 tinc -n vpn add bar.Address bar.example.com
205 tinc -n vpn add ConnectTo bar
206 tinc -n vpn export | gpg --clearsign | mail -s "My config" vpnmaster@example.com
207 .Ed
208 .Sh TOP
209 The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
210 It displays a list of all the known nodes in the left-most column,
211 and the amount of bytes and packets read from and sent to each node in the other columns.
212 By default, the information is updated every second.
213 The behaviour of the top command can be changed using the following keys:
214 .Bl -tag
215 .It Ic s
216 Change the interval between updates.
217 After pressing the
218 .Ic s
219 key, enter the desired interval in seconds, followed by enter.
220 Fractional seconds are honored.
221 Intervals lower than 0.1 seconds are not allowed.
222 .It Ic c
223 Toggle between displaying current traffic rates (in packets and bytes per second)
224 and cumulative traffic (total packets and bytes since the tinc daemon started).
225 .It Ic n
226 Sort the list of nodes by name.
227 .It Ic i
228 Sort the list of nodes by incoming amount of bytes.
229 .It Ic I
230 Sort the list of nodes by incoming amount of packets.
231 .It Ic o
232 Sort the list of nodes by outgoing amount of bytes.
233 .It Ic O
234 Sort the list of nodes by outgoing amount of packets.
235 .It Ic t
236 Sort the list of nodes by sum of incoming and outgoing amount of bytes.
237 .It Ic T
238 Sort the list of nodes by sum of incoming and outgoing amount of packets.
239 .It Ic b
240 Show amount of traffic in bytes.
241 .It Ic k
242 Show amount of traffic in kilobytes.
243 .It Ic M
244 Show amount of traffic in megabytes.
245 .It Ic G
246 Show amount of traffic in gigabytes.
247 .It Ic q
248 Quit.
249 .El
250 .Sh BUGS
251 If you find any bugs, report them to tinc@tinc-vpn.org.
252 .Sh SEE ALSO
253 .Xr tincd 8 ,
254 .Xr tinc.conf 5 ,
255 .Xr dotty 1 ,
256 .Xr pcap-savefile 5 ,
257 .Xr tcpdump 8 ,
258 .Xr top 1 ,
259 .Pa http://www.tinc-vpn.org/ ,
260 .Pa http://www.cabal.org/ .
261 .Pp
262 The full documentation for tinc is maintained as a Texinfo manual.
263 If the info and tinc programs are properly installed at your site,
264 the command
265 .Ic info tinc
266 should give you access to the complete manual.
267 .Pp
268 tinc comes with ABSOLUTELY NO WARRANTY.
269 This is free software, and you are welcome to redistribute it under certain conditions;
270 see the file COPYING for details.
271 .Sh AUTHORS
272 .An "Ivo Timmermans"
273 .An "Guus Sliepen" Aq guus@tinc-vpn.org
274 .Pp
275 And thanks to many others for their contributions to tinc!