3 .\" Author: [see the "AUTHORS" section]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
6 .\" Manual: uanytun user manual
7 .\" Source: uanytun 0.3.2
10 .TH "UANYTUN" "8" "12/14/2009" "uanytun 0.3.2" "uanytun user manual"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
16 .\" disable justification (adjust text to left margin only)
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
22 uanytun \- micro anycast tunneling daemon
27 [ \fB\-h|\-\-help\fR ]
28 [ \fB\-D|\-\-nodaemonize\fR ]
29 [ \fB\-u|\-\-username\fR <username> ]
30 [ \fB\-g|\-\-groupname\fR <groupname> ]
31 [ \fB\-C|\-\-chroot\fR <path> ]
32 [ \fB\-P|\-\-write\-pid\fR <filename> ]
33 [ \fB\-L|\-\-log\fR <target>:<level>[,<param1>[,<param2>[\&.\&.]]] ]
34 [ \fB\-i|\-\-interface\fR <ip\-address> ]
35 [ \fB\-p|\-\-port\fR <port> ]
36 [ \fB\-r|\-\-remote\-host\fR <hostname|ip> ]
37 [ \fB\-o|\-\-remote\-port\fR <port> ]
38 [ \fB\-4|\-\-ipv4\-only\fR ]
39 [ \fB\-6|\-\-ipv6\-only\fR ]
40 [ \fB\-d|\-\-dev\fR <name> ]
41 [ \fB\-t|\-\-type\fR <tun|tap> ]
42 [ \fB\-n|\-\-ifconfig\fR <local>/<prefix> ]
43 [ \fB\-x|\-\-post\-up\-script\fR <script> ]
44 [ \fB\-m|\-\-mux\fR <mux\-id> ]
45 [ \fB\-s|\-\-sender\-id\fR <sender id> ]
46 [ \fB\-w|\-\-window\-size\fR <window size> ]
47 [ \fB\-k|\-\-kd\-prf\fR <kd\-prf type> ]
48 [ \fB\-e|\-\-role\fR <role> ]
49 [ \fB\-E|\-\-passphrase\fR <pass phrase> ]
50 [ \fB\-K|\-\-key\fR <master key> ]
51 [ \fB\-A|\-\-salt\fR <master salt> ]
52 [ \fB\-c|\-\-cipher\fR <cipher type> ]
53 [ \fB\-a|\-\-auth\-algo\fR <algo type> ]
54 [ \fB\-b|\-\-auth\-tag\-length\fR <length> ]
58 \fBuAnytun\fR is a tiny implementation of the Secure Anycast Tunneling Protocol (SATP)\&. It provides a complete VPN solution similar to OpenVPN or IPsec in tunnel mode\&. The main difference is that anycast enables the setup of tunnels between an arbitrary combination of anycast, unicast and multicast hosts\&. Unlike Anytun which is a full featured implementation uAnytun has no support for multiple connections or synchronisation\&. It is a small single threaded implementation intended to act as a client on small platforms\&.
61 \fBuAnytun\fR has been designed as a peer to peer application, so there is no difference between client and server\&. The following options can be passed to the daemon:
63 \fB\-D, \-\-nodaemonize\fR
67 to run in foreground instead of becoming a daemon which is the default\&.
70 \fB\-u, \-\-username <username>\fR
72 run as this user\&. If no group is specified (\fB\-g\fR) the default group of the user is used\&. The default is to not drop privileges\&.
75 \fB\-g, \-\-groupname <groupname>\fR
77 run as this group\&. If no username is specified (\fB\-u\fR) this gets ignored\&. The default is to not drop privileges\&.
80 \fB\-C, \-\-chroot <path>\fR
84 to run in a chroot jail\&. The default is to not run in chroot\&.
87 \fB\-P, \-\-write\-pid <filename>\fR
91 to write it\(cqs pid to this file\&. The default is to not create a pid file\&.
94 \fB\-L, \-\-log <target>:<level>[,<param1>[,<param2>[\&.\&.]]]\fR
96 add log target to logging system\&. This can be invoked several times in order to log to different targets at the same time\&. Every target hast its own log level which is a number between 0 and 5\&. Where 0 means disabling log and 5 means debug messages are enabled\&.
98 The file target can be used more the once with different levels\&. If no target is provided at the command line a single target with the config
99 \fBsyslog:3,uanytun,daemon\fR
102 The following targets are supported:
106 log to syslog daemon, parameters <level>[,<logname>[,<facility>]]
111 log to file, parameters <level>[,<path>]
116 log to standard output, parameters <level>
121 log to standard error, parameters <level>
125 \fB\-i, \-\-interface <ip address>\fR
127 This IP address is used as the sender address for outgoing packets\&. The default is to not use a special inteface and just bind on all interfaces\&.
130 \fB\-p, \-\-port <port>\fR
132 The local UDP port that is used to send and receive the payload data\&. The two tunnel endpoints can use different ports\&. default: 4444
135 \fB\-r, \-\-remote\-host <hostname|ip>\fR
137 This option can be used to specify the remote tunnel endpoint\&. In case of anycast tunnel endpoints, the anycast IP address has to be used\&. If you do not specify an address, it is automatically determined after receiving the first data packet\&.
140 \fB\-o, \-\-remote\-port <port>\fR
142 The UDP port used for payload data by the remote host (specified with \-p on the remote host)\&. If you do not specify a port, it is automatically determined after receiving the first data packet\&.
145 \fB\-4, \-\-ipv4\-only\fR
147 Resolv to IPv4 addresses only\&. The default is to resolv both IPv4 and IPv6 addresses\&.
150 \fB\-6, \-\-ipv6\-only\fR
152 Resolv to IPv6 addresses only\&. The default is to resolv both IPv4 and IPv6 addresses\&.
155 \fB\-d, \-\-dev <name>\fR
159 By default, tapN is used for Ethernet tunnel interfaces, and tunN for IP tunnels, respectively\&. This option can be used to manually override these defaults\&.
162 \fB\-t, \-\-type <tun|tap>\fR
166 Type of the tunnels to create\&. Use tap for Ethernet tunnels, tun for IP tunnels\&.
169 \fB\-n, \-\-ifconfig <local>/<prefix>\fR
171 The local IP address and prefix length\&. The remote tunnel endpoint has to use a different IP address in the same subnet\&.
175 the local IP address for the tun/tap device
180 the prefix length of the network
184 \fB\-x, \-\-post\-up\-script <script>\fR
186 This option instructs
188 to run this script after the interface is created\&. By default no script will be executed\&.
191 \fB\-m, \-\-mux <mux\-id>\fR
193 the multiplex id to use\&. default: 0
196 \fB\-s, \-\-sender\-id <sender id>\fR
198 Each anycast tunnel endpoint needs a unique sender id (1, 2, 3, \&...)\&. It is needed to distinguish the senders in case of replay attacks\&. As
200 does not support synchronisation it can\(cqt be used as an anycast endpoint therefore this option is quite useless but implemented for compability reasons\&. default: 0
203 \fB\-w, \-\-window\-size <window size>\fR
207 Sometimes, packets arrive out of order on the receiver side\&. This option defines the size of a list of received packets\' sequence numbers\&. If, according to this list, a received packet has been previously received or has been transmitted in the past, and is therefore not in the list anymore, this is interpreted as a replay attack and the packet is dropped\&. A value of 0 deactivates this list and, as a consequence, the replay protection employed by filtering packets according to their secuence number\&. By default the sequence window is disabled and therefore a window size of 0 is used\&.
210 \fB\-k, \-\-kd\(emprf <kd\-prf type>\fR
212 key derivation pseudo random function
214 The pseudo random function which is used for calculating the session keys and session salt\&.
220 no random function, keys and salt are set to 0\&.\&.00
225 AES in counter mode with 128 Bits, default value
230 AES in counter mode with 128 Bits
235 AES in counter mode with 192 Bits
240 AES in counter mode with 256 Bits
244 \fB\-e, \-\-role <role>\fR
246 SATP uses different session keys for inbound and outbound traffic\&. The role parameter is used to determine which keys to use for outbound or inbound packets\&. On both sides of a vpn connection different roles have to be used\&. Possible values are
249 \fBright\fR\&. You may also use
260 \fBright\fR\&. By default
265 \fB\-E, \-\-passphrase <pass phrase>\fR
267 This passphrase is used to generate the master key and master salt\&. For the master key the last n bits of the SHA256 digest of the passphrase (where n is the length of the master key in bits) is used\&. The master salt gets generated with the SHA1 digest\&. You may force a specific key and or salt by using
273 \fB\-K, \-\-key <master key>\fR
275 master key to use for key derivation
277 Master key in hexadecimal notation, e\&.g\&. 01a2b3c4d5e6f708a9b0cadbecfd0fa1, with a mandatory length of 32, 48 or 64 characters (128, 192 or 256 bits)\&.
280 \fB\-A, \-\-salt <master salt>\fR
282 master salt to use for key derivation
284 Master salt in hexadecimal notation, e\&.g\&. 01a2b3c4d5e6f708a9b0cadbecfd, with a mandatory length of 28 characters (14 bytes)\&.
287 \fB\-c, \-\-cipher <cipher type>\fR
289 payload encryption algorithm
291 Encryption algorithm used for encrypting the payload
302 AES in counter mode with 128 Bits, default value
307 AES in counter mode with 128 Bits
312 AES in counter mode with 192 Bits
317 AES in counter mode with 256 Bits
321 \fB\-a, \-\-auth\-algo <algo type>\fR
323 message authentication algorithm
325 This option sets the message authentication algorithm\&.
327 If HMAC\-SHA1 is used, the packet length is increased\&. The additional bytes contain the authentication data\&. see
328 \fB\-\-auth\-tag\-length\fR
335 no message authentication
340 HMAC\-SHA1, default value
344 \fB\-b, \-\-auth\-tag\-length <length>\fR
346 The number of bytes to use for the auth tag\&. This value defaults to 10 bytes unless the
348 auth algo is used in which case it defaults to 0\&.
351 .SS "P2P Setup between two unicast enpoints:"
354 .nr an-no-space-flag 1
361 uanytun \-r hostb\&.example\&.com \-t tun \-n 192\&.168\&.123\&.1/30 \-c aes\-ctr\-256 \-k aes\-ctr\-256 \e \-E have_a_very_safe_and_productive_day \-e left
365 .nr an-no-space-flag 1
372 uanytun \-r hosta\&.example\&.com \-t tun \-n 192\&.168\&.123\&.2/30 \-c aes\-ctr\-256 \-k aes\-ctr\-256 \e \-E have_a_very_safe_and_productive_day \-e right
374 .SS "One unicast and one anycast tunnel endpoint:"
377 .nr an-no-space-flag 1
381 \fBUnicast tunnel endpoint:\fR
384 uanytun \-r anycast\&.anytun\&.org \-d anytun0 \-t tun \-n 192\&.0\&.2\&.2/30 \-a null \-c null \-w 0 \-e client
388 .nr an-no-space-flag 1
392 \fBAnycast tunnel endpoints:\fR
395 As \fBuAnytun\fR can\(cqt work as an anycast endpoint it can\(cqt be used for this purpose\&. You have to use \fBAnytun\fR for that job\&.
399 Most likely there are some bugs in \fBuAnytun\fR\&. If you find a bug, please let the developers know at uanytun@anytun\&.org\&. Of course, patches are preferred\&.
402 Christian Pointner <equinox@anytun\&.org>
405 Main web site: http://www\&.anytun\&.org/
408 Copyright (C) 2008\-2009 Christian Pointner\&. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version\&.