On MikroTik, create the certificate template and a request
Code: Select all
/certificate add name=SSL common-name=SSL key-size=2048
/certificate create-certificate-request template=SSL key-passphrase=mypassword123
Copy these files from your MikroTik to a Linux server:
certificate-request.pem
certificate-request_key.pem
You can copy them through the web interface in the Files menu, Winbox, WinSCP (SSH), Tunnelier (SSH), Filezilla (FTP), etc.
On the Linux server navigate to the folder where the files are located via terminal
Code: Select all
openssl rsa -in certificate-request_key.pem -text > certificate-request2.pem
openssl x509 -req -days 9999 -in certificate-request.pem -signkey certificate-request2.pem -out mikrotik_ssl.crt
http://slproweb.com/products/Win32OpenSSL.html
Back on the MikroTik
Code: Select all
/certificate import file-name=mikrotik_ssl.crt
/certificate import file-name=certificate-request2.pem
Code: Select all
[admin@MikroTik] /certificate> print
Flags: K - private-key, D - dsa, L - crl, C - smart-card-key, A - authority, I - issued, R - revoked, E - expired, T - trusted
# NAME COMMON-NAME SUBJECT-ALT-NAME FINGERPRINT
0 SSL SSL
1 K T cert_2 SSL c214f22faa344c8750d8ba...
Code: Select all
/ip service set www-ssl certificate=cert_2