Wednesday, March 26, 2014

OpenVPN on Mikrotik with Windows 7 client

Configuring a Windows OpenVPN client or server

Using a text editor, create an xxxx.ovpn file and save in C:\Program Files\OpenVPN\config e.g. C:\Program Files\OpenVPN\config\client.ovpn
Here is an example of an OpenVPN Windows client configuration file:
...


From Manual:Interface/OVPN, this can only be done with RouterOS v5+
...if you don't have milrotik version 5+, use PC as server
...use OpenVPN on both server and client PC
...use Community Edition (free) and Static Key for simplest setup

Mikrotik OpenVPN server / Windows 7 client
to create certificates and keys, follow guide below (section A.)
before importing server.key to mikrotik, it has to be converted to text:
...on lubuntu
...navigate to easy-rsa\keys
...openssl
...rsa -in server.key -text -out server.key.txt

A.
Setting up your own Certificate Authority (CA) and generating certificates and keys for an OpenVPN server and multiple clients
...Generate the master Certificate Authority (CA) certificate [and] key
......For PKI management, we will use easy-rsa, a set of scripts which is bundled with OpenVPN 2.2.x and
......earlier. If you're using OpenVPN 2.3.x, you need to download easy-rsa separately from here.
......NOTE to self: download and install easy-rsa using guide from Openvpn 2.3 on Ubuntu VPS:
......As of OpenVPN 2.3, Easy-RSA is no longer a part of the OpenVPN install, so we have to get it
......separately.  We will download it in our home directory.  Note: the latest version of Easy-RSA is version
......3, we needed the older release version 2.

......$ cd ~
......$ wget https://github.com/OpenVPN/easy-rsa/archive/release/2.x.zipwget ......https://github.com/OpenVPN/easy-rsa/archive/release/2.x.zip
......$ unzip 2.x.zip

......We now put it all together, transferring a copy of Easy-RSA to the openvpn directory.

......$ mkdir /etc/openvpn/easy-rsa
......$ cp -R ~/easy-rsa-release-2.x/easy-rsa/2.0/* /etc/openvpn/easy-rsa/
......$ cd /etc/openvpn/easy-rsa
...Generate certificate [and] key for server
...Generate certificates [and] keys for 3 clients
......no need to follow these steps(?)

Alternative(s)
-----------------
FreeLAN
- doesn't support Windows Server (?)


No comments:

Post a Comment