3 .\" Manual page created by:
11 .Op Fl -config Ns = Ns Ar DIR
12 .Op Fl -net Ns = Ns Ar NETNAME
13 .Op Fl -pidfile Ns = Ns Ar FILENAME
20 This is the control program of tinc, a secure virtual private network (VPN)
25 and can to alter and inspect the state of a running VPN.
26 It can also be used to change the configuration,
27 or to import or export host configuration files from other nodes.
33 this command is immediately executed, after which
41 it will display a prompt, and commands can be entered on the prompt.
44 is compiled with libreadline, history and command completion are available on the prompt.
45 One can also pipe a script containing commands through
47 In that case, lines starting with a # symbol will be ignored.
49 .Bl -tag -width indent
50 .It Fl n, -net Ns = Ns Ar NETNAME
51 Communicate with tincd(8) connected with
53 .It Fl -pidfile Ns = Ns Ar FILENAME
56 to authenticate with a running tinc daemon.
57 If unspecified, the default is
58 .Pa @runstatedir@/tinc. Ns Ar NETNAME Ns Pa .pid.
60 Don't ask for anything (non-interactive mode).
62 Force some commands to work despite warnings.
64 Display short list of options.
66 Output version information and exit.
68 .Sh ENVIRONMENT VARIABLES
69 .Bl -tag -width indent
71 If no netname is specified on the command line with the
73 option, the value of this environment variable is used.
76 .Bl -tag -width indent
78 Create initial configuration files and RSA and Ed25519 keypairs with default length.
81 for this node is given, it will be asked for.
83 Print the current value of configuration variable
85 If more than one variable with the same name exists,
86 the value of each of them will be printed on a separate line.
87 .It set Ar variable Ar value
88 Set configuration variable
92 All previously existing configuration variables with the same name are removed.
93 To set a variable for a specific host, use the notation
94 .Ar host Ns Li . Ns Ar variable .
95 .It add Ar variable Ar value
96 As above, but without removing any previously existing configuration variables.
97 If the variable already exists with the given value, nothing happens.
98 .It del Ar variable Op Ar value
99 Remove configuration variables with the same name and
103 is given, all configuration variables with the same name will be removed.
105 Start an editor for the given configuration file.
106 You do not need to specify the full path to the file.
108 Export the host configuration file of the local node to standard output.
110 Export all host configuration files to standard output.
112 Import host configuration data generated by the
114 export command from standard input.
115 Already existing host configuration files are not overwritten unless the option
119 The same as export followed by import.
121 The same as export-all followed by import.
123 Prepares an invitation for a new node with the given
125 and prints a short invitation URL that can be used with the join command.
127 Join an existing VPN using an invitation URL created using the invite command.
130 is given, it will be read from standard input.
131 .It start Op tincd options
134 optionally with the given extra options.
138 .It restart Op tincd options
141 optionally with the given extra options.
143 Partially rereads configuration files. Connections to hosts whose host
144 config files are removed are closed. New outgoing connections specified
149 Shows the PID of the currently running
151 .It generate-keys Op bits
152 Generate both RSA and Ed25519 keypairs (see below) and exit.
153 .It generate-ed25519-keys
154 Generate public/private Ed25519 keypair and exit.
155 .It generate-rsa-keys Op bits
156 Generate public/private RSA keypair and exit.
159 is omitted, the default length will be 2048 bits.
160 When saving keys to existing files, tinc will not delete the old keys;
161 you have to remove them manually.
162 .It dump [reachable] nodes
163 Dump a list of all known nodes in the VPN.
164 If the keyword reachable is used, only lists reachable nodes.
166 Dump a list of all known connections in the VPN.
168 Dump a list of all known subnets in the VPN.
170 Dump a list of all meta connections with ourself.
171 .It dump graph | digraph
172 Dump a graph of the VPN in
175 Nodes are colored according to their reachability:
176 red nodes are unreachable, orange nodes are indirectly reachable, green nodes are directly reachable.
177 Black nodes are either directly or indirectly reachable, but direct reachability has not been tried yet.
179 Dump a list of outstanding invitations.
180 The filename of the invitation, as well as the name of the node that is being invited is shown for each invitation.
181 .It info Ar node | subnet | address
182 Show information about a particular node, subnet or address.
183 If an address is given, any matching subnet will be shown.
185 Purges all information remembered about unreachable nodes.
190 Capture log messages from a running tinc daemon.
191 An optional debug level can be given that will be applied only for log messages sent to
196 to try to connect to all uplinks immediately.
199 attempts to do this itself,
200 but increases the time it waits between the attempts each time it failed,
203 didn't succeed to connect to an uplink the first time after it started,
204 it defaults to the maximum time of 15 minutes.
205 .It disconnect Ar NODE
206 Closes the meta connection with the given
211 is compiled with libcurses support, this will display live traffic statistics
212 for all the known nodes, similar to the UNIX
215 See below for more information.
217 Dump VPN traffic going through the local tinc node in
219 format to standard output,
220 from where it can be redirected to a file or piped through a program that can parse it directly,
223 .It network Op Ar netname
226 is given, switch to that network.
227 Otherwise, display a list of all networks for which configuration files exist.
229 This will check the configuration files for possible problems,
230 such as unsafe file permissions, missing executable bit on script,
231 unknown and obsolete configuration variables, wrong public and/or private keys, and so on.
233 When problems are found, this will be printed on a line with WARNING or ERROR in front of it.
234 Most problems must be corrected by the user itself, however in some cases (like file permissions and missing public keys),
235 tinc will ask if it should fix the problem.
236 .It sign Op Ar filename
237 Sign a file with the local node's private key.
240 is given, the file is read from standard input.
241 The signed file is written to standard output.
242 .It verify Ar name Op Ar filename
243 Check the signature of a file against a node's public key.
246 of the node must be given,
249 to check against the local node's public key, or
251 to allow a signature from any node whose public key is known.
254 is given, the file is read from standard input.
255 If the verification is succesful,
256 a copy of the input with the signature removed is written to standard output,
257 and the exit code will be zero.
258 If the verification failed,
259 nothing will be written to standard output, and the exit code will be non-zero.
262 Examples of some commands:
263 .Bd -literal -offset indent
264 tinc -n vpn dump graph | circo -Txlib
265 tinc -n vpn pcap | tcpdump -r -
269 Examples of changing the configuration using
271 .Bd -literal -offset indent
273 tinc -n vpn add Subnet 192.168.1.0/24
274 tinc -n vpn add bar.Address bar.example.com
275 tinc -n vpn add ConnectTo bar
276 tinc -n vpn export | gpg --clearsign | mail -s "My config" vpnmaster@example.com
279 The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
280 It displays a list of all the known nodes in the left-most column,
281 and the amount of bytes and packets read from and sent to each node in the other columns.
282 By default, the information is updated every second.
283 The behaviour of the top command can be changed using the following keys:
286 Change the interval between updates.
289 key, enter the desired interval in seconds, followed by enter.
290 Fractional seconds are honored.
291 Intervals lower than 0.1 seconds are not allowed.
293 Toggle between displaying current traffic rates (in packets and bytes per second)
294 and cumulative traffic (total packets and bytes since the tinc daemon started).
296 Sort the list of nodes by name.
298 Sort the list of nodes by incoming amount of bytes.
300 Sort the list of nodes by incoming amount of packets.
302 Sort the list of nodes by outgoing amount of bytes.
304 Sort the list of nodes by outgoing amount of packets.
306 Sort the list of nodes by sum of incoming and outgoing amount of bytes.
308 Sort the list of nodes by sum of incoming and outgoing amount of packets.
310 Show amount of traffic in bytes.
312 Show amount of traffic in kilobytes.
314 Show amount of traffic in megabytes.
316 Show amount of traffic in gigabytes.
321 If you find any bugs, report them to tinc@tinc-vpn.org.
326 .Xr pcap-savefile 5 ,
329 .Pa http://www.tinc-vpn.org/ ,
330 .Pa http://www.cabal.org/ .
332 The full documentation for tinc is maintained as a Texinfo manual.
333 If the info and tinc programs are properly installed at your site,
336 should give you access to the complete manual.
338 tinc comes with ABSOLUTELY NO WARRANTY.
339 This is free software, and you are welcome to redistribute it under certain conditions;
340 see the file COPYING for details.
343 .An "Guus Sliepen" Aq guus@tinc-vpn.org
345 And thanks to many others for their contributions to tinc!