Community discussions

MikroTik App
 
User avatar
donjames
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 87
Joined: Fri Mar 14, 2008 7:07 pm
Location: Henderson, Texas
Contact:

Creating a private ssl certificate

Tue Dec 10, 2013 5:04 am

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/3 ... h-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
Last edited by donjames on Sat Dec 14, 2013 9:17 pm, edited 2 times in total.
 
andriys
Forum Guru
Forum Guru
Posts: 1527
Joined: Thu Nov 24, 2011 1:59 pm
Location: Kharkiv, Ukraine

Re: Creating a private ssl certificate

Tue Dec 10, 2013 11:09 am

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.
 
User avatar
skot
Long time Member
Long time Member
Posts: 584
Joined: Wed Nov 30, 2011 3:05 am

Re: Creating a private ssl certificate

Wed Dec 11, 2013 10:41 pm

Who is online

Users browsing this forum: Amazon [Bot], bananaboy1101 and 123 guests