Here is a little tutorial for using rTorrent on sites using self signed SSL certs that I wrote today.
I have taken bits a pieces from various sites around the place.
Broadly speaking the process to get rTorrent working using a self signed cert are these:-
1. Get the cert and convert to a format rTorrent can use
2. Put the cert somewhere you will be able to find
3. Change rTorrents config to ensure it knows where to find the SSL certs
So, here we go.
1. ==Get the cert==
Log into your linux box as the user that will be running rTorrent and change to you home
Pass the following command……
sudo openssl s_client -connect thesitenamehere.com:443 | tee out_cert
You will see the SSL certificate on your screen, now hit CTRL-C, magically in the directory
you are now in will be a file called out_cert. Now you need to convert the cert to x509
format. To do this pass the following command
sudo openssl x509 -inform PEM -in out_cert -text -out out.pem
You can view the files we created with a text editor if you so wish.
2. ==Put the cert in a know directory==
Now you need to find out where your QNAP/NAS/PC has all the SSL certificates, they could be
in /etc/ssl/certs, take a look. If not you need to find out where they are. Once you
have found where they are copy the out.pem file to the directory where the SSL certs are
lets pretend they are in /etc/ssl/certs. Pass the following command…
sudo cp out.pem /etc/ssl/certs
Then once it is in that directory change to the /etc/ssl/certs directory. Once you are in
there pass the following command….
3. ==The ~rtorrent.rc==
Now you need to find the example ~rtorrent.rc file that comes with rTorrent (note
that it is a hidden file as it starts with ‘~’).
Once found copy it to the home directory of the user that will be running rTorrent. the name of the
file should be ~rtorrent.rc
Now go into the ~rtorrent.rc file and take a look at the options it gives you, this is the
power of rTorrent. Use your favourite text editor, I use vi, there are plenty others.
Anyway, now you need to put the following line at the bottom of the ~rtorrent.rc file
# directory for ssl certificates on self signed trackers
That should be it. You should be able to connect to your site now and torrent away.
You will need to change the rtorrent.rc file to ensure it works well with your QNAP/NAS/PC. In particular you should alter it to include a watch directory for new .torrent files so its starts automatically downloading, and also perhaps a default save directory etc.
Check out rtorrents site and also read some of the tutorials out there……
Howto: Use rtorrent like a pro
Enjoy rTorrent, its the shitzen.