chiark / gitweb /
Import release 0.05
[secnet] / INSTALL
CommitLineData
2fe58dfd
SE
1INSTALLATION INSTRUCTIONS for SECNET
2
df1b18fc
SE
3USE AT YOUR OWN RISK. THIS IS ALPHA QUALITY SOFTWARE. I DO NOT
4GUARANTEE THAT THERE WILL BE PROTOCOL COMPATIBILITY BETWEEN DIFFERENT
5VERSIONS.
6
7* Preparation
8
9** System software support
10
2fe58dfd
SE
11Ensure that you have libgmp2-dev and adns installed (and bison and
12flex, and for that matter gcc...).
13
14If you intend to configure secnet to obtain packets from the kernel
15through userv-ipif, install and configure userv-ipif. It is part of
16userv-utils, available from ftp.chiark.greenend.org.uk in
17/users/ian/userv
18
4efd681a
SE
19If you intend to configure secnet to obtain packets from the kernel
20using the universal TUN/TAP driver, make sure it's configured in your
21kernel (it's under "network device support" in Linux) and that you've
22created the appropriate device files; see
23linux/Documentation/networking/tuntap.txt
24
df1b18fc 25If you're using TUN/TAP on a platform other than Linux-2.4, see
4efd681a
SE
26http://vtun.sourceforge.net/tun/
27
df1b18fc
SE
28Note than TUN comes in two flavours, one (called 'tun' in the secnet
29config file) which has only one device file (usually /dev/net/tun) and
30the other (called 'tun-old') which has many device files
31(/dev/tun*). Linux-2.4 has new-style TUN, Linux-2.2, BSD and Solaris
32have old-style TUN. Currently only new-style TUN has been tested with
33secnet.
34
35** System and network configuration
36
37If you intend to start secnet as root, I suggest you create an userid
38for it to run as once it's ready to drop its privileges. Example (on
39Debian):
40# adduser --system --no-create-home secnet
41
42You will need to allocate two IP addresses for use by secnet. One will
43be for the tunnel interface on your tunnel endpoint machine (i.e. the
44address you see in 'ifconfig' when you look at the tunnel
45interface). The other will be for secnet itself. These addresses could
46possibly be allocated from the range used by your internal network: if
47you do this, you should think about providing appropriate proxy-ARP on
48the machine running secnet for the two addresses. Alternatively the
49addresses could be from some other range - this works well if the
50machine running secnet is the default route out of your network.
51
52http://www.ucam.org/cam-grin/ may be useful.
53
54Advanced users: secnet's IP address does not _have_ to be in the range
55of networks claimed by your end of the tunnel; it could be in the
56range of networks claimed by the other end. Doing this is confusing,
57but works (in the case where you can't get the administrator of the
58other end to allocate an IP address for his copy of secnet [hint hint
59Ian]).
60
61* Installation
62
63To install secnet do
2fe58dfd
SE
64
65$ ./configure
66$ make
67# cp secnet /usr/local/sbin/secnet
68# mkdir /etc/secnet
69# cp example.conf /etc/secnet/secnet.conf
70# cd /etc/secnet
71# ssh-keygen -f key -N ""
72
73(When upgrading, just install the new /usr/local/sbin/secnet; keep
74your current configuration file.)
75
df1b18fc
SE
76Generate a site file fragment for your site (see below), and submit it
77for inclusion in the vpn-sites file. Download the vpn-sites file to
78/etc/secnet/sites - MAKE SURE YOU GET AN AUTHENTIC COPY because the
79sites file contains public keys for all the sites in the VPN.
2fe58dfd 80
df1b18fc 81* Configuration
2fe58dfd 82
df1b18fc
SE
83Should be reasonably obvious - edit /etc/secnet/secnet.conf as
84prompted by the comments. XXX Fuller documentation of the
85configuration file format should be forthcoming in time. Its syntax is
86described in the README file at the moment.
87
88* Constructing your site file fragment
2fe58dfd
SE
89
90You need the following information:
91
921. a short name for your site, eg. "greenend". This is used to
93identify your site in the vpn-sites file.
94
952. the name your site will use in the key setup protocol,
96eg. "greenend" (these two will usually be similar or the same).
97
983. the DNS name of the machine that will be the "front-end" for your
99secnet installation. This will typically be the name of the gateway
100machine for your network, eg. sinister.dynamic.greenend.org.uk
101
102secnet does not actually have to run on this machine, as long as the
103machine can be configured to forward UDP packets to the machine that
104is running secnet.
105
1064. the port number used to contact secnet at your site. This is the
107port number on the front-end machine, and does not necessarily have to
108match the port number on the machine running secnet.
109
1105. the list of networks accessible at your site over the VPN.
111
1126. the public part of the RSA key you generated during installation
113(in /etc/secnet/key.pub if you followed the installation
114instructions). This file contains three numbers and a comment on one
115line. The first number is the key length in bits, and can be
116ignored. The second number (typically small) is the encryption key
117'e', and the third number (large) is the modulus 'n'.
118
119If you are running secnet on a particularly slow machine, you may like
120to specify a larger value for the key setup retry timeout than the
121default, to prevent unnecessary retransmissions of key setup
122packets. See the notes in the example configuration file for more on
123this.
124
125The site file fragment should look something like this:
126
127shortname {
128 name "sitename";
129 address "your.public.address.org.uk";
130 port 5678;
131 networks "172.18.45.0/24";
132 key rsa-public("35","153279875126380522437827076871354104097683702803616313419670959273217685015951590424876274370401136371563604396779864283483623325238228723798087715987495590765759771552692972297669972616769731553560605291312242789575053620182470998166393580503400960149506261455420521811814445675652857085993458063584337404329");
133 };
df1b18fc
SE
134
135See 'example-sites-file' for more examples.