Community discussions

MikroTik App
Cartman
Member Candidate
Member Candidate
Topic Author
Posts: 104
加入: Wed Jul 23, 2008 6:14 pm

How to set up openVPN ?

Wed Jun 11, 2014 1:46 pm

Hello world !!!

I have been stuck for three days now to set up openVPN between two MTs.
Had to read several sites just to get to know that OVPN server needs a certifikate, even
if the MT offers "no" as an option.
Now I am trying to create certificate, but I just do not get it.
In the winbox > system > certificates > add I added a template (quite confusing)
After that I created a certificate request.
So far, so good, but what now ?

How can I create a (by the MT) self signed certificate ?

The Wiki says to use cacert.org. Did so.
-> Domain was not in the registered domains at cacert

Tried to register "domain":
- > cacert想know where to send the mail with the cert: admin@213.xxx.yyy.50
That is the MT which cannot receive mails.

Later the devices will have hostnames from dyndns.org, but I cannot register this domain to create certs.
Do I have to register an exclusive domain just to get a cert. for the tunnel ?

BTW: there is another wiki page for creating certs -> Create_Certificates
Followed step-by-step, well just to the second step and got the first error:
Code:Select all
failure: wrong CA key usage with CRL
when trying to sign the ca-template.

In a Linux environment it is a question of minutes to create a SSC, but on MT it seems to be impossible.

It would be great, if someone could help me.

Other question:
有办法得到一些更多的调试信息吗about the OVPN in the logs ?

THX
Top
Cartman
Member Candidate
Member Candidate
Topic Author
Posts: 104
加入: Wed Jul 23, 2008 6:14 pm

Re: How to set up openVPN ?

Wed Jun 11, 2014 1:54 pm

FYI: ROS is 6.14
Top
Cartman
Member Candidate
Member Candidate
Topic Author
Posts: 104
加入: Wed Jul 23, 2008 6:14 pm

Re: How to set up openVPN ?

Wed Jun 11, 2014 4:48 pm

Set up a Linux system and created a cert with openssl, but no further success.
On the server I just get
Code:Select all
15:40:57 ovpn,info TCP connection established from 213.xxx.yyy.47 15:41:00 ovpn,info : using encoding - BF-128-CBC/SHA1 15:41:00 ovpn,debug <213.xxx.yyy.47>: disconnected <> 15:41:10 ovpn,info TCP connection established from 213.xxx.yyy.47 15:41:12 ovpn,info : using encoding - BF-128-CBC/SHA1 15:41:12 ovpn,debug <213.xxx.yyy.47>: disconnected <> 15:41:22 ovpn,info TCP connection established from 213.xxx.yyy.47 15:41:25 ovpn,info : using encoding - BF-128-CBC/SHA1 15:41:25 ovpn,debug <213.xxx.yyy.47>: disconnected <> 15:41:35 ovpn,info TCP connection established from 213.xxx.yyy.47 15:41:37 ovpn,info : using encoding - BF-128-CBC/SHA1 15:41:38 ovpn,debug <213.xxx.yyy.47>: disconnected <> 15:41:48 ovpn,info TCP connection established from 213.xxx.yyy.47 15:41:50 ovpn,info : using encoding - BF-128-CBC/SHA1 15:41:50 ovpn,debug <213.xxx.yyy.47>: disconnected <> 15:42:00 ovpn,info TCP connection established from 213.xxx.yyy.47 15:42:03 ovpn,info : using encoding - BF-128-CBC/SHA1 15:42:03 ovpn,debug <213.xxx.yyy.47>: disconnected <> 15:42:13 ovpn,info TCP connection established from 213.xxx.yyy.47 15:42:15 ovpn,info : using encoding - BF-128-CBC/SHA1 15:42:15 ovpn,debug <213.xxx.yyy.47>: disconnected <>
and on the client:
Code:Select all
15:44:05 ovpn,info VPN: initializing... 15:44:05 ovpn,info VPN: connecting... 15:44:08 ovpn,debug openvpn: VPN: disconnected  15:44:08 ovpn,info VPN: terminating... - peer disconnected 15:44:08 ovpn,info VPN: disconnected 15:44:18 ovpn,info VPN: initializing... 15:44:18 ovpn,info VPN: connecting... 15:44:20 ovpn,debug openvpn: VPN: disconnected  15:44:20 ovpn,info VPN: terminating... - peer disconnected 15:44:20 ovpn,info VPN: disconnected 15:44:30 ovpn,info VPN: initializing... 15:44:30 ovpn,info VPN: connecting... 15:44:33 ovpn,debug openvpn: VPN: disconnected  15:44:33 ovpn,info VPN: terminating... - peer disconnected 15:44:33 ovpn,info VPN: disconnected 15:44:43 ovpn,info VPN: initializing... 15:44:43 ovpn,info VPN: connecting... 15:44:45 ovpn,debug openvpn: VPN: disconnected  15:44:45 ovpn,info VPN: terminating... - peer disconnected 15:44:45 ovpn,info VPN: disconnected 15:44:55 ovpn,info VPN: initializing... 15:44:55 ovpn,info VPN: connecting...
I have no idea what the problem might be.
Maybe it would be interesting to have some mor informtion, but that is all
logging available for OVPN.

Any ideas ?

THX
Top
aTan
常客
常客
Posts: 54
加入: Tue Nov 01, 2011 11:55 am

Re: How to set up openVPN ?

Mon Jun 16, 2014 11:42 am

Code:Select all
failure: wrong CA key usage with CRL
You need to set crl sign key usage.
Top
Cartman
Member Candidate
Member Candidate
Topic Author
Posts: 104
加入: Wed Jul 23, 2008 6:14 pm

Re: How to set up openVPN ?

Mon Jun 16, 2014 1:11 pm

Thanks for that, aTan.
But I already managed to install the cert to the MT and
I think everything with the cert is correct as I do not
get a "TLS failed"

All I get is the log messages shown above without telling
me where the cause of the disconnect might be.
Top
Cartman
Member Candidate
Member Candidate
Topic Author
Posts: 104
加入: Wed Jul 23, 2008 6:14 pm

Re: How to set up openVPN ?

Mon Jun 16, 2014 3:01 pm

OK, I think I got it:

Accidentally set a value for caller-ID
in PPP > Secret on the server

A message like "Invalid caller-ID" in the log would have
saved me a week

TFN
Top

Who is online

Users browsing this forum:Bing [Bot]and 23 guests