Creating a private ssl certificate

Hi,

I am running RouterOS version 6.7. I am not running a website on this server and there is no domain name associated with the IP address. All I’m trying to do is access my Mikrotik RB751 router remotely via the web interface using https.
I found a good tutorial on how to create a private ssl certificate:
http://blog.didierstevens.com/2008/12/30/howto-make-your-own-cert-with-openssl/

I was trying to set my RB751 router to act as a secure web server (www-ssl) and discovered that it requires an ssl certificate.

Here’s what I did to create the ssl certificate and ssl key on a Linux machine:

openssl genrsa -out ca.key 4096
openssl req -new -x509 -days 1826 -key ca.key -out ca.crt
openssl genrsa -out ia.key 4096
openssl req -new -key ia.key -out ia.csr

You will be asked to enter a password during the key creation process. Enter the password in the next step described below.
After using a Linux machine to create the ssl certificate, I transferred the files, ca.crt and ca.key to the Mikrotik router via ftp and then I typed the following commands in the terminal window of Winbox:

/certificate import file-name=ca.crt
passphrase: <your password>
/certificate import file-name=ca.key
passphrase: <your password>

Then I clicked on “IP” and “Services” in Winbox and set up www-ssl. I told it to use the certificate that I had just created.

I was unable to find detailed instructions when I searched the Mikrotik forum. That is why I am writing this.

Don James

You should issue the import commands in the reverse order- first import certificate, and only then import the key. Now you should have your certificate imported already, so just issue key import command once again.

There’s a guide on the wiki too… http://wiki.mikrotik.com/wiki/Manual:Create_Certificates