Next: , Previous: , Up: Controlling tinc   [Contents][Index]


6.3 tinc commands

init [name]

Create initial configuration files and RSA and Ed25519 key pairs with default length. If no name for this node is given, it will be asked for.

get variable

Print the current value of configuration variable variable. If more than one variable with the same name exists, the value of each of them will be printed on a separate line.

set variable value

Set configuration variable variable to the given value. All previously existing configuration variables with the same name are removed. To set a variable for a specific host, use the notation host.variable.

add variable value

As above, but without removing any previously existing configuration variables. If the variable already exists with the given value, nothing happens.

del variable [value]

Remove configuration variables with the same name and value. If no value is given, all configuration variables with the same name will be removed.

edit filename

Start an editor for the given configuration file. You do not need to specify the full path to the file.

export

Export the host configuration file of the local node to standard output.

export-all

Export all host configuration files to standard output.

import

Import host configuration file(s) generated by the tinc export command from standard input. Already existing host configuration files are not overwritten unless the option –force is used.

exchange

The same as export followed by import.

exchange-all

The same as export-all followed by import.

invite name

Prepares an invitation for a new node with the given name, and prints a short invitation URL that can be used with the join command.

join [URL]

Join an existing VPN using an invitation URL created using the invite command. If no URL is given, it will be read from standard input.

start [tincd options]

Start tincd, optionally with the given extra options.

stop

Stop tincd.

restart [tincd options]

Restart tincd, optionally with the given extra options.

reload

Partially rereads configuration files. Connections to hosts whose host config files are removed are closed. New outgoing connections specified in tinc.conf will be made.

pid

Shows the PID of the currently running tincd.

generate-keys [bits]

Generate both RSA and Ed25519 key pairs (see below) and exit. tinc will ask where you want to store the files, but will default to the configuration directory (you can use the -c or -n option).

generate-ed25519-keys

Generate public/private Ed25519 key pair and exit.

generate-rsa-keys [bits]

Generate public/private RSA key pair and exit. If bits is omitted, the default length will be 2048 bits. When saving keys to existing files, tinc will not delete the old keys; you have to remove them manually.

dump [reachable] nodes

Dump a list of all known nodes in the VPN. If the reachable keyword is used, only lists reachable nodes.

dump edges

Dump a list of all known connections in the VPN.

dump subnets

Dump a list of all known subnets in the VPN.

dump connections

Dump a list of all meta connections with ourself.

dump graph | digraph

Dump a graph of the VPN in dotty format. Nodes are colored according to their reachability: red nodes are unreachable, orange nodes are indirectly reachable, green nodes are directly reachable. Black nodes are either directly or indirectly reachable, but direct reachability has not been tried yet.

dump invitations

Dump a list of outstanding invitations. The filename of the invitation, as well as the name of the node that is being invited is shown for each invitation.

info node | subnet | address

Show information about a particular node, subnet or address. If an address is given, any matching subnet will be shown.

purge

Purges all information remembered about unreachable nodes.

debug level

Sets debug level to level.

log [level]

Capture log messages from a running tinc daemon. An optional debug level can be given that will be applied only for log messages sent to tinc.

retry

Forces tinc to try to connect to all uplinks immediately. Usually tinc attempts to do this itself, but increases the time it waits between the attempts each time it failed, and if tinc didn’t succeed to connect to an uplink the first time after it started, it defaults to the maximum time of 15 minutes.

disconnect node

Closes the meta connection with the given node.

top

If tinc is compiled with libcurses support, this will display live traffic statistics for all the known nodes, similar to the UNIX top command. See below for more information.

pcap

Dump VPN traffic going through the local tinc node in pcap-savefile format to standard output, from where it can be redirected to a file or piped through a program that can parse it directly, such as tcpdump.

network [netname]

If netname is given, switch to that network. Otherwise, display a list of all networks for which configuration files exist.

fsck

This will check the configuration files for possible problems, such as unsafe file permissions, missing executable bit on script, unknown and obsolete configuration variables, wrong public and/or private keys, and so on.

When problems are found, this will be printed on a line with WARNING or ERROR in front of it. Most problems must be corrected by the user itself, however in some cases (like file permissions and missing public keys), tinc will ask if it should fix the problem.

sign [filename]

Sign a file with the local node’s private key. If no filename is given, the file is read from standard input. The signed file is written to standard output.

verify name [filename]

Check the signature of a file against a node’s public key. The name of the node must be given, or can be ‘.’ to check against the local node’s public key, or ‘*’ to allow a signature from any node whose public key is known. If no filename is given, the file is read from standard input. If the verification is successful, a copy of the input with the signature removed is written to standard output, and the exit code will be zero. If the verification failed, nothing will be written to standard output, and the exit code will be non-zero.


Next: , Previous: , Up: Controlling tinc   [Contents][Index]