Imported Upstream version 0.3.3
[anytun.git] / README
1 Dependencies
2 ============
3
4 Anytun can be built by using either libgcrypt or the openssl-crypto library. 
5 The latter is more performant in most cases but there are some license 
6 issues when using this library.
7
8 Linux
9 -----
10 (this includes Debian with FreeBSD Kernel)
11
12 using libgcrypt:
13   libgcrypt11-dev
14
15 using ssl crypto lib:
16   libssl-dev
17
18 common:
19   build-essential
20   libboost-serialization1.35-dev
21   libboost-thread1.35-dev
22   libboost-system1.35-dev
23   libboost-regex1.35-dev
24
25 if you want to rebuild the manpage:
26   asciidoc
27
28
29 Freebsd
30 -------
31
32 using libgcrypt:
33    security/libgcrypt
34
35 using ssl crypto lib:
36    <nothing here>
37
38 common:
39    devel/boost (boost-libs on newer versions of the ports tree)
40    devel/gmake
41
42 if you want to rebuild the manpage:
43  textproc/asciidoc
44  textproc/libxslt
45  textproc/docbook-xsl
46  sysutils/readlink
47  misc/getopt 
48
49
50
51 Windows
52 -------
53 OpenSSL
54  Developer: 
55         http://www.slproweb.com/download/Win32OpenSSL-0_9_8j.exe
56
57  Runtime Only: 
58         http://www.slproweb.com/download/Win32OpenSSL_Light-0_9_8j.exe
59   
60 Boost 1.35: 
61         http://www.boostpro.com/download/boost_1_35_0_setup.exe
62
63   As it can take some time to install everything from boost here is a 
64   complete list of libraries which have to be installed in order to build anytun:
65    
66    * Serialization
67    * Thread 
68    * date_time
69    * System
70    * regex
71
72 Microsoft Visual C++ 2008 Redistributable Package (x86):
73         http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF
74
75
76
77 Installation
78 ============
79
80 Getting the source via subversion:
81 ----------------------------------
82 svn co http://svn.anytun.org/anytun/trunk anytun
83 cd anytun
84
85 Building from source
86 --------------------
87
88 using libgcrypt:
89
90  # cd src
91  # ./configure
92  # make
93
94 using ssl crypto library:
95
96  # cd src
97  # ./configure --use-ssl-crypto
98  # make
99
100
101 Notes: 
102   - try './configure --help' for further information
103   - if using openssl pre 0.9.8 you have to disable passphrase
104     because openssl had no SHA256 implementation prior to this
105     version
106   - on FreeBSD you have to use gmake instead of make
107
108 Installing
109 ----------
110
111 # sudo make install
112
113 This will install anytun under the --prefix defined with configure.
114
115 Uninstalling
116 ------------
117
118 # sudo make remove
119
120 This removes everytthing except for the config files
121
122 # sudo make purge
123
124 This also removes the config files
125
126
127
128 Usage:
129 ======
130
131 init.d script
132 -------------
133
134 The init.d script can be used to start anytun at boot time. It searches for 
135 configuration files which reside at $CONFIG_DIR. For each instance of anytun
136 which should be started there must be a directory containing at least a file
137 named config. This file must contain all command line parameter which should
138 be used when starting the daemon. One line for each parameter. Empty lines and
139 lines starting with # are ignored. Besides the config file there may be a script
140 named post-up.sh which will be called when the tun/tap device comes up. 
141 Furthermore there may be a directory called conf.d containing config files for 
142 anytun-config. The syntax of this files is quite the same as those for anytun. 
143 These files are used to configure a multi connection setup using anytun-config 
144 and anytun-controld
145 This is an example of how the script can be used to start anytun:
146
147 # /etc/init.d/anytun start client1 p2p-a
148
149 In this case the script will start 2 instances of anytun using the config files
150 $CONFIG_DIR/client1/config and $CONFIG_DIR/p2p-a/config. 
151 If no instance name is specified the script will use the file $CONFIG_DIR/autostart
152 to determine which instances to start or stop. This file must contain a list 
153 of instance names which should be used when no names are specified at the command 
154 line. One line for each name. Empty lines and lines starting with # are ignored.
155
156
157
158 Errors:
159 =======
160
161 Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
162 Cannot open TUN/TAP dev /dev/anytun0: No such file or directory (errno=2)
163
164 Solution: Enabling tun/tap device
165 ------------------------------------
166
167 modprobe tun
168 cd /dev
169 ./MAKEDEV tun
170
171 edit /etc/modules and add the line
172 tun
173 to load the module automatically