7 uanytun - micro anycast tunneling daemon
17 [ -u|--username <username> ]
18 [ -g|--groupname <groupname> ]
19 [ -C|--chroot <path> ]
20 [ -P|--write-pid <filename> ]
21 [ -L|--log <target>:<level>[,<param1>[,<param2>[..]]] ]
22 [ -i|--interface <ip-address> ]
24 [ -r|--remote-host <hostname|ip> ]
25 [ -o|--remote-port <port> ]
29 [ -t|--type <tun|tap> ]
30 [ -n|--ifconfig <local>/<prefix> ]
31 [ -x|--post-up-script <script> ]
33 [ -s|--sender-id <sender id> ]
34 [ -w|--window-size <window size> ]
35 [ -k|--kd-prf <kd-prf type> ]
37 [ -E|--passphrase <pass phrase> ]
38 [ -K|--key <master key> ]
39 [ -A|--salt <master salt> ]
40 [ -c|--cipher <cipher type> ]
41 [ -a|--auth-algo <algo type> ]
42 [ -b|--auth-tag-length <length> ]
49 *uAnytun* is a tiny implementation of the Secure Anycast Tunneling Protocol
50 (SATP). It provides a complete VPN solution similar to OpenVPN or
51 IPsec in tunnel mode. The main difference is that anycast enables the
52 setup of tunnels between an arbitrary combination of anycast, unicast
53 and multicast hosts. Unlike Anytun which is a full featured implementation
54 uAnytun has no support for multiple connections or synchronisation. It is a
55 small single threaded implementation intended to act as a client on small
62 *uAnytun* has been designed as a peer to peer application, so there is
63 no difference between client and server. The following options can be
67 This option instructs *uAnytun* to run in foreground
68 instead of becoming a daemon which is the default.
70 *-u, --username <username>*::
71 run as this user. If no group is specified (*-g*) the default group of
72 the user is used. The default is to not drop privileges.
74 *-g, --groupname <groupname>*::
75 run as this group. If no username is specified (*-u*) this gets ignored.
76 The default is to not drop privileges.
78 *-C, --chroot <path>*::
79 Instruct *uAnytun* to run in a chroot jail. The default is
82 *-P, --write-pid <filename>*::
83 Instruct *uAnytun* to write it's pid to this file. The default is
84 to not create a pid file.
86 *-L, --log <target>:<level>[,<param1>[,<param2>[..]]]*::
87 add log target to logging system. This can be invoked several times
88 in order to log to different targets at the same time. Every target
89 hast its own log level which is a number between 0 and 5. Where 0 means
90 disabling log and 5 means debug messages are enabled. +
91 The file target can be used more the once with different levels.
92 If no target is provided at the command line a single target with the
93 config *syslog:3,uanytun,daemon* is added. +
94 The following targets are supported:
96 *syslog*;; log to syslog daemon, parameters <level>[,<logname>[,<facility>]]
97 *file*;; log to file, parameters <level>[,<path>]
98 *stdout*;; log to standard output, parameters <level>
99 *stderr*;; log to standard error, parameters <level>
101 *-i, --interface <ip address>*::
102 This IP address is used as the sender address for outgoing
103 packets. The default is to not use a special inteface and just
104 bind on all interfaces.
106 *-p, --port <port>*::
107 The local UDP port that is used to send and receive the
108 payload data. The two tunnel endpoints can use different
111 *-r, --remote-host <hostname|ip>*::
112 This option can be used to specify the remote tunnel
113 endpoint. In case of anycast tunnel endpoints, the
114 anycast IP address has to be used. If you do not specify
115 an address, it is automatically determined after receiving
116 the first data packet.
118 *-o, --remote-port <port>*::
119 The UDP port used for payload data by the remote host
120 (specified with -p on the remote host). If you do not specify
121 a port, it is automatically determined after receiving
122 the first data packet.
125 Resolv to IPv4 addresses only. The default is to resolv both
126 IPv4 and IPv6 addresses.
129 Resolv to IPv6 addresses only. The default is to resolv both
130 IPv4 and IPv6 addresses.
134 By default, tapN is used for Ethernet tunnel interfaces,
135 and tunN for IP tunnels, respectively. This option can
136 be used to manually override these defaults.
138 *-t, --type <tun|tap>*::
140 Type of the tunnels to create. Use tap for Ethernet
141 tunnels, tun for IP tunnels.
143 *-n, --ifconfig <local>/<prefix>*::
144 The local IP address and prefix length. The remote tunnel endpoint
145 has to use a different IP address in the same subnet.
147 *<local>*;; the local IP address for the tun/tap device
148 *<prefix>*;; the prefix length of the network
150 *-x, --post-up-script <script>*::
151 This option instructs *uAnytun* to run this script after the interface
152 is created. By default no script will be executed.
154 *-m, --mux <mux-id>*::
155 the multiplex id to use. default: 0
157 *-s, --sender-id <sender id>*::
158 Each anycast tunnel endpoint needs a unique sender id
159 (1, 2, 3, ...). It is needed to distinguish the senders
160 in case of replay attacks. As *uAnytun* does not support
161 synchronisation it can't be used as an anycast endpoint therefore
162 this option is quite useless but implemented for compability
165 *-w, --window-size <window size>*::
166 seqence window size +
167 Sometimes, packets arrive out of order on the receiver
168 side. This option defines the size of a list of received
169 packets' sequence numbers. If, according to this list,
170 a received packet has been previously received or has
171 been transmitted in the past, and is therefore not in
172 the list anymore, this is interpreted as a replay attack
173 and the packet is dropped. A value of 0 deactivates this
174 list and, as a consequence, the replay protection employed
175 by filtering packets according to their secuence number.
176 By default the sequence window is disabled and therefore a
177 window size of 0 is used.
179 *-k, --kd--prf <kd-prf type>*::
180 key derivation pseudo random function +
181 The pseudo random function which is used for calculating the
182 session keys and session salt. +
185 *null*;; no random function, keys and salt are set to 0..00
186 *aes-ctr*;; AES in counter mode with 128 Bits, default value
187 *aes-ctr-128*;; AES in counter mode with 128 Bits
188 *aes-ctr-192*;; AES in counter mode with 192 Bits
189 *aes-ctr-256*;; AES in counter mode with 256 Bits
191 *-e, --role <role>*::
192 SATP uses different session keys for inbound and outbound traffic. The
193 role parameter is used to determine which keys to use for outbound or
194 inbound packets. On both sides of a vpn connection different roles have
195 to be used. Possible values are *left* and *right*. You may also use
196 *alice* or *server* as a replacement for *left* and *bob* or *client* as
197 a replacement for *right*. By default *left* is used.
199 *-E, --passphrase <pass phrase>*::
200 This passphrase is used to generate the master key and master salt.
201 For the master key the last n bits of the SHA256 digest of the
202 passphrase (where n is the length of the master key in bits) is used.
203 The master salt gets generated with the SHA1 digest.
204 You may force a specific key and or salt by using *--key* and *--salt*.
206 *-K, --key <master key>*::
207 master key to use for key derivation +
208 Master key in hexadecimal notation, e.g.
209 01a2b3c4d5e6f708a9b0cadbecfd0fa1, with a mandatory length
210 of 32, 48 or 64 characters (128, 192 or 256 bits).
212 *-A, --salt <master salt>*::
213 master salt to use for key derivation +
214 Master salt in hexadecimal notation, e.g.
215 01a2b3c4d5e6f708a9b0cadbecfd, with a mandatory length
216 of 28 characters (14 bytes).
218 *-c, --cipher <cipher type>*::
219 payload encryption algorithm +
220 Encryption algorithm used for encrypting the payload +
223 *null*;; no encryption
224 *aes-ctr*;; AES in counter mode with 128 Bits, default value
225 *aes-ctr-128*;; AES in counter mode with 128 Bits
226 *aes-ctr-192*;; AES in counter mode with 192 Bits
227 *aes-ctr-256*;; AES in counter mode with 256 Bits
229 *-a, --auth-algo <algo type>*::
230 message authentication algorithm +
231 This option sets the message authentication algorithm. +
232 If HMAC-SHA1 is used, the packet length is increased. The additional bytes
233 contain the authentication data. see *--auth-tag-length* for more info. +
236 *null*;; no message authentication
237 *sha1*;; HMAC-SHA1, default value
239 *-b, --auth-tag-length <length>*::
240 The number of bytes to use for the auth tag. This value defaults to 10 bytes
241 unless the *null* auth algo is used in which case it defaults to 0.
247 P2P Setup between two unicast enpoints:
248 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
253 uanytun -r hostb.example.com -t tun -n 192.168.123.1/30 -c aes-ctr-256 -k aes-ctr-256 \
254 -E have_a_very_safe_and_productive_day -e left
258 uanytun -r hosta.example.com -t tun -n 192.168.123.2/30 -c aes-ctr-256 -k aes-ctr-256 \
259 -E have_a_very_safe_and_productive_day -e right
261 One unicast and one anycast tunnel endpoint:
262 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
264 Unicast tunnel endpoint:
265 ^^^^^^^^^^^^^^^^^^^^^^^^
267 uanytun -r anycast.anytun.org -d anytun0 -t tun -n 192.0.2.2/30 -a null -c null -w 0 -e client
269 Anycast tunnel endpoints:
270 ^^^^^^^^^^^^^^^^^^^^^^^^^
271 As *uAnytun* can't work as an anycast endpoint it can't be used for this purpose. You
272 have to use *Anytun* for that job.
277 Most likely there are some bugs in *uAnytun*. If you find a bug, please let
278 the developers know at uanytun@anytun.org. Of course, patches are preferred.
284 Christian Pointner <equinox@anytun.org>
290 Main web site: http://www.anytun.org/
296 Copyright \(C) 2008-2009 Christian Pointner. This program is free
297 software: you can redistribute it and/or modify it under the terms
298 of the GNU General Public License as published by the Free Software
299 Foundation, either version 3 of the License, or any later version.