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 If the variable already exists with the given value, nothing happens.
92 .It del Ar variable Op Ar value
93 Remove configuration variables with the same name and
97 is given, all configuration variables with the same name will be removed.
99 Start an editor for the given configuration file.
100 You do not need to specify the full path to the file.
102 Export the host configuration file of the local node to standard output.
104 Export all host configuration files to standard output.
105 .It import Op Fl -force
106 Import host configuration data generated by the
108 export command from standard input.
109 Already existing host configuration files are not overwritten unless the option
112 .It exchange Op Fl -force
113 The same as export followed by import.
114 .It exchange-all Op Fl -force
115 The same as export-all followed by import.
117 Prepares an invitation for a new node with the given
119 and prints a short invitation URL that can be used with the join command.
121 Join an existing VPN using an invitation URL created using the invite command.
124 is given, it will be read from standard input.
125 .It start Op tincd options
128 optionally with the given extra options.
132 .It restart Op tincd options
135 optionally with the given extra options.
137 Partially rereads configuration files. Connections to hosts whose host
138 config files are removed are closed. New outgoing connections specified
143 Shows the PID of the currently running
145 .It generate-keys Op bits
146 Generate both RSA and Ed25519 keypairs (see below) and exit.
147 .It generate-ed25519-keys
148 Generate public/private Ed25519 keypair and exit.
149 .It generate-rsa-keys Op bits
150 Generate public/private RSA keypair and exit.
153 is omitted, the default length will be 2048 bits.
154 When saving keys to existing files, tinc will not delete the old keys;
155 you have to remove them manually.
156 .It dump [reachable] nodes
157 Dump a list of all known nodes in the VPN.
158 If the keyword reachable is used, only lists reachable nodes.
160 Dump a list of all known connections in the VPN.
162 Dump a list of all known subnets in the VPN.
164 Dump a list of all meta connections with ourself.
165 .It dump graph | digraph
166 Dump a graph of the VPN in
169 Nodes are colored according to their reachability:
170 red nodes are unreachable, orange nodes are indirectly reachable, green nodes are directly reachable.
171 Black nodes are either directly or indirectly reachable, but direct reachability has not been tried yet.
172 .It info Ar node | subnet | address
173 Show information about a particular node, subnet or address.
174 If an address is given, any matching subnet will be shown.
176 Purges all information remembered about unreachable nodes.
181 Capture log messages from a running tinc daemon.
182 An optional debug level can be given that will be applied only for log messages sent to
187 to try to connect to all uplinks immediately.
190 attempts to do this itself,
191 but increases the time it waits between the attempts each time it failed,
194 didn't succeed to connect to an uplink the first time after it started,
195 it defaults to the maximum time of 15 minutes.
196 .It disconnect Ar NODE
197 Closes the meta connection with the given
202 is compiled with libcurses support, this will display live traffic statistics
203 for all the known nodes, similar to the UNIX
206 See below for more information.
208 Dump VPN traffic going through the local tinc node in
210 format to standard output,
211 from where it can be redirected to a file or piped through a program that can parse it directly,
214 .It network Op Ar netname
217 is given, switch to that network.
218 Otherwise, display a list of all networks for which configuration files exist.
220 This will check the configuration files for possible problems,
221 such as unsafe file permissions, missing executable bit on script,
222 unknown and obsolete configuration variables, wrong public and/or private keys, and so on.
224 When problems are found, this will be printed on a line with WARNING or ERROR in front of it.
225 Most problems must be corrected by the user itself, however in some cases (like file permissions and missing public keys),
226 tinc will ask if it should fix the problem.
229 Examples of some commands:
230 .Bd -literal -offset indent
231 tinc -n vpn dump graph | circo -Txlib
232 tinc -n vpn pcap | tcpdump -r -
236 Examples of changing the configuration using
238 .Bd -literal -offset indent
240 tinc -n vpn add Subnet 192.168.1.0/24
241 tinc -n vpn add bar.Address bar.example.com
242 tinc -n vpn add ConnectTo bar
243 tinc -n vpn export | gpg --clearsign | mail -s "My config" vpnmaster@example.com
246 The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
247 It displays a list of all the known nodes in the left-most column,
248 and the amount of bytes and packets read from and sent to each node in the other columns.
249 By default, the information is updated every second.
250 The behaviour of the top command can be changed using the following keys:
253 Change the interval between updates.
256 key, enter the desired interval in seconds, followed by enter.
257 Fractional seconds are honored.
258 Intervals lower than 0.1 seconds are not allowed.
260 Toggle between displaying current traffic rates (in packets and bytes per second)
261 and cumulative traffic (total packets and bytes since the tinc daemon started).
263 Sort the list of nodes by name.
265 Sort the list of nodes by incoming amount of bytes.
267 Sort the list of nodes by incoming amount of packets.
269 Sort the list of nodes by outgoing amount of bytes.
271 Sort the list of nodes by outgoing amount of packets.
273 Sort the list of nodes by sum of incoming and outgoing amount of bytes.
275 Sort the list of nodes by sum of incoming and outgoing amount of packets.
277 Show amount of traffic in bytes.
279 Show amount of traffic in kilobytes.
281 Show amount of traffic in megabytes.
283 Show amount of traffic in gigabytes.
288 If you find any bugs, report them to tinc@tinc-vpn.org.
293 .Xr pcap-savefile 5 ,
296 .Pa http://www.tinc-vpn.org/ ,
297 .Pa http://www.cabal.org/ .
299 The full documentation for tinc is maintained as a Texinfo manual.
300 If the info and tinc programs are properly installed at your site,
303 should give you access to the complete manual.
305 tinc comes with ABSOLUTELY NO WARRANTY.
306 This is free software, and you are welcome to redistribute it under certain conditions;
307 see the file COPYING for details.
310 .An "Guus Sliepen" Aq guus@tinc-vpn.org
312 And thanks to many others for their contributions to tinc!