ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/README
(Generate patch)

Comparing gvpe/README (file contents):
Revision 1.6 by pcg, Mon Jun 7 03:21:16 2004 UTC vs.
Revision 1.7 by pcg, Fri Jun 11 15:56:03 2004 UTC

4 GNU-VPE - Overview of the GNU Virtual Private Ethernet suite. 4 GNU-VPE - Overview of the GNU Virtual Private Ethernet suite.
5 5
6 6
7==== DESCRIPTION ==== 7==== DESCRIPTION ====
8 8
9 Vpe is a suite designed to provide a virtual private network for 9 GVPE is a suite designed to provide a virtual private network for
10 multiple nodes over an untrusted network. 10 multiple nodes over an untrusted network.
11 11
12 "Virtual" means that no physical network is created (of course), but an 12 "Virtual" means that no physical network is created (of course), but an
13 ethernet is emulated by creating multiple tunnels between the member 13 ethernet is emulated by creating multiple tunnels between the member
14 nodes. 14 nodes.
15 15
16 "Private" means that non-participating nodes cannot decode ("sniff)" nor 16 "Private" means that non-participating nodes cannot decode ("sniff)" nor
17 inject ("spoof") packets. 17 inject ("spoof") packets.
18 18
19 In the case of vpe, even participating nodes cannot sniff packets send 19 In the case of gvpe, even participating nodes cannot sniff packets send
20 to other nodes or spoof packets as if sent from other nodes. 20 to other nodes or spoof packets as if sent from other nodes.
21 21
22 "Network" means that more than two parties can participate in the 22 "Network" means that more than two parties can participate in the
23 network, so for instance it's possible to connect multiple branches of a 23 network, so for instance it's possible to connect multiple branches of a
24 company into a single network. Many so-called "vpn" solutions only 24 company into a single network. Many so-called "vpn" solutions only
33 actually need. It also makes the crypto part of the source very 33 actually need. It also makes the crypto part of the source very
34 transparent and easy to inspect. 34 transparent and easy to inspect.
35 35
36: EASY TO SETUP 36: EASY TO SETUP
37 A few lines of config (the config file is shared unmodified between 37 A few lines of config (the config file is shared unmodified between
38 all hosts) and a single run of ``vpectrl'' to generate the keys 38 all hosts) and a single run of ``gvpectrl'' to generate the keys
39 suffices to make it work. 39 suffices to make it work.
40 40
41: MAC-BASED SECURITY 41: MAC-BASED SECURITY
42 Since every host has it's own private key, other hosts cannot spoof 42 Since every host has it's own private key, other hosts cannot spoof
43 traffic from this host. That makes it possible to filter packest by 43 traffic from this host. That makes it possible to filter packet by
44 MAC address, e.g. to ensure that packets from a specific IP address 44 MAC address, e.g. to ensure that packets from a specific IP address
45 come, in fact, from a specific host. 45 come, in fact, from a specific host that is associated with that IP
46 and not from another host.
46 47
47 48
48==== PROGRAMS ==== 49==== PROGRAMS ====
49 50
50 Vpe comes with two programs: one daemon (``vped'') and one control 51 Vpe comes with two programs: one daemon (``gvpe'') and one control
51 program (``vpectrl''). 52 program (``gvpectrl'').
52 53
53: vpectrl 54: gvpectrl
54 Is used to generate the keys, check and give an overview of of the 55 Is used to generate the keys, check and give an overview of of the
55 configuration and contorl the daemon (restarting etc.). 56 configuration and contorl the daemon (restarting etc.).
56 57
57: vped 58: gvpe
58 Is the daemon used to establish and maintain conenctions to the 59 Is the daemon used to establish and maintain connections to the
59 other network members. It should be run on the gateway machine. 60 other network members. It should be run on the gateway machine.
60 61
61 62
62==== COMPILETIME CONFIGURATION ==== 63==== COMPILETIME CONFIGURATION ====
63 64
64 Please have a look at the ``vpe.osdep(5)'' manpage for platform-specific 65 Please have a look at the ``gvpe.osdep(5)'' manpage for
65 information. 66 platform-specific information.
66 67
67 Here are a few recipes for compiling your vpe: 68 Here are a few recipes for compiling your gvpe:
68 69
69 70
70== AS LOW PACKET OVERHEAD AS POSSIBLE == 71== AS LOW PACKET OVERHEAD AS POSSIBLE ==
71 72
72 ./configure --enable-hmac-length=4 --enable-rand-length=0 73 ./configure --enable-hmac-length=4 --enable-rand-length=0
77 78
78== MINIMIZE CPU TIME REQUIRED == 79== MINIMIZE CPU TIME REQUIRED ==
79 80
80 ./configure --enable-cipher=bf --enable-digest=md4 81 ./configure --enable-cipher=bf --enable-digest=md4
81 82
82 Use the fastest cipher and digest algorithms currently available in vpe. 83 Use the fastest cipher and digest algorithms currently available in
84 gvpe.
83 85
84 86
85== MAXIMIZE SECURITY == 87== MAXIMIZE SECURITY ==
86 88
87 ./configure --enable-hmac-length=16 --enable-rand-length=8 --enable-digest=sha1 89 ./configure --enable-hmac-length=16 --enable-rand-length=8 --enable-digest=sha1
104 106
105 107
106== STEP 1: configuration == 108== STEP 1: configuration ==
107 109
108 First you have to create a daemon configuation file and put it into the 110 First you have to create a daemon configuation file and put it into the
109 configuration directory. This is usually ``/etc/vpe'', depending on how 111 configuration directory. This is usually ``/etc/gvpe'', depending on how
110 you configured vpe, and can be overwritten using the ``-c'' commandline 112 you configured gvpe, and can be overwritten using the ``-c'' commandline
111 switch. 113 switch.
112 114
113 Put the following lines into ``/etc/vpe/vped.conf'': 115 Put the following lines into ``/etc/gvpe/gvpe.conf'':
114 116
115 udp-port = 50000 # the external port to listen on (configure your firewall) 117 udp-port = 50000 # the external port to listen on (configure your firewall)
116 mtu = 1400 # minimum MTU of all outgoing interfaces on all hosts 118 mtu = 1400 # minimum MTU of all outgoing interfaces on all hosts
117 ifname = vpn0 # the local network device name 119 ifname = vpn0 # the local network device name
118 120
125 node = third 127 node = third
126 hostname = third.example.net 128 hostname = third.example.net
127 129
128 The only other file neccessary if the ``if-up'' script that initializes 130 The only other file neccessary if the ``if-up'' script that initializes
129 the local ethernet interface. Put the following lines into 131 the local ethernet interface. Put the following lines into
130 ``/etc/vpe/if-up'' and make it execute (``chmod 755 /etc/vpe/if-up''): 132 ``/etc/gvpe/if-up'' and make it execute (``chmod 755 /etc/gvpe/if-up''):
131 133
132 #!/bin/sh 134 #!/bin/sh
133 ip link set $IFNAME address $MAC mtu $MTU up 135 ip link set $IFNAME address $MAC mtu $MTU up
134 [ $NODENAME = first ] && ip addr add 10.0.1.1 dev $IFNAME 136 [ $NODENAME = first ] && ip addr add 10.0.1.1 dev $IFNAME
135 [ $NODENAME = second ] && ip addr add 10.0.2.1 dev $IFNAME 137 [ $NODENAME = second ] && ip addr add 10.0.2.1 dev $IFNAME
139 This script will give each node a different IP address in the 141 This script will give each node a different IP address in the
140 ``10.0/16'' network. The internal network (e.g. the ``eth0'' interface) 142 ``10.0/16'' network. The internal network (e.g. the ``eth0'' interface)
141 should then be set to a subset of that network, e.g. ``10.0.1.0/24'' on 143 should then be set to a subset of that network, e.g. ``10.0.1.0/24'' on
142 node ``first'', ``10.0.2.0/24'' on node ``second'', and so on. 144 node ``first'', ``10.0.2.0/24'' on node ``second'', and so on.
143 145
144 By enabling routing on the gateway host that runs ``vped'' all nodes 146 By enabling routing on the gateway host that runs ``gvpe'' all nodes
145 will be able to reach the other nodes. You can, of course, also use 147 will be able to reach the other nodes. You can, of course, also use
146 proxy arp or other means of pseudo-bridging (or even real briding), or 148 proxy arp or other means of pseudo-bridging (or even real briding), or
147 (best) full routing - the choice is yours. 149 (best) full routing - the choice is yours.
148 150
149 151
150== STEP 2: create the RSA key pairs for all hosts == 152== STEP 2: create the RSA key pairs for all hosts ==
151 153
152 Run the following command to generate all key pairs (that might take a 154 Run the following command to generate all key pairs (that might take a
153 while): 155 while):
154 156
155 vpectrl -c /etc/vpe -g 157 gvpectrl -c /etc/gvpe -g
156 158
157 This command will put the public keys into 159 This command will put the public keys into
158 ``/etc/vpe/pubkeys/*nodename*'' and the private keys into 160 ``/etc/gvpe/pubkeys/*nodename*'' and the private keys into
159 ``/etc/vpe/hostkeys/*nodename*''. 161 ``/etc/gvpe/hostkeys/*nodename*''.
160 162
161 163
162== STEP 3: distribute the config files to all nodes == 164== STEP 3: distribute the config files to all nodes ==
163 165
164 Now distribute the config files to the other nodes. This should be done 166 Now distribute the config files to the other nodes. This should be done
165 in two steps, since the private keys should not be distributed. The 167 in two steps, since the private keys should not be distributed. The
166 example uses rsync-over-ssh 168 example uses rsync-over-ssh
167 169
168 First all the config files without the hostkeys should be distributed: 170 First all the config files without the hostkeys should be distributed:
169 171
170 rsync -avzessh /etc/vpe first.example.net:/etc/. --exclude hostkeys 172 rsync -avzessh /etc/gvpe first.example.net:/etc/. --exclude hostkeys
171 rsync -avzessh /etc/vpe 133.55.82.9:/etc/. --exclude hostkeys 173 rsync -avzessh /etc/gvpe 133.55.82.9:/etc/. --exclude hostkeys
172 rsync -avzessh /etc/vpe third.example.net:/etc/. --exclude hostkeys 174 rsync -avzessh /etc/gvpe third.example.net:/etc/. --exclude hostkeys
173 175
174 Then the hostkeys should be copied: 176 Then the hostkeys should be copied:
175 177
176 rsync -avzessh /etc/vpe/hostkeys/first first.example.net:/etc/hostkey 178 rsync -avzessh /etc/gvpe/hostkeys/first first.example.net:/etc/hostkey
177 rsync -avzessh /etc/vpe/hostkeys/second 133.55.82.9:/etc/hostkey 179 rsync -avzessh /etc/gvpe/hostkeys/second 133.55.82.9:/etc/hostkey
178 rsync -avzessh /etc/vpe/hostkeys/third third.example.net:/etc/hostkey 180 rsync -avzessh /etc/gvpe/hostkeys/third third.example.net:/etc/hostkey
179 181
180 You should now check the configration by issuing the command ``vpectrl 182 You should now check the configration by issuing the command ``gvpectrl
181 -c /etc/vpe -s'' on each node and verify it's output. 183 -c /etc/gvpe -s'' on each node and verify it's output.
182 184
183 185
184== STEP 4: starting vped == 186== STEP 4: starting gvpe ==
185 187
186 You should then start vped on each node by issuing a command like: 188 You should then start gvpe on each node by issuing a command like:
187 189
188 vped -D -linfo first # first is the nodename 190 gvpe -D -linfo first # first is the nodename
189 191
190 This will make the vped stay in foreground. You should then see 192 This will make the gvpe stay in foreground. You should then see
191 "connection established" messages. If you don't see them check your 193 "connection established" messages. If you don't see them check your
192 firewall and routing (use tcpdump ;). 194 firewall and routing (use tcpdump ;).
193 195
194 If this works you should check your networking setup by pinging various 196 If this works you should check your networking setup by pinging various
195 endpoints. 197 endpoints.
196 198
197 To make vped run more permanently you can either run it as a daemon (by 199 To make gvpe run more permanently you can either run it as a daemon (by
198 starting it without the ``-D'' switch), or, much better, from your 200 starting it without the ``-D'' switch), or, much better, from your
199 inittab. I use a line like this on my systems: 201 inittab. I use a line like this on my systems:
200 202
201 t1:2345:respawn:/opt/vpe/sbin/vped -D -L first >/dev/null 2>&1 203 t1:2345:respawn:/opt/gvpe/sbin/gvpe -D -L first >/dev/null 2>&1
202 204
203 205
204== STEP 5: enjoy == 206== STEP 5: enjoy ==
205 207
206 ... and play around. Sending a -HUP (``vpectrl -kHUP'') to the daemon 208 ... and play around. Sending a -HUP (``gvpectrl -kHUP'') to the daemon
207 will make it try to connect to all other nodes again. If you run it from 209 will make it try to connect to all other nodes again. If you run it from
208 inittab, as is recommended, ``vpectrl -k'' (or simply ``killall vped'') 210 inittab, as is recommended, ``gvpectrl -k'' (or simply ``killall gvpe'')
209 will kill the daemon, start it again, making it read it's configuration 211 will kill the daemon, start it again, making it read it's configuration
210 files again. 212 files again.
211 213
212 214
213==== SEE ALSO ==== 215==== SEE ALSO ====
214 216
215 vpe.osdep(5) for OS-depedendent information, vped.conf(5), vpectrl(8), 217 gvpe.osdep(5) for OS-depedendent information, gvpe.conf(5), gvpectrl(8),
216 and for a description of the protocol and routing algorithms, 218 and for a description of the protocol and routing algorithms,
217 vpe.protocol(7). 219 gvpe.protocol(7).
218 220
219 221
220==== AUTHOR ==== 222==== AUTHOR ====
221 223
222 Marc Lehmann <vpe@plan9.de> 224 Marc Lehmann <gvpe@plan9.de>
223 225
224 226
225==== COPYRIGHTS AND LICENSES ==== 227==== COPYRIGHTS AND LICENSES ====
226 228
227 Vpe itself is distributed under the GENERAL PUBLIC LICENSE (see the file 229 Vpe itself is distributed under the GENERAL PUBLIC LICENSE (see the file

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines