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.
176 Dump a list of outstanding invitations.
177 The filename of the invitation, as well as the name of the node that is being invited is shown for each invitation.
178 .It info Ar node | subnet | address
179 Show information about a particular node, subnet or address.
180 If an address is given, any matching subnet will be shown.
182 Purges all information remembered about unreachable nodes.
187 Capture log messages from a running tinc daemon.
188 An optional debug level can be given that will be applied only for log messages sent to
193 to try to connect to all uplinks immediately.
196 attempts to do this itself,
197 but increases the time it waits between the attempts each time it failed,
200 didn't succeed to connect to an uplink the first time after it started,
201 it defaults to the maximum time of 15 minutes.
202 .It disconnect Ar NODE
203 Closes the meta connection with the given
208 is compiled with libcurses support, this will display live traffic statistics
209 for all the known nodes, similar to the UNIX
212 See below for more information.
214 Dump VPN traffic going through the local tinc node in
216 format to standard output,
217 from where it can be redirected to a file or piped through a program that can parse it directly,
220 .It network Op Ar netname
223 is given, switch to that network.
224 Otherwise, display a list of all networks for which configuration files exist.
226 This will check the configuration files for possible problems,
227 such as unsafe file permissions, missing executable bit on script,
228 unknown and obsolete configuration variables, wrong public and/or private keys, and so on.
230 When problems are found, this will be printed on a line with WARNING or ERROR in front of it.
231 Most problems must be corrected by the user itself, however in some cases (like file permissions and missing public keys),
232 tinc will ask if it should fix the problem.
235 Examples of some commands:
236 .Bd -literal -offset indent
237 tinc -n vpn dump graph | circo -Txlib
238 tinc -n vpn pcap | tcpdump -r -
242 Examples of changing the configuration using
244 .Bd -literal -offset indent
246 tinc -n vpn add Subnet 192.168.1.0/24
247 tinc -n vpn add bar.Address bar.example.com
248 tinc -n vpn add ConnectTo bar
249 tinc -n vpn export | gpg --clearsign | mail -s "My config" vpnmaster@example.com
252 The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
253 It displays a list of all the known nodes in the left-most column,
254 and the amount of bytes and packets read from and sent to each node in the other columns.
255 By default, the information is updated every second.
256 The behaviour of the top command can be changed using the following keys:
259 Change the interval between updates.
262 key, enter the desired interval in seconds, followed by enter.
263 Fractional seconds are honored.
264 Intervals lower than 0.1 seconds are not allowed.
266 Toggle between displaying current traffic rates (in packets and bytes per second)
267 and cumulative traffic (total packets and bytes since the tinc daemon started).
269 Sort the list of nodes by name.
271 Sort the list of nodes by incoming amount of bytes.
273 Sort the list of nodes by incoming amount of packets.
275 Sort the list of nodes by outgoing amount of bytes.
277 Sort the list of nodes by outgoing amount of packets.
279 Sort the list of nodes by sum of incoming and outgoing amount of bytes.
281 Sort the list of nodes by sum of incoming and outgoing amount of packets.
283 Show amount of traffic in bytes.
285 Show amount of traffic in kilobytes.
287 Show amount of traffic in megabytes.
289 Show amount of traffic in gigabytes.
294 If you find any bugs, report them to tinc@tinc-vpn.org.
299 .Xr pcap-savefile 5 ,
302 .Pa http://www.tinc-vpn.org/ ,
303 .Pa http://www.cabal.org/ .
305 The full documentation for tinc is maintained as a Texinfo manual.
306 If the info and tinc programs are properly installed at your site,
309 should give you access to the complete manual.
311 tinc comes with ABSOLUTELY NO WARRANTY.
312 This is free software, and you are welcome to redistribute it under certain conditions;
313 see the file COPYING for details.
316 .An "Guus Sliepen" Aq guus@tinc-vpn.org
318 And thanks to many others for their contributions to tinc!