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