7 anytun - anycast tunneling daemon
16 [ -u|--username <username> ]
17 [ -g|--groupname <groupname> ]
18 [ -C|--chroot <path> ]
19 [ -P|--write-pid <filename> ]
20 [ -L|--log <target>:<level>[,<param1>[,<param2>[..]]] ]
22 [ -i|--interface <ip-address> ]
24 [ -r|--remote-host <hostname|ip> ]
25 [ -o|--remote-port <port> ]
28 [ -I|--sync-interface <ip-address> ]
29 [ -S|--sync-port port> ]
30 [ -M|--sync-hosts <hostname|ip>[:<port>][,<hostname|ip>[:<port>][...]] ]
31 [ -X|--control-host <hostname|ip>[:<port>]
33 [ -t|--type <tun|tap> ]
34 [ -n|--ifconfig <local>/<prefix> ]
35 [ -x|--post-up-script <script> ]
36 [ -R|--route <net>/<prefix length> ]
38 [ -s|--sender-id <sender id> ]
39 [ -w|--window-size <window size> ]
40 [ -k|--kd-prf <kd-prf type> ]
42 [ -E|--passphrase <pass phrase> ]
43 [ -K|--key <master key> ]
44 [ -A|--salt <master salt> ]
45 [ -c|--cipher <cipher type> ]
46 [ -a|--auth-algo <algo type> ]
47 [ -b|--auth-tag-length <length> ]
53 *Anytun* is an implementation of the Secure Anycast Tunneling Protocol
54 (SATP). It provides a complete VPN solution similar to OpenVPN or
55 IPsec in tunnel mode. The main difference is that anycast allows a
56 setup of tunnels between an arbitrary combination of anycast, unicast
62 *Anytun* 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 *Anytun* 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 *Anytun* to run in a chroot jail. The default is
82 *-P, --write-pid '<filename>'*::
83 Instruct *Anytun* 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,anytun,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>
102 This option instructs *Anytun* to run in debug mode. It implicits *-D*
103 (don't daemonize) and adds a log target with the configuration
104 'stdout:5' (logging with maximum level). In future releases there might
105 be additional output when this option is supplied.
107 *-i, --interface '<ip address>'*::
108 This IP address is used as the sender address for outgoing
109 packets. In case of anycast tunnel endpoints, the anycast
110 IP has to be used. In case of unicast endpoints, the
111 address is usually derived correctly from the routing
112 table. The default is to not use a special interface and just
113 bind on all interfaces.
115 *-p, --port '<port>'*::
116 The local UDP port that is used to send and receive the
117 payload data. The two tunnel endpoints can use different
118 ports. If a tunnel endpoint consists of multiple anycast
119 hosts, all hosts have to use the same port. default: 4444
121 *-r, --remote-host '<hostname|ip>'*::
122 This option can be used to specify the remote tunnel
123 endpoint. In case of anycast tunnel endpoints, the
124 anycast IP address has to be used. If you do not specify
125 an address, it is automatically determined after receiving
126 the first data packet.
128 *-o, --remote-port '<port>'*::
129 The UDP port used for payload data by the remote host
130 (specified with -p on the remote host). If you do not specify
131 a port, it is automatically determined after receiving
132 the first data packet.
135 Resolv to IPv4 addresses only. The default is to resolv both
136 IPv4 and IPv6 addresses.
139 Resolv to IPv6 addresses only. The default is to resolv both
140 IPv4 and IPv6 addresses.
142 *-I, --sync-interface '<ip-address>'*::
143 local unicast(sync) ip address to bind to +
144 This option is only needed for tunnel endpoints consisting
145 of multiple anycast hosts. The unicast IP address of
146 the anycast host can be used here. This is needed for
147 communication with the other anycast hosts. The default is to
148 not use a special interface and just bind on all interfaces. However
149 this is only the case if synchronisation is active see *--sync-port*.
151 *-S, --sync-port '<port>'*::
152 local unicast(sync) port to bind to +
153 This option is only needed for tunnel endpoints
154 consisting of multiple anycast hosts. This port is used
155 by anycast hosts to synchronize information about tunnel
156 endpoints. No payload data is transmitted via this port.
157 By default the synchronisation is disabled an therefore the
158 port is kept empty. +
159 It is possible to obtain a list of active connections
160 by telnetting into this port. This port is read-only
161 and unprotected by default. It is advised to protect
162 this port using firewall rules and, eventually, IPsec.
164 *-M, --sync-hosts '<hostname|ip>[:<port>],[<hostname|ip>[:<port>][...]]'*::
165 remote hosts to sync with +
166 This option is only needed for tunnel endpoints consisting
167 of multiple anycast hosts. Here, one has to specify all
168 unicast IP addresses of all other anycast hosts that
169 comprise the anycast tunnel endpoint. By default synchronisation is
170 disabled and therefore this is empty. Mind that the port can be
171 omitted in which case port 2323 is used. If you want to specify an
172 ipv6 address and a port you have to use [ and ] to separate the address
173 from the port, eg.: [::1]:1234. If you want to use the default port
174 [ and ] can be omitted.
176 *-X, --control-host '<hostname|ip>[:<port>]'*::
177 fetch the config from this host. The default is not to use a control
178 host and therefore this is empty. Mind that the port can be omitted
179 in which case port 2323 is used. If you want to specify an
180 ipv6 address and a port you have to use [ and ] to separate the address
181 from the port, eg.: [::1]:1234. If you want to use the default port
182 [ and ] can be omitted.
184 *-d, --dev '<name>'*::
186 By default, tapN is used for Ethernet tunnel interfaces,
187 and tunN for IP tunnels, respectively. This option can
188 be used to manually override these defaults.
190 *-t, --type '<tun|tap>'*::
192 Type of the tunnels to create. Use tap for Ethernet
193 tunnels, tun for IP tunnels.
195 *-n, --ifconfig '<local>/<prefix>'*::
196 The local IP address and prefix length. The remote tunnel endpoint
197 has to use a different IP address in the same subnet.
199 '<local>';; the local IP address for the tun/tap device
200 '<prefix>';; the prefix length of the network
202 *-x, --post-up-script '<script>'*::
203 This option instructs *Anytun* to run this script after the interface
204 is created. By default no script will be executed.
206 *-R, --route '<net>/<prefix length>'*::
207 add a route to connection. This can be invoked several times.
209 *-m, --mux '<mux-id>'*::
210 the multiplex id to use. default: 0
212 *-s, --sender-id '<sender id>'*::
213 Each anycast tunnel endpoint needs a unique sender id
214 (1, 2, 3, ...). It is needed to distinguish the senders
215 in case of replay attacks. This option can be ignored on
216 unicast endpoints. default: 0
218 *-w, --window-size '<window size>'*::
219 seqence window size +
220 Sometimes, packets arrive out of order on the receiver
221 side. This option defines the size of a list of received
222 packets' sequence numbers. If, according to this list,
223 a received packet has been previously received or has
224 been transmitted in the past, and is therefore not in
225 the list anymore, this is interpreted as a replay attack
226 and the packet is dropped. A value of 0 deactivates this
227 list and, as a consequence, the replay protection employed
228 by filtering packets according to their secuence number.
229 By default the sequence window is disabled and therefore a
230 window size of 0 is used.
232 *-k, --kd--prf '<kd-prf type>'*::
233 key derivation pseudo random function +
234 The pseudo random function which is used for calculating the
235 session keys and session salt. +
238 'null';; no random function, keys and salt are set to 0..00
239 'aes-ctr';; AES in counter mode with 128 Bits, default value
240 'aes-ctr-128';; AES in counter mode with 128 Bits
241 'aes-ctr-192';; AES in counter mode with 192 Bits
242 'aes-ctr-256';; AES in counter mode with 256 Bits
244 *-e, --role '<role>'*::
245 SATP uses different session keys for inbound and outbound traffic. The
246 role parameter is used to determine which keys to use for outbound or
247 inbound packets. On both sides of a vpn connection different roles have
248 to be used. Possible values are 'left' and 'right'. You may also use
249 'alice' or 'server' as a replacement for 'left' and 'bob' or 'client' as
250 a replacement for 'right'. By default 'left' is used.
252 *-E, --passphrase '<passphrase>'*::
253 This passphrase is used to generate the master key and master salt.
254 For the master key the last n bits of the SHA256 digest of the
255 passphrase (where n is the length of the master key in bits) is used.
256 The master salt gets generated with the SHA1 digest.
257 You may force a specific key and or salt by using *--key* and *--salt*.
259 *-K, --key '<master key>'*::
260 master key to use for key derivation +
261 Master key in hexadecimal notation, e.g.
262 01a2b3c4d5e6f708a9b0cadbecfd0fa1, with a mandatory length
263 of 32, 48 or 64 characters (128, 192 or 256 bits).
265 *-A, --salt '<master salt>'*::
266 master salt to use for key derivation +
267 Master salt in hexadecimal notation, e.g.
268 01a2b3c4d5e6f708a9b0cadbecfd, with a mandatory length
269 of 28 characters (14 bytes).
271 *-c, --cipher '<cipher type>'*::
272 payload encryption algorithm +
273 Encryption algorithm used for encrypting the payload +
276 'null';; no encryption
277 'aes-ctr';; AES in counter mode with 128 Bits, default value
278 'aes-ctr-128';; AES in counter mode with 128 Bits
279 'aes-ctr-192';; AES in counter mode with 192 Bits
280 'aes-ctr-256';; AES in counter mode with 256 Bits
282 *-a, --auth-algo '<algo type>'*::
283 message authentication algorithm +
284 This option sets the message authentication algorithm. +
285 If HMAC-SHA1 is used, the packet length is increased. The additional bytes
286 contain the authentication data. see *--auth-tag-length* for more info. +
289 'null';; no message authentication
290 'sha1';; HMAC-SHA1, default value
292 *-b, --auth-tag-length '<length>'*::
293 The number of bytes to use for the auth tag. This value defaults to 10 bytes
294 unless the 'null' auth algo is used in which case it defaults to 0.
300 P2P Setup between two unicast enpoints:
301 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
306 anytun -r hostb.example.com -t tun -n 192.168.123.1/30 -c aes-ctr-256 -k aes-ctr-256 \
307 -E have_a_very_safe_and_productive_day -e left
311 anytun -r hosta.example.com -t tun -n 192.168.123.2/30 -c aes-ctr-256 -k aes-ctr-256 \
312 -E have_a_very_safe_and_productive_day -e right
315 One unicast and one anycast tunnel endpoint:
316 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
318 Unicast tunnel endpoint:
319 ^^^^^^^^^^^^^^^^^^^^^^^^
321 anytun -r anycast.anytun.org -d anytun0 -t tun -n 192.0.2.2/30 -a null -c null -w 0 -e client
323 Anycast tunnel endpoints:
324 ^^^^^^^^^^^^^^^^^^^^^^^^^
326 On the host with unicast hostname unicast1.anycast.anytun.org and anycast
327 hostname anycast.anytun.org:
328 -------------------------------------------------------------------------------------------------
329 # anytun -i anycast.anytun.org -d anytun0 -t tun -n 192.0.2.1/30 -a null -c null -w 0 -e server \
330 -S 2342 -M unicast2.anycast.anytun.org:2342,unicast3.anycast.anytun.org:2342
331 -------------------------------------------------------------------------------------------------
333 On the host with unicast hostname unicast2.anycast.anytun.org and anycast
334 hostname anycast.anytun.org:
335 -------------------------------------------------------------------------------------------------
336 # anytun -i anycast.anytun.org -d anytun0 -t tun -n 192.0.2.1/30 -a null -c null -w 0 -e server \
337 -S 2342 -M unicast1.anycast.anytun.org:2342,unicast3.anycast.anytun.org:2342
338 -------------------------------------------------------------------------------------------------
340 On the host with unicast hostname unicast3.anycast.anytun.org and anycast
341 hostname anycast.anytun.org:
342 -------------------------------------------------------------------------------------------------
343 # anytun -i anycast.anytun.org -d anytun0 -t tun -n 192.0.2.1/30 -a null -c null -w 0 -e server \
344 -S 2342 -M unicast1.anycast.anytun.org:2342,unicast2.anycast.anytun.org:2342
345 -------------------------------------------------------------------------------------------------
347 For more sophisticated examples (like multiple unicast endpoints to one
348 anycast tunnel endpoint) please consult the man page of anytun-config(8).
353 Most likely there are some bugs in *Anytun*. If you find a bug, please let
354 the developers know at satp@anytun.org. Of course, patches are preferred.
358 anytun-config(8), anytun-controld(8), anytun-showtables(8)
363 Othmar Gsenger <otti@anytun.org>
364 Erwin Nindl <nine@anytun.org>
365 Christian Pointner <equinox@anytun.org>
371 Main web site: http://www.anytun.org/
377 Copyright \(C) 2007-2014 Markus Grüneis, Othmar Gsenger, Erwin Nindl
378 and Christian Pointner. This program is free software: you can
379 redistribute it and/or modify it under the terms of the GNU General
380 Public License as published by the Free Software Foundation, either
381 version 3 of the License, or any later version.