added small ssl documentation (thanks to lukas :D)
[ircu2.10.12-pk.git] / doc / readme.ssl
1 Using SSL with IRCu
2
3 SSL in IRCu is principally pretty easy. You just have to compile 
4 the IRCd with the GnuTLS/OpenSSL headers. This will be done 
5 automatically if the headers are found by the ./configure script.
6
7 To see if the configure script found the GnuTLS/OpenSSL headers you 
8 just have to look into the summary at the end:
9  OpenSSL:             yes
10  GnuTLS:              yes
11 If both headers were not found (`no` output) we have to install the 
12 required SSL header first. On Debian, this is quite simple: 
13 just install the following two packages using the build in 
14 apt packet management: 
15 apt-get install libssl-dev or apt-get install libgnutls-dev.
16
17 Now we have to create a valid certificate for the IRCu. For a "normal" 
18 IRC network usually a self signed SSL certificate should be enough. 
19 If you want to buy a certificate for 200\80+ you can do that too, of course.
20
21 If you want to put this money aside and create your own SSL certificate now, 
22 you just have to type (example for openssl):
23 openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout ircd.pem -out ircd.pem
24
25 Generating a 1024 bit RSA private key
26 ....................................................++++++
27 ......++++++
28 writing new private key to 'ircd.pem'
29 -----
30 You are about to be asked to enter information that will be incorporated
31 into your certificate request.
32 What you are about to enter is what is called a Distinguished Name or a DN.
33 There are quite a few fields but you can leave some blank
34 For some fields there will be a default value,
35 If you enter '.', the field will be left blank.
36 -----
37 Country Name (2 letter code) [AU]:
38 State or Province Name (full name) [Some-State]:
39 Locality Name (eg, city) []:
40 Organization Name (eg, company) [Internet Widgits Pty Ltd]:
41 Organizational Unit Name (eg, section) []:
42 Common Name (eg, YOUR name) []: IMPORTANT: Here you have to enter the 
43                                            address of your IRC Server.
44                                            You can use FQHN form (x.y.net) or 
45                                            wildcarts (for all servers) *.y.net.
46 Email Address []: 
47
48 As we have a valid SSL certificate now, we have to tell the IRCu where it
49 can be found. For this, we add a SSL block to the configuration (ircd.conf):
50  SSL {
51   cert = "ircd.pem";
52  };
53
54 The path (in our case ./ircd.pem) is relative to the lib directory of your 
55 IRCu installation. Now our IRCu should already be working with SSL. To use 
56 this feature, we now have to add a SSL port:
57  Port {
58   secure = yes;
59   port = 7776;
60  };
61
62 According to RFC the port 6697 should also be used for SSL.
63  Port {
64   secure = yes;
65   port = 6697;
66  };