Initial revision
[l2tpns.git] / INSTALL
1 Brief Installation guide for L2TPNS
2
3 1. Requirements
4
5     * You must have libcli installed to enable the command-line
6       interface. You can get it from http://sourceforge.net/projects/libcli.
7       If you don't have it, command-line support will not be compiled in.
8
9     * A kernel with iptables support
10
11     * If you want to use throttling, you must have a kernel and a tc (iproute) which supports HTB.
12
13
14 2. Compile
15
16 ./configure --prefix=/usr --sysconfdir=/etc/l2tpns
17 make
18
19
20 3. Install
21
22     * make install. This does:
23         * Install the binaries into /usr/bin (l2tpns, cluster_master and nsctl)
24         * Create config dir /etc/l2tpns and create default config files
25         * Ensures that /dev/net/tun exists
26
27     * Modify config file. You probably need to change most of the config options.
28
29     * Set up basic firewall rules. This should be done in an init script.
30
31         iptables -t nat -N l2tpns
32         iptables -t nat -A PREROUTING -j l2tpns
33         iptables -t mangle -N l2tpns
34         iptables -t mangle -A PREROUTING -j l2tpns
35
36     * Set up walled garden firewall rules. This should be done in an init
37       script. This is not required unless you are using the garden plugin.
38
39         iptables -t nat -N garden >/dev/null 2>&1
40         iptables -t nat -F garden
41         iptables -t nat -A garden -p tcp -m tcp --dport 25 -j DNAT --to 192.168.1.1
42         iptables -t nat -A garden -p udp -m udp --dport 53 -j DNAT --to 192.168.1.1
43         iptables -t nat -A garden -p tcp -m tcp --dport 53 -j DNAT --to 192.168.1.1
44         iptables -t nat -A garden -p tcp -m tcp --dport 80 -j DNAT --to 192.168.1.1
45         iptables -t nat -A garden -p tcp -m tcp --dport 110 -j DNAT --to 192.168.1.1
46         iptables -t nat -A garden -p tcp -m tcp --dport 443 -j DNAT --to 192.168.1.1
47         iptables -t nat -A garden -p icmp -m icmp --icmp-type echo-request -j DNAT --to 192.168.1.1
48         iptables -t nat -A garden -p icmp -j ACCEPT
49         iptables -t nat -A garden -j DROP
50
51     * Set up IP address pools in /etc/l2tpns/ip_pool
52
53     * Set up clustering
54
55         * Run cluster_master on a separate machine
56         * Set the "cluster master" and "bind address" parameters in /etc/l2tpns/l2tpns.cfg
57
58     * Make l2tpns run on startup
59
60     * Test it out
61
62
63
64
65 This software is quite stable and is being used in a production
66 environment at a quite large ISP. However, you may have problems
67 setting it up, and if so, I would appreciate it if you would file
68 useful bug reports on the Source Forge page:
69
70 http://sourceforge.net/projects/l2tpns/
71
72 -- David Parrish