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 ECDSA 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 ECDSA keypairs (see below) and exit.
146 .It generate-ecdsa-keys
147 Generate public/private ECDSA 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,
215 Examples of some commands:
216 .Bd -literal -offset indent
217 tinc -n vpn dump graph | circo -Txlib
218 tinc -n vpn pcap | tcpdump -r -
222 Examples of changing the configuration using
224 .Bd -literal -offset indent
226 tinc -n vpn add Subnet 192.168.1.0/24
227 tinc -n vpn add bar.Address bar.example.com
228 tinc -n vpn add ConnectTo bar
229 tinc -n vpn export | gpg --clearsign | mail -s "My config" vpnmaster@example.com
232 The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
233 It displays a list of all the known nodes in the left-most column,
234 and the amount of bytes and packets read from and sent to each node in the other columns.
235 By default, the information is updated every second.
236 The behaviour of the top command can be changed using the following keys:
239 Change the interval between updates.
242 key, enter the desired interval in seconds, followed by enter.
243 Fractional seconds are honored.
244 Intervals lower than 0.1 seconds are not allowed.
246 Toggle between displaying current traffic rates (in packets and bytes per second)
247 and cumulative traffic (total packets and bytes since the tinc daemon started).
249 Sort the list of nodes by name.
251 Sort the list of nodes by incoming amount of bytes.
253 Sort the list of nodes by incoming amount of packets.
255 Sort the list of nodes by outgoing amount of bytes.
257 Sort the list of nodes by outgoing amount of packets.
259 Sort the list of nodes by sum of incoming and outgoing amount of bytes.
261 Sort the list of nodes by sum of incoming and outgoing amount of packets.
263 Show amount of traffic in bytes.
265 Show amount of traffic in kilobytes.
267 Show amount of traffic in megabytes.
269 Show amount of traffic in gigabytes.
274 If you find any bugs, report them to tinc@tinc-vpn.org.
279 .Xr pcap-savefile 5 ,
282 .Pa http://www.tinc-vpn.org/ ,
283 .Pa http://www.cabal.org/ .
285 The full documentation for tinc is maintained as a Texinfo manual.
286 If the info and tinc programs are properly installed at your site,
289 should give you access to the complete manual.
291 tinc comes with ABSOLUTELY NO WARRANTY.
292 This is free software, and you are welcome to redistribute it under certain conditions;
293 see the file COPYING for details.
296 .An "Guus Sliepen" Aq guus@tinc-vpn.org
298 And thanks to many others for their contributions to tinc!