chiark / gitweb /
@@ -1,3 +1,12 @@
[userv-utils] / ipif / INSTALL
CommitLineData
0fe65164 1NB that this is a very bare set of installation instructions ! It
2describes a `default' configuration; you can do more esoteric things
3if you wish.
4
5
6In any case, on each tunnel endpoint system (not the eventual
7end-system, but the point where the packets are `detunnelled'):
8
9* Install userv, 0.95.0 or later. This should be in Debian.
10* Get userv-utils 0.1.9 from the location above, unpack it, cd to the
11 `ipif' subdirectory, and say `make' then `really make install'.
12
13
14The tunnel is always set up by one of its endpoints, using ssh. So
15the active endpoint must have ssh installed; the passive endpoint must
16have sshd accessible to the active endpoint, and be willing to allow
17the active endpoint to run the appropriate command.
18
19So: create an account for the active endpoint on the passive. You
20probably want to use RSAAuthentication, so configure the relevant key
21into the passive account's authorized_keys file.
22
23Each account must have the ability to run the `userv ipif' service
24with appropriate parameters. This is achieved by editing
25/etc/userv/ipif-networks, each line of which is in the format:
26
27<gid>,[=]<network-prefix>/<prefix-length>, <groupname>, <comment>
28
29Both the local and remote endpoint addresses, and the remote network
30address(es), need to be recorded in this file. The `=' restricts the
31address to be used, by that group, as the local tunnel endpoint
32address; without `=' the address ranges specified may refer to remote
33endpoints and networks. Every address involved with the tunnel must
34be covered by an appropriate line in ipif-networks.
35
36For example, a configuration to talk to Relativity, the author's home
37site, would include:
38<gid>,172.31.80.6/32, <group>, Relativity tunnel endpoint
39<gid>,172.18.45.0/24, <group>, Relativity house ethernet
40as well as the local tunnel endpoint address, for example:
41<gid>,=192.168.160.124/32, <group>, Local tunnel endpoint
42
43There is no NAT (address translation) in the tunnelling software, so
44all the addresses must be RFC1918-allocated and distinct (except that
45a single tunnel endpoint address can be used for all the tunnels
46terminating on a particular endpoint system).
47
48You are strongly advised to choose your private network ranges
49randomly, as recommended in BCP5 (currently RFC1918). Users in
50Cambridge may like to use the Cambridge G-RIN at
51http://www.ucam.org/cam-grin/ to choose and register their networks.
52
53
54When these things are all thought to be set up, you can test the
55tunnel by running `udptunnel' in the active account. It is invoked
56something like this:
57
58authbind udptunnel \
59 -m \
60 -e nonce -e timestamp/10/30 -e pkcs5/8 \
61 -e blowfish-cbcmac/128 -e blowfish-cbc/128 \
62 davenant-external,410 \
63 chiark-public,Command \
64 172.31.80.6,172.31.80.9,1000,cslip \
65 30,120,1800 \
66 - 172.18.45.0/24 \
67 ssh -o 'ForwardAgent no' -o 'ForwardX11 no' \
68 -o 'BatchMode yes' \
69 -i ~ian/.ssh/identity -l ian \
70 -v chiark.greenend.org.uk \
71 udptunnel
72
73This example is the tunnel between chiark and Relativity. I'll quote
74it and explain the details, below. See also the comment at the top of
75udptunnel.
76
77
78Because at Relativity the tunnel endpoint has to not be our firewall,
79because the firewall is a 386SX/16 and so not powerful enough,
80Relativity practically has to be the active partner in any tunnels it
81is involved in. This also necessitates the use of the `-m' option and
82various other things.
83
84
85Exposition of an example udptunnel invocation:
86
87> authbind udptunnel \
88
89`authbind' is used because at Relativity the tunnel endpoint address
90has to be on a fixed port because our tunnel endpoint is not on the
91firewall system (if it's not on a fixed port we can't write a firewall
92rule to let it through).
93
94The port is port 410, so root privilege or authbind is needed.
95authbind is in Debian GNU/Linux.
96
97> -m \
98
99-m tells this invocation of udptunnel that its endpoint address and
100port (for encapsulated packets) are going to be NATted before the far
101end sees them. The effect is that instead of supplying this
102information to the far end, the far end is told to `wait and see'.
103
104This should not usually be used in other circumstances. (For full
105details see the comment at the top of udptunnel.)
106
107> -e nonce -e timestamp/10/30 -e pkcs5/8 \
108> -e blowfish-cbcmac/128 -e blowfish-cbc/128 \
109
110This is the crypto configuration. I wouldn't mess with it too much if
111I were you. If you have serious (>10s) clock skew then the -e
112timestamp option may not work properly; I'd recommend having your
113systems NTP-synchronised. Here 10 is the maximum number of seconds
114into the future the timestamp on an incoming packet might be, and 30
115the maximum age of an incoming packet. You can tweak these numbers if
116you really want. If you really can't get any kind of good clock
117synch, then it's probably OK to replace
118 -e nonce -e timestamp/10/30
119with
120 -e sequence
121(NB that we don't use -e sequence so it has not been well tested.)
122
123> davenant-external,410 \
124
125This is the local address and port for sending/receiving encapsulated
126packets. davenant is the tunnel endpoint, and davenant-external is
127its globally-reachable address (we run two networks on the wire at
128Relativity, an internal one and a globally-reachable one).
129
130> chiark-public,Command \
131
132This is the remote address and port for encapsulated packets.
133`Command' means find out the remote address or port to send
134encapsulated packets to by having udptunnel at the far end print its
135address and port when they have been allocated.
136
137Another possibility here is to use a fixed remote port number.
138
139The DNS at GR has just `chiark' meaning chiark via the tunnel, so we
140have to use chiark-public which means its public IP address.
141
142> 172.31.80.6,172.31.80.9,1000,cslip \
143
144172.31.80.6 is davenant's tunnel endpoint address.
145172.31.80.9 is the address of chiark's Relativity tunnel endpoint.
146
147> 30,120,1800 \
148
149These are timing parameters. 30 is the `keep alive' timeout; if
150nothing is sent for this many seconds, an empty packet is sent. 120
151is the `broken' timeout; if nothing valid is received for this many
152seconds, the tunnel is declared dead and dies (hopefully to be
153restarted); 1800 is the time in seconds between messages of the form
154 udptunnel-forwarder: chiark: tunnel still open: received 746
155 packets, 103257 bytes
156These serve as a useful diagnostic, and also prevent the controlling
157ssh connection from timing out from NAT tables.
158
159> - 172.18.45.0/24 \
160
161`-' here is the remote networks which are reachable. None are
162reachable via chiark. 172.18.45.0/24 is the Relativity house
163ethernet.
164
165> ssh -o 'ForwardAgent no' -o 'ForwardX11 no' \
166> -o 'BatchMode yes' \
167> -i ~ian/.ssh/identity -l ian \
168> -v chiark.greenend.org.uk \
169> udptunnel
170
171This is the ssh invocation to run udptunnel at the far end.
172
173When you have this invocation working in a shell window you need to
174make it run automatically. Since the tunnel will die whenever your
175IP address changes, or when other troublesome events happen, you must
176arrange for it to be restarted. At Relativity we put the udptunnel
177invocation in a file and run it out of inittab, like this:
178
179t0:235:respawn:/usr/local/sbin/really -u ian /usr/local/sbin/udptunnel-invoke 2>&1 | logger -p local2.info -t tunnel-chiark
180
181
182Troubleshooting:
183
184Look at the error messages, they will hopefully be informative.
185
186If you see a message from `slattach' about being unable to open /dev/2
187or some such, then you need to upgrade your `slattach'. In Debian
188GNU/Linux it's in the `netbase' package, and the fix is in 3.16-3 and
189later. The relevant Debian bug reports are #45515 and #45944, and Ian
190Jackson can supply the patch to slattach or a working binary.
191
192
193$Id: INSTALL,v 1.1 2000/06/21 22:48:29 ian Exp $