...
Change into the
/etc/raddb/certs
directoryCode Block language bash linenumbers true cd /etc/raddb/certs
Edit the certificate generation properties in client.cnf, server.cnf, and ca.cnf as follows:
- In the
ca.cnf
file:- In the
[ req ]
section, addencrypt_key = no
In the
[CA_default]
section, change the default_days from 60 to a higher number (this is how long the certificates you create will be valid for). When the certificates expire, you will have to recreate them.in the
[ certificate_authority ]
section, change all of the parameters to match those of your organisation. e.g.Code Block linenumbers true [certificate_authority] countryName = GB stateOrProvinceName = England localityName = Camford organizationName = Camford University emailAddress = support@camford.ac.uk commonName = "Camford University FR Certificate Authority"
- In the
In the
server.cnf
file:- In the
[ req ]
section, addencrypt_key = no
- In the
[CA_default]
section, change the default_days from 60 to a higher number (this is how long the certificates you create will be valid for). When the certificates expire, you will have to recreate them. in the
[ server ]
section, change all of the parameters to match those of your organisation. e.g.Code Block linenumbers true [server] countryName = GB stateOrProvinceName = England localityName = Camford organizationName = Camford University emailAddress = support@camford.ac.uk commonName = "Camford University FR Server Certificate"
Warning When changing passwords in the
[ req ]
section of the server.cnf file, you must also update theprivate_key_password
option in the FreeRADIUSmods-available/eap
file with the same password.We recommend that you do not change these defaults.
- In the
In the
client.cnf
file:- In the
[ req ]
section, addencrypt_key = no
- In the
[CA_default]
section, change the default_days from 60 to a higher number (this is how long the certificates you create will be valid for). When the certificates expire, you will have to recreate them. in the
[ client ]
section, change all of the parameters to match those of your organisation. e.g.Code Block linenumbers true [client] countryName = GB stateOrProvinceName = England localityName = Camford organizationName = Camford University emailAddress = support@camford.ac.uk commonName = "Camford University FR Client Certificate"
Note All of the organisation parameters ( countryName
,localityName
, etc) need to match in the three .cnf files but thecommonName
must be unique in each file)
- In the
- In the
Clear out any old certificates in the directory:
Code Block language bash linenumbers true make destroycerts
Run the bootstrap script to generate the certificates
Code Block language bash linenumbers true ./bootstrap
Create a file that is the concatenation of the certificate and private key of the client.
Code Block language bash linenumbers true openssl x509 -in client.crt > client.pem ; cat client.key >> client.pem
Because the above command was run as root, the keys and certificates created will not be readable by the FreeRADIUS user by default, and FreeRADIUS will not be able to start. To fix this, reset the group for the files:
Code Block language bash linenumbers true chgrp radius {client,* server,* ca,* dh}*
RadSec
Next, we need to configure RadSec. We do this by creating a file at /etc/radsec.conf
with the following:
...