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
18 This is the control program of tinc, a secure virtual private network (VPN)
23 and can to alter and inspect the state of a running VPN.
24 It can also be used to change the configuration,
25 or to import or export host configuration files from other nodes.
31 this command is immediately executed, after which
39 it will display a prompt, and commands can be entered on the prompt.
42 is compiled with libreadline, history and command completion are available on the prompt.
43 One can also pipe a script containing commands through
45 In that case, lines starting with a # symbol will be ignored.
47 .Bl -tag -width indent
48 .It Fl n, -net Ns = Ns Ar NETNAME
49 Communicate with tincd(8) connected with
51 .It Fl -pidfile Ns = Ns Ar FILENAME
54 to authenticate with a running tinc daemon.
55 If unspecified, the default is
56 .Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid.
58 Display short list of options.
60 Output version information and exit.
62 .Sh ENVIRONMENT VARIABLES
63 .Bl -tag -width indent
65 If no netname is specified on the command line with the
67 option, the value of this environment variable is used.
70 .Bl -tag -width indent
72 Create initial configuration files and RSA and Ed25519 keypairs with default length.
75 for this node is given, it will be asked for.
77 Print the current value of configuration variable
79 If more than one variable with the same name exists,
80 the value of each of them will be printed on a separate line.
81 .It set Ar variable Ar value
82 Set configuration variable
86 All previously existing configuration variables with the same name are removed.
87 To set a variable for a specific host, use the notation
88 .Ar host Ns Li . Ns Ar variable .
89 .It add Ar variable Ar value
90 As above, but without removing any previously existing configuration variables.
91 .It del Ar variable Op Ar value
92 Remove configuration variables with the same name and
96 is given, all configuration variables with the same name will be removed.
98 Start an editor for the given configuration file.
99 You do not need to specify the full path to the file.
101 Export the host configuration file of the local node to standard output.
103 Export all host configuration files to standard output.
104 .It import Op Fl -force
105 Import host configuration data generated by the
107 export command from standard input.
108 Already existing host configuration files are not overwritten unless the option
111 .It exchange Op Fl -force
112 The same as export followed by import.
113 .It exchange-all Op Fl -force
114 The same as export-all followed by import.
116 Prepares an invitation for a new node with the given
118 and prints a short invitation URL that can be used with the join command.
120 Join an existing VPN using an invitation URL created using the invite command.
123 is given, it will be read from standard input.
124 .It start Op tincd options
127 optionally with the given extra options.
131 .It restart Op tincd options
134 optionally with the given extra options.
136 Partially rereads configuration files. Connections to hosts whose host
137 config files are removed are closed. New outgoing connections specified
142 Shows the PID of the currently running
144 .It generate-keys Op bits
145 Generate both RSA and Ed25519 keypairs (see below) and exit.
146 .It generate-ed25519-keys
147 Generate public/private Ed25519 keypair and exit.
148 .It generate-rsa-keys Op bits
149 Generate public/private RSA keypair and exit.
152 is omitted, the default length will be 2048 bits.
153 When saving keys to existing files, tinc will not delete the old keys;
154 you have to remove them manually.
155 .It dump [reachable] nodes
156 Dump a list of all known nodes in the VPN.
157 If the keyword reachable is used, only lists reachable nodes.
159 Dump a list of all known connections in the VPN.
161 Dump a list of all known subnets in the VPN.
163 Dump a list of all meta connections with ourself.
164 .It dump graph | digraph
165 Dump a graph of the VPN in
168 Nodes are colored according to their reachability:
169 red nodes are unreachable, orange nodes are indirectly reachable, green nodes are directly reachable.
170 Black nodes are either directly or indirectly reachable, but direct reachability has not been tried yet.
171 .It info Ar node | subnet | address
172 Show information about a particular node, subnet or address.
173 If an address is given, any matching subnet will be shown.
175 Purges all information remembered about unreachable nodes.
180 Capture log messages from a running tinc daemon.
181 An optional debug level can be given that will be applied only for log messages sent to
186 to try to connect to all uplinks immediately.
189 attempts to do this itself,
190 but increases the time it waits between the attempts each time it failed,
193 didn't succeed to connect to an uplink the first time after it started,
194 it defaults to the maximum time of 15 minutes.
195 .It disconnect Ar NODE
196 Closes the meta connection with the given
201 is compiled with libcurses support, this will display live traffic statistics
202 for all the known nodes, similar to the UNIX
205 See below for more information.
207 Dump VPN traffic going through the local tinc node in
209 format to standard output,
210 from where it can be redirected to a file or piped through a program that can parse it directly,
213 .It network Op Ar netname
216 is given, switch to that network.
217 Otherwise, display a list of all networks for which configuration files exist.
219 This will check the configuration files for possible problems,
220 such as unsafe file permissions, missing executable bit on script,
221 unknown and obsolete configuration variables, wrong public and/or private keys, and so on.
223 When problems are found, this will be printed on a line with WARNING or ERROR in front of it.
224 Most problems must be corrected by the user itself, however in some cases (like file permissions and missing public keys),
225 tinc will ask if it should fix the problem.
228 Examples of some commands:
229 .Bd -literal -offset indent
230 tinc -n vpn dump graph | circo -Txlib
231 tinc -n vpn pcap | tcpdump -r -
235 Examples of changing the configuration using
237 .Bd -literal -offset indent
239 tinc -n vpn add Subnet 192.168.1.0/24
240 tinc -n vpn add bar.Address bar.example.com
241 tinc -n vpn add ConnectTo bar
242 tinc -n vpn export | gpg --clearsign | mail -s "My config" vpnmaster@example.com
245 The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
246 It displays a list of all the known nodes in the left-most column,
247 and the amount of bytes and packets read from and sent to each node in the other columns.
248 By default, the information is updated every second.
249 The behaviour of the top command can be changed using the following keys:
252 Change the interval between updates.
255 key, enter the desired interval in seconds, followed by enter.
256 Fractional seconds are honored.
257 Intervals lower than 0.1 seconds are not allowed.
259 Toggle between displaying current traffic rates (in packets and bytes per second)
260 and cumulative traffic (total packets and bytes since the tinc daemon started).
262 Sort the list of nodes by name.
264 Sort the list of nodes by incoming amount of bytes.
266 Sort the list of nodes by incoming amount of packets.
268 Sort the list of nodes by outgoing amount of bytes.
270 Sort the list of nodes by outgoing amount of packets.
272 Sort the list of nodes by sum of incoming and outgoing amount of bytes.
274 Sort the list of nodes by sum of incoming and outgoing amount of packets.
276 Show amount of traffic in bytes.
278 Show amount of traffic in kilobytes.
280 Show amount of traffic in megabytes.
282 Show amount of traffic in gigabytes.
287 If you find any bugs, report them to tinc@tinc-vpn.org.
292 .Xr pcap-savefile 5 ,
295 .Pa http://www.tinc-vpn.org/ ,
296 .Pa http://www.cabal.org/ .
298 The full documentation for tinc is maintained as a Texinfo manual.
299 If the info and tinc programs are properly installed at your site,
302 should give you access to the complete manual.
304 tinc comes with ABSOLUTELY NO WARRANTY.
305 This is free software, and you are welcome to redistribute it under certain conditions;
306 see the file COPYING for details.
309 .An "Guus Sliepen" Aq guus@tinc-vpn.org
311 And thanks to many others for their contributions to tinc!