Remove text saying you must have one of PrivateKey or PrivateKeyFile in tinc.conf.
[tinc] / doc / tincctl.8.in
1 .Dd 2012-10-14
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 .Bl -tag -width indent
49 .It init Op Ar name
50 Create initial configuration files and RSA and ECDSA keypairs with default length.
51 If no
52 .Ar name
53 for this node is given, it will be asked for.
54 .It config Oo get Oc Ar variable
55 Print the current value of configuration variable
56 .Ar variable .
57 If more than one variable with the same name exists,
58 the value of each of them will be printed on a separate line.
59 .It config Oo set Oc Ar variable Ar value
60 Set configuration variable
61 .Ar variable
62 to the given
63 .Ar value .
64 All previously existing configuration variables with the same name are removed.
65 To set a variable for a specific host, use the notation
66 .Ar host Ns Li . Ns Ar variable .
67 .It config add Ar variable Ar value
68 As above, but without removing any previously existing configuration variables.
69 .It config del Ar variable Op Ar value
70 Remove configuration variables with the same name and
71 .Ar value .
72 If no
73 .Ar value
74 is given, all configuration variables with the same name will be removed.
75 .It edit Ar filename
76 Start an editor for the given configuration file.
77 You do not need to specify the full path to the file.
78 .It export
79 Export the host configuration file of the local node to standard output.
80 .It export-all
81 Export all host configuration files to standard output.
82 .It import Op Fl -force
83 Import host configuration file(s) from standard input.
84 Already existing host configuration files are not overwritten unless the option
85 .Fl -force
86 is used.
87 .It start Op tincd options
88 Start
89 .Xr tincd 8 ,
90 optionally with the given extra options.
91 .It stop
92 Stop
93 .Xr tincd 8 .
94 .It restart
95 Restart
96 .Xr tincd 8 .
97 .It reload
98 Partially rereads configuration files. Connections to hosts whose host
99 config files are removed are closed. New outgoing connections specified
100 in
101 .Xr tinc.conf 5
102 will be made.
103 .It pid
104 Shows the PID of the currently running
105 .Xr tincd 8 .
106 .It generate-keys Op bits
107 Generate both RSA and ECDSA keypairs (see below) and exit.
108 .It generate-ecdsa-keys
109 Generate public/private ECDSA keypair and exit.
110 .It generate-rsa-keys Op bits
111 Generate public/private RSA keypair and exit.
112 If
113 .Ar bits
114 is omitted, the default length will be 2048 bits.
115 When saving keys to existing files, tinc will not delete the old keys;
116 you have to remove them manually.
117 .It dump nodes
118 Dump a list of all known nodes in the VPN.
119 .It dump edges
120 Dump a list of all known connections in the VPN.
121 .It dump subnets
122 Dump a list of all known subnets in the VPN.
123 .It dump connections
124 Dump a list of all meta connections with ourself.
125 .It dump graph | digraph
126 Dump a graph of the VPN in
127 .Xr dotty 1
128 format.
129 Nodes are colored according to their reachability:
130 red nodes are unreachable, orange nodes are indirectly reachable, green nodes are directly reachable.
131 Black nodes are either directly or indirectly reachable, but direct reachability has not been tried yet.
132 .It info Ar node | subnet | address
133 Show information about a particular node, subnet or address.
134 If an address is given, any matching subnet will be shown.
135 .It purge
136 Purges all information remembered about unreachable nodes.
137 .It debug Ar N
138 Sets debug level to
139 .Ar N .
140 .It log Op Ar N
141 Capture log messages from a running tinc daemon.
142 An optional debug level can be given that will be applied only for log messages sent to
143 .Nm tincctl .
144 .It retry
145 Forces
146 .Xr tincd 8
147 to try to connect to all uplinks immediately.
148 Usually
149 .Xr tincd 8
150 attempts to do this itself,
151 but increases the time it waits between the attempts each time it failed,
152 and if
153 .Xr tincd 8
154 didn't succeed to connect to an uplink the first time after it started,
155 it defaults to the maximum time of 15 minutes.
156 .It disconnect Ar NODE
157 Closes the meta connection with the given
158 .Ar NODE .
159 .It top
160 If
161 .Nm
162 is compiled with libcurses support, this will display live traffic statistics
163 for all the known nodes, similar to the UNIX
164 .Xr top 1
165 command.
166 See below for more information.
167 .It pcap
168 Dump VPN traffic going through the local tinc node in
169 .Xr pcap-savefile 5
170 format to standard output,
171 from where it can be redirected to a file or piped through a program that can parse it directly,
172 such as
173 .Xr tcpdump 8 .
174 .El
175 .Sh EXAMPLES
176 Examples of some commands:
177 .Bd -literal -offset indent
178 tincctl -n vpn dump graph | circo -Txlib
179 tincctl -n vpn pcap | tcpdump -r -
180 tincctl -n vpn top
181 .Pp
182 .Ed
183 Example of configuring tinc using
184 .Nm :
185 .Bd -literal -offset indent
186 tincctl -n vpn init foo
187 tincctl -n vpn config Subnet 192.168.1.0/24
188 tincctl -n vpn config bar.Address bar.example.com
189 tincctl -n vpn config ConnectTo bar
190 tincctl -n vpn export | gpg --clearsign | mail -s "My config" vpnmaster@example.com
191 .Ed
192 .Sh TOP
193 The top command connects to a running tinc daemon and repeatedly queries its per-node traffic counters.
194 It displays a list of all the known nodes in the left-most column,
195 and the amount of bytes and packets read from and sent to each node in the other columns.
196 By default, the information is updated every second.
197 The behaviour of the top command can be changed using the following keys:
198 .Bl -tag
199 .It Ic s
200 Change the interval between updates.
201 After pressing the
202 .Ic s
203 key, enter the desired interval in seconds, followed by enter.
204 Fractional seconds are honored.
205 Intervals lower than 0.1 seconds are not allowed.
206 .It Ic c
207 Toggle between displaying current traffic rates (in packets and bytes per second)
208 and cummulative traffic (total packets and bytes since the tinc daemon started).
209 .It Ic n
210 Sort the list of nodes by name.
211 .It Ic i
212 Sort the list of nodes by incoming amount of bytes.
213 .It Ic I
214 Sort the list of nodes by incoming amount of packets.
215 .It Ic o
216 Sort the list of nodes by outgoing amount of bytes.
217 .It Ic O
218 Sort the list of nodes by outgoing amount of packets.
219 .It Ic t
220 Sort the list of nodes by sum of incoming and outgoing amount of bytes.
221 .It Ic T
222 Sort the list of nodes by sum of incoming and outgoing amount of packets.
223 .It Ic b
224 Show amount of traffic in bytes.
225 .It Ic k
226 Show amount of traffic in kilobytes.
227 .It Ic M
228 Show amount of traffic in megabytes.
229 .It Ic G
230 Show amount of traffic in gigabytes.
231 .It Ic q
232 Quit.
233 .El
234 .Sh BUGS
235 If you find any bugs, report them to tinc@tinc-vpn.org.
236 .Sh SEE ALSO
237 .Xr tincd 8 ,
238 .Xr tinc.conf 5 ,
239 .Xr dotty 1 ,
240 .Xr pcap-savefile 5 ,
241 .Xr tcpdump 8 ,
242 .Xr top 1 ,
243 .Pa http://www.tinc-vpn.org/ ,
244 .Pa http://www.cabal.org/ .
245 .Pp
246 The full documentation for tinc is maintained as a Texinfo manual.
247 If the info and tinc programs are properly installed at your site,
248 the command
249 .Ic info tinc
250 should give you access to the complete manual.
251 .Pp
252 tinc comes with ABSOLUTELY NO WARRANTY.
253 This is free software, and you are welcome to redistribute it under certain conditions;
254 see the file COPYING for details.
255 .Sh AUTHORS
256 .An "Ivo Timmermans"
257 .An "Guus Sliepen" Aq guus@tinc-vpn.org
258 .Pp
259 And thanks to many others for their contributions to tinc!