"tincctl init" creates initial directory structure, tinc.conf and keypairs.
[tinc] / doc / tincctl.8.in
1 .Dd 2011-06-25
2 .Dt TINCCTL 8
3 .\" Manual page created by:
4 .\" Scott Lamb
5 .Sh NAME
6 .Nm tincctl
7 .Nd tinc VPN control
8 .Sh SYNOPSIS
9 .Nm
10 .Op Fl cn
11 .Op Fl -config Ns = Ns Ar DIR
12 .Op Fl -net Ns = Ns Ar NETNAME
13 .Op Fl -pidfile Ns = Ns Ar FILENAME
14 .Op Fl -help
15 .Op Fl -version
16 .Ar COMMAND
17 .Sh DESCRIPTION
18 This is the control program of tinc, a secure virtual private network (VPN)
19 project.
20 .Nm
21 communicates with
22 .Xr tincd 8
23 to alter and inspect the running VPN's state.
24 .Sh OPTIONS
25 .Bl -tag -width indent
26 .It Fl n, -net Ns = Ns Ar NETNAME
27 Communicate with tincd(8) connected with
28 .Ar NETNAME .
29 .It Fl -pidfile Ns = Ns Ar FILENAME
30 Use the cookie from
31 .Ar FILENAME
32 to authenticate with a running tinc daemon.
33 If unspecified, the default is
34 .Pa @localstatedir@/run/tinc. Ns Ar NETNAME Ns Pa .pid.
35 .It Fl -help
36 Display short list of options.
37 .It Fl -version
38 Output version information and exit.
39 .El
40 .Sh ENVIRONMENT VARIABLES
41 .Bl -tag -width indent
42 .It Ev NETNAME
43 If no netname is specified on the command line with the
44 .Fl n
45 option, the value of this environment variable is used.
46 .El
47 .Sh COMMANDS
48 .zZ
49 .Bl -tag -width indent
50 .It init Op Ar name
51 Create initial configuration files and RSA and ECDSA keypairs with default length.
52 If no
53 .Ar name
54 for this node is given, it will be asked for.
55 .It start
56 Start
57 .Xr tincd 8 .
58 .It stop
59 Stop
60 .Xr tincd 8 .
61 .It restart
62 Restart
63 .Xr tincd 8 .
64 .It reload
65 Partially rereads configuration files. Connections to hosts whose host
66 config files are removed are closed. New outgoing connections specified
67 in
68 .Xr tinc.conf 5
69 will be made.
70 .It pid
71 Shows the PID of the currently running
72 .Xr tincd 8 .
73 .It generate-keys Op bits
74 Generate both RSA and ECDSA keypairs (see below) and exit.
75 .It generate-ecdsa-keys
76 Generate public/private ECDSA keypair and exit.
77 .It generate-rsa-keys Op bits
78 Generate public/private RSA keypair and exit.
79 If
80 .Ar bits
81 is omitted, the default length will be 2048 bits.
82 When saving keys to existing files, tinc will not delete the old keys;
83 you have to remove them manually.
84 .It dump nodes
85 Dump a list of all known nodes in the VPN.
86 .It dump edges
87 Dump a list of all known connections in the VPN.
88 .It dump subnets
89 Dump a list of all known subnets in the VPN.
90 .It dump connections
91 Dump a list of all meta connections with ourself.
92 .It dump graph
93 Dump a graph of the VPN in
94 .Xr dotty 1
95 format.
96 .It purge
97 Purges all information remembered about unreachable nodes.
98 .It debug Ar N
99 Sets debug level to
100 .Ar N .
101 .It log Op Ar N
102 Capture log messages from a running tinc daemon.
103 An optional debug level can be given that will be applied only for log messages sent to
104 .Nm tincctl .
105 .It retry
106 Forces
107 .Xr tincd 8
108 to try to connect to all uplinks immediately.
109 Usually
110 .Xr tincd 8
111 attempts to do this itself,
112 but increases the time it waits between the attempts each time it failed,
113 and if
114 .Xr tincd 8
115 didn't succeed to connect to an uplink the first time after it started,
116 it defaults to the maximum time of 15 minutes.
117 .It disconnect Ar NODE
118 Closes the meta connection with the given
119 .Ar NODE .
120 .It top
121 If
122 .Nm
123 is compiled with libcurses support, this will display live traffic statistics
124 for all the known nodes, similar to the UNIX
125 .Xr top 1
126 command.
127 See below for more information.
128 .It pcap
129 Dump VPN traffic going through the local tinc node in
130 .Xr pcap-savefile 5
131 format to standard output,
132 from where it can be redirected to a file or piped through a program that can parse it directly,
133 such as
134 .Xr tcpdump 8 .
135 .El
136 .Sh EXAMPLES
137 Examples of some commands:
138 .Bd -literal -offset indent
139 tincctl -n vpn dump graph | circo -Txlib
140 tincctl -n vpn pcap | tcpdump -r -
141 tincctl -n vpn top
142 .Ed
143 .Sh TOP
144 The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
145 It displays a list of all the known nodes in the left-most column,
146 and the amount of bytes and packets read from and sent to each node in the other columns.
147 By default, the information is updated every second.
148 The behaviour of the top command can be changed using the following keys:
149 .Bl -tag
150 .It Ic s
151 Change the interval between updates.
152 After pressing the
153 .Ic s
154 key, enter the desired interval in seconds, followed by enter.
155 Fractional seconds are honored.
156 Intervals lower than 0.1 seconds are not allowed.
157 .It Ic c
158 Toggle between displaying current traffic rates (in packets and bytes per second)
159 and cummulative traffic (total packets and bytes since the tinc daemon started).
160 .It Ic n
161 Sort the list of nodes by name.
162 .It Ic i
163 Sort the list of nodes by incoming amount of bytes.
164 .It Ic I
165 Sort the list of nodes by incoming amount of packets.
166 .It Ic o
167 Sort the list of nodes by outgoing amount of bytes.
168 .It Ic O
169 Sort the list of nodes by outgoing amount of packets.
170 .It Ic t
171 Sort the list of nodes by sum of incoming and outgoing amount of bytes.
172 .It Ic T
173 Sort the list of nodes by sum of incoming and outgoing amount of packets.
174 .It Ic b
175 Show amount of traffic in bytes.
176 .It Ic k
177 Show amount of traffic in kilobytes.
178 .It Ic M
179 Show amount of traffic in megabytes.
180 .It Ic G
181 Show amount of traffic in gigabytes.
182 .It Ic q
183 Quit.
184 .El
185 .Sh BUGS
186 If you find any bugs, report them to tinc@tinc-vpn.org.
187 .Sh SEE ALSO
188 .Xr tincd 8 ,
189 .Xr tinc.conf 5 ,
190 .Xr dotty 1 ,
191 .Xr pcap-savefile 7 ,
192 .Xr tcpdump 8 ,
193 .Xr top 1 ,
194 .Pa http://www.tinc-vpn.org/ ,
195 .Pa http://www.cabal.org/ .
196 .Pp
197 The full documentation for tinc is maintained as a Texinfo manual.
198 If the info and tinc programs are properly installed at your site,
199 the command
200 .Ic info tinc
201 should give you access to the complete manual.
202 .Pp
203 tinc comes with ABSOLUTELY NO WARRANTY.
204 This is free software, and you are welcome to redistribute it under certain conditions;
205 see the file COPYING for details.
206 .Sh AUTHORS
207 .An "Ivo Timmermans"
208 .An "Guus Sliepen" Aq guus@tinc-vpn.org
209 .Pp
210 And thanks to many others for their contributions to tinc!