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