Import release 0.06
[secnet] / INSTALL
CommitLineData
2fe58dfd
SE
1INSTALLATION INSTRUCTIONS for SECNET
2
974d0468 3USE AT YOUR OWN RISK. THIS IS ALPHA TEST SOFTWARE. I DO NOT
df1b18fc
SE
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
974d0468 15through userv-ipif, install and configure userv-ipif. It is part of
2fe58dfd
SE
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
974d0468
SE
21kernel (it's under "network device support" in Linux-2.4) and that
22you've created the appropriate device files; see
4efd681a
SE
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
974d0468
SE
30the other (called 'tun-old') which has many device files (/dev/tun*).
31Linux-2.4 has new-style TUN, Linux-2.2, BSD and Solaris have old-style
32TUN. Currently only new-style TUN has been tested with secnet.
df1b18fc
SE
33
34** System and network configuration
35
974d0468
SE
36If you intend to start secnet as root, I suggest you create a userid
37for it to run as once it's ready to drop its privileges. Example (on
df1b18fc
SE
38Debian):
39# adduser --system --no-create-home secnet
40
974d0468
SE
41You will need to allocate two IP addresses for use by secnet. One
42will be for the tunnel interface on your tunnel endpoint machine (i.e.
43the address you see in 'ifconfig' when you look at the tunnel
44interface). The other will be for secnet itself. These addresses
45could possibly be allocated from the range used by your internal
46network: if you do this, you should think about providing appropriate
47proxy-ARP on the machine running secnet for the two addresses.
48Alternatively the addresses could be from some other range - this
49works well if the machine running secnet is the default route out of
50your network.
df1b18fc
SE
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
974d0468
SE
56range of networks claimed by the other end. Doing this is confusing,
57but works.
df1b18fc
SE
58
59* Installation
60
61To install secnet do
2fe58dfd
SE
62
63$ ./configure
64$ make
974d0468 65# make install
2fe58dfd
SE
66# mkdir /etc/secnet
67# cp example.conf /etc/secnet/secnet.conf
68# cd /etc/secnet
69# ssh-keygen -f key -N ""
70
71(When upgrading, just install the new /usr/local/sbin/secnet; keep
72your current configuration file.)
73
df1b18fc 74Generate a site file fragment for your site (see below), and submit it
974d0468 75for inclusion in the vpn-sites file. Download the vpn-sites file to
df1b18fc
SE
76/etc/secnet/sites - MAKE SURE YOU GET AN AUTHENTIC COPY because the
77sites file contains public keys for all the sites in the VPN.
2fe58dfd 78
df1b18fc 79* Configuration
2fe58dfd 80
df1b18fc 81Should be reasonably obvious - edit /etc/secnet/secnet.conf as
974d0468
SE
82prompted by the comments. XXX Fuller documentation of the
83configuration file format should be forthcoming in time. Its syntax
84is described in the README file at the moment.
df1b18fc
SE
85
86* Constructing your site file fragment
2fe58dfd
SE
87
88You need the following information:
89
974d0468 901. a short name for your site, eg. "greenend". This is used to
2fe58dfd
SE
91identify your site in the vpn-sites file.
92
974d0468 932. the name your site will use in the key setup protocol,
2fe58dfd
SE
94eg. "greenend" (these two will usually be similar or the same).
95
974d0468
SE
963. the DNS name of the machine that will be the "front-end" for your
97secnet installation. This will typically be the name of the gateway
98machine for your network, eg. sinister.dynamic.greenend.org.uk
2fe58dfd
SE
99
100secnet does not actually have to run on this machine, as long as the
101machine can be configured to forward UDP packets to the machine that
102is running secnet.
103
974d0468 1044. the port number used to contact secnet at your site. This is the
2fe58dfd
SE
105port number on the front-end machine, and does not necessarily have to
106match the port number on the machine running secnet.
107
974d0468 1085. the list of networks accessible at your site over the VPN.
2fe58dfd 109
974d0468 1106. the public part of the RSA key you generated during installation
2fe58dfd 111(in /etc/secnet/key.pub if you followed the installation
974d0468
SE
112instructions). This file contains three numbers and a comment on one
113line. The first number is the key length in bits, and can be ignored.
114The second number (typically small) is the encryption key 'e', and the
115third number (large) is the modulus 'n'.
2fe58dfd
SE
116
117If you are running secnet on a particularly slow machine, you may like
118to specify a larger value for the key setup retry timeout than the
974d0468
SE
119default, to prevent unnecessary retransmissions of key setup packets.
120See the notes in the example configuration file for more on this.
2fe58dfd
SE
121
122The site file fragment should look something like this:
123
124shortname {
125 name "sitename";
126 address "your.public.address.org.uk";
127 port 5678;
128 networks "172.18.45.0/24";
129 key rsa-public("35","153279875126380522437827076871354104097683702803616313419670959273217685015951590424876274370401136371563604396779864283483623325238228723798087715987495590765759771552692972297669972616769731553560605291312242789575053620182470998166393580503400960149506261455420521811814445675652857085993458063584337404329");
130 };
df1b18fc
SE
131
132See 'example-sites-file' for more examples.