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