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
19 This is the control program of tinc, a secure virtual private network (VPN)
24 and can to alter and inspect the state of a running VPN.
25 It can also be used to change the configuration,
26 or to import or export host configuration files from other nodes.
32 this command is immediately executed, after which
40 it will display a prompt, and commands can be entered on the prompt.
43 is compiled with libreadline, history and command completion are available on the prompt.
44 One can also pipe a script containing commands through
46 In that case, lines starting with a # symbol will be ignored.
48 .Bl -tag -width indent
49 .It Fl n, -net Ns = Ns Ar NETNAME
50 Communicate with tincd(8) connected with
52 .It Fl -pidfile Ns = Ns Ar FILENAME
55 to authenticate with a running tinc daemon.
56 If unspecified, the default is
57 .Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid.
59 Force some commands to work despite warnings.
61 Display short list of options.
63 Output version information and exit.
65 .Sh ENVIRONMENT VARIABLES
66 .Bl -tag -width indent
68 If no netname is specified on the command line with the
70 option, the value of this environment variable is used.
73 .Bl -tag -width indent
75 Create initial configuration files and RSA and Ed25519 keypairs with default length.
78 for this node is given, it will be asked for.
80 Print the current value of configuration variable
82 If more than one variable with the same name exists,
83 the value of each of them will be printed on a separate line.
84 .It set Ar variable Ar value
85 Set configuration variable
89 All previously existing configuration variables with the same name are removed.
90 To set a variable for a specific host, use the notation
91 .Ar host Ns Li . Ns Ar variable .
92 .It add Ar variable Ar value
93 As above, but without removing any previously existing configuration variables.
94 If the variable already exists with the given value, nothing happens.
95 .It del Ar variable Op Ar value
96 Remove configuration variables with the same name and
100 is given, all configuration variables with the same name will be removed.
102 Start an editor for the given configuration file.
103 You do not need to specify the full path to the file.
105 Export the host configuration file of the local node to standard output.
107 Export all host configuration files to standard output.
109 Import host configuration data generated by the
111 export command from standard input.
112 Already existing host configuration files are not overwritten unless the option
116 The same as export followed by import.
118 The same as export-all followed by import.
120 Prepares an invitation for a new node with the given
122 and prints a short invitation URL that can be used with the join command.
124 Join an existing VPN using an invitation URL created using the invite command.
127 is given, it will be read from standard input.
128 .It start Op tincd options
131 optionally with the given extra options.
135 .It restart Op tincd options
138 optionally with the given extra options.
140 Partially rereads configuration files. Connections to hosts whose host
141 config files are removed are closed. New outgoing connections specified
146 Shows the PID of the currently running
148 .It generate-keys Op bits
149 Generate both RSA and Ed25519 keypairs (see below) and exit.
150 .It generate-ed25519-keys
151 Generate public/private Ed25519 keypair and exit.
152 .It generate-rsa-keys Op bits
153 Generate public/private RSA keypair and exit.
156 is omitted, the default length will be 2048 bits.
157 When saving keys to existing files, tinc will not delete the old keys;
158 you have to remove them manually.
159 .It dump [reachable] nodes
160 Dump a list of all known nodes in the VPN.
161 If the keyword reachable is used, only lists reachable nodes.
163 Dump a list of all known connections in the VPN.
165 Dump a list of all known subnets in the VPN.
167 Dump a list of all meta connections with ourself.
168 .It dump graph | digraph
169 Dump a graph of the VPN in
172 Nodes are colored according to their reachability:
173 red nodes are unreachable, orange nodes are indirectly reachable, green nodes are directly reachable.
174 Black nodes are either directly or indirectly reachable, but direct reachability has not been tried yet.
175 .It info Ar node | subnet | address
176 Show information about a particular node, subnet or address.
177 If an address is given, any matching subnet will be shown.
179 Purges all information remembered about unreachable nodes.
184 Capture log messages from a running tinc daemon.
185 An optional debug level can be given that will be applied only for log messages sent to
190 to try to connect to all uplinks immediately.
193 attempts to do this itself,
194 but increases the time it waits between the attempts each time it failed,
197 didn't succeed to connect to an uplink the first time after it started,
198 it defaults to the maximum time of 15 minutes.
199 .It disconnect Ar NODE
200 Closes the meta connection with the given
205 is compiled with libcurses support, this will display live traffic statistics
206 for all the known nodes, similar to the UNIX
209 See below for more information.
211 Dump VPN traffic going through the local tinc node in
213 format to standard output,
214 from where it can be redirected to a file or piped through a program that can parse it directly,
217 .It network Op Ar netname
220 is given, switch to that network.
221 Otherwise, display a list of all networks for which configuration files exist.
223 This will check the configuration files for possible problems,
224 such as unsafe file permissions, missing executable bit on script,
225 unknown and obsolete configuration variables, wrong public and/or private keys, and so on.
227 When problems are found, this will be printed on a line with WARNING or ERROR in front of it.
228 Most problems must be corrected by the user itself, however in some cases (like file permissions and missing public keys),
229 tinc will ask if it should fix the problem.
232 Examples of some commands:
233 .Bd -literal -offset indent
234 tinc -n vpn dump graph | circo -Txlib
235 tinc -n vpn pcap | tcpdump -r -
239 Examples of changing the configuration using
241 .Bd -literal -offset indent
243 tinc -n vpn add Subnet 192.168.1.0/24
244 tinc -n vpn add bar.Address bar.example.com
245 tinc -n vpn add ConnectTo bar
246 tinc -n vpn export | gpg --clearsign | mail -s "My config" vpnmaster@example.com
249 The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
250 It displays a list of all the known nodes in the left-most column,
251 and the amount of bytes and packets read from and sent to each node in the other columns.
252 By default, the information is updated every second.
253 The behaviour of the top command can be changed using the following keys:
256 Change the interval between updates.
259 key, enter the desired interval in seconds, followed by enter.
260 Fractional seconds are honored.
261 Intervals lower than 0.1 seconds are not allowed.
263 Toggle between displaying current traffic rates (in packets and bytes per second)
264 and cumulative traffic (total packets and bytes since the tinc daemon started).
266 Sort the list of nodes by name.
268 Sort the list of nodes by incoming amount of bytes.
270 Sort the list of nodes by incoming amount of packets.
272 Sort the list of nodes by outgoing amount of bytes.
274 Sort the list of nodes by outgoing amount of packets.
276 Sort the list of nodes by sum of incoming and outgoing amount of bytes.
278 Sort the list of nodes by sum of incoming and outgoing amount of packets.
280 Show amount of traffic in bytes.
282 Show amount of traffic in kilobytes.
284 Show amount of traffic in megabytes.
286 Show amount of traffic in gigabytes.
291 If you find any bugs, report them to tinc@tinc-vpn.org.
296 .Xr pcap-savefile 5 ,
299 .Pa http://www.tinc-vpn.org/ ,
300 .Pa http://www.cabal.org/ .
302 The full documentation for tinc is maintained as a Texinfo manual.
303 If the info and tinc programs are properly installed at your site,
306 should give you access to the complete manual.
308 tinc comes with ABSOLUTELY NO WARRANTY.
309 This is free software, and you are welcome to redistribute it under certain conditions;
310 see the file COPYING for details.
313 .An "Guus Sliepen" Aq guus@tinc-vpn.org
315 And thanks to many others for their contributions to tinc!