rTorrent and selfsigned SSL certs

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
directory.

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….

sudo c_rehash

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
http_capath=/etc/ssl/certs

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


http://libtorrent.rakshasa.no/

Enjoy rTorrent, its the shitzen.

VOIP over 3G – Update 1

Today I received my new SIM from Exetel. After a slight hitch porting out from my old mobile provider I was up and running in no time.

I got a mate to call me on the DID number that I have assigned to my Pennytel account that is a trunk with my PBXes account that SIPdroid registers with (the hoops i go through). It worked fine with just a few seconds of jitter during the conversation that lasted a few minutes. So, so far so good. We will see how it goes over the next few weeks and see how mad it drives me.

VOIP over 3G

I’m excited by the prospects of mobile VOIP using my ADP1 and Sipdroid.

Sipdorid has its draw backs, the main one being development has been pushed to interoperate with PBXes as opposed to any old VSP or even my Asterisk box at home but thats what you get and I can’t bitch to much about something that works (through PBXes) and is free.

So, today I signed up with a provider that re-sells (among other things) Optus 3G data. I can’t get over how cheap (at least for Australia) the data is. They are charging 1.5c per MB of data. At this rate it makes sense to ditch my current MVNO (who re-sells Vodafone) and go with the new mob. Exetel, who I am switching to, are also an ISP here in Australia and I like their style, its cheap and they don’t piss about with the facts. Its kind of ‘here are our prices and this is how we will do you over, if you don’t like it then piss off, and, if we don’t like you we’ll also tell you to piss off’ which is an interetsing but kind of likeable quality in the business that they are in.

The man that runs the show, John Linton, has a blog and his outlook on things is what tipped me to try them out, its refreshing to see these kind of comments in business. Here is a perfect example.

So, we’ll see how it pans out. I’ll be going VOIP for all my calls (when possible) and text messages also using a VSP. Lets hope the Optus service and network here in Perth doesn’t let me down.

EDIT: I’m crapping my self now that this will not work. Sipdroid only supports the G711 codec which is a monster when it comes to bandwidth consumption. I wish it supported G729 – this could be a short experiment ending up in failure due to Sipdroid and the Andorid OS. Please, please Optus network deliver me a fast stable 3G connection.

Trixbox Astersik server – some success with other stuff.

Last weekend I cleaned up some network issues at home. In short I had run into some issues becasue I was running and BIND DNS server that was being used by my webserver plus the webserver had entries in its hosts file plus I am running m0n0wall which handled DNS resolution for other clients on the network. It was all very confusing but I think its sorted now.

So, now that my network is decent I got stuck into Trixbox. The issues I had were as follows:-
1. Couldn’t received call on my Ekiga SIP client running on my laptop in the man cave, strangely I could call other external extension from Ekiga but not receive calls. It was just always engaged.
2. I couldn’t seem to get my SPA3102 to act as a VOIP to PSTN gateway or PSTN to VOIP Gateway.
3. Couldn’t get Sipdroid runinng on my ADP1 to register with my Trixbox to then beable to act as an extension and receiv calls etc.

Point 1 must have something to do with Ekiga, I say this becasue I installed X-Lite last night and could make and receive calls fine with it. Anyone know why Ekiga will not receive calls, despite it registering fine and being able to make calls fine???

Point 2 was a little more tricky. It turned out that the other day I moved my modem into the man cave as there was a phone line extension there. The ADSL worked fine but strangely when ever I called my land line it was engaged, this as a result frustrated my attempts to get Asterisk answer PSTN calls and vica-versa. This isn’t so bad becasue know one knows what the number is but its a worry. It turns out I had to move the modem back up stairs to where I had installed an ADSL filter splitter. Writing about this now leads me to belive that perhaps the problem is from the way the phone extensions were installed and having a filter/splitter upstairs and only using it for PSTN then having another filter/splitter down stairs and only using that for ADSL is causing the problem. I’ll buy an in-line filter for my phone only and plug the modem back in the man-cave without a filter and see if that solves the problem.

So anyway, I re-set the SPA3102 back to factory default and re-entered the various setting to ensure the thing woirked in Australia again and also sounded like and Australian phone. I re-set it up a–la Trixbox without the tears and now…..it works! Sweet.

Point 3, I admit, II buckled and signed up with PBXes. It hurts me to do this and I’m still annoyed but at this moment its the easiest way to achieve what I would like, ie, Sipdroid working. IN the end I opened a new account at Pennytel and set up Pennytel as a trunk at PBXes. Whats cool is that I also have an account with Pennytel so Pennytel to Pennyytel calls are free. Thsi way, if my fike wants to speak with me and Sipdroid is regiustered to PBXes OK she just calls me Pennytel account number and its a FREE call, of course this depends on if Sipdroid is using 3G or if its on Wi-Fi.

EZTV & EZRSS

So, EZTV is back which is great but I noticed something odd.

One of my favorite shows, Burn Notice, on the EZTV site goes to s03e08 but on the EZRSS it goes only to s03e06. Has anyone else had this same problem? Looks like there is a sync issue between the site and the RSS feed (at least for Burn Notice).

I noticed some comments on their forum that they added VTV releases to the RSS feed. Looks like it a manual process of getting a scene into the RSS………..

Sipdroid with Trixbox/Asterisk – How????

I have spend many hours trying to get my ADP1 phone running Sipdroid to register with my trixbox server. Its driving me nuts, really, it is.

Yes, I have changed the sip_nat.conf file and ensured it has…

nat=yes
externip=203.blah.blah.blah
localnet=blah.blah.blah.blah/255.255.255.0

I have tried it over WI-Fi on my LAN and over 3G. I was able to reguister OK – once then if fails there after. Strangely it will register only after you creat a new extension for sipdroid in trixbox.

Is it my NAT router doing something odd?

So, do you think I can get it to work. No, I can’t and its driving me NUTS! AHhhhhhhhhhhhh.

I think I’ll just buckle to it all and register with PBXes and then register a VSP as a trunk there and use it that way. Surely it couldn’t be this difficuly but apparently it is. Interestingly on the Sipdroid site it says something to the effect, we are smarter than you and have changed PBXes a little from a standard trixbox installation (obviously) so don’t bother wasting to much time trying to get Sipdroid working with your own asterisk box – it won’t work. This really shits me to be honest. Shouldn’t these kind of things be created to give the maximum amount of interopability.

So who has managed to get Sipdroid register and work with your own Trixbox/Asterisk server? Let me know how you did it – its killing me.

If someone at PBXes reads this – what changes need to be made to my Trixbox to get Sipdroid to work with it, come on guys…..