Setup MikroTik OpenVPN with Windows Client :
OpenVPN Client Configuration in Windows OS -
- OpenVPN.net offers OpenVPN client software for all operating systems. Go to the download page and download your OpenVPN client that is matched with your system requirement.
- Here we are discussing Windows 7, a 64-bit operating system. So, first of all, download Installer (64-bit), Windows Vista, and later packages. In this article, the OpenVPN client version was 2.3.18.
- After downloading, install OpenVPN client in your operating system following the instructions. The installation process is as simple as installing other software in the Windows operating system.
- After OpenVPN client installation, open configuration file location (by default: C:\Program Files\OpenVPN\config or C:\Program Files (x86)\OpenVPN\config depending on your operating system)
- Create a file having (.ovpn) and copy and paste-like this client.ovpn.
Here, Change the Remote IP Address According to Your MikroTik WAN IP.
- Now copy and paste your exported CA and Client certificate files that you simply saved in your Desktop by dragging and dropping from MikroTik File List, during this location and rename CA file as ca.crt, client certificate file as client.crt, and key file as client.key because we've used these names in our configuration file.
- Create another file named secret (because we have put the auth-user-pass file is secret) without any extension and put OpenVPN PPP username at first line and password in the second line and then save this file.
- Now run OpenVPN client software.
- Click the mouse right button on this icon and then click the Connect option. The OpenVPN Connection window will appear and it will ask to put your client certificate password that you have entered at the time of client certificate exportation.
If you put in the correct password and if everything is OK, your OpenVPN client will be connected and an OpenVPN tunnel will be created between the OpenVPN client and server.
MikroTik Router Basic Configuration
The subsequent steps will show the way to do these topics in your RouterOS.
- Login to MikroTik RouterOS using winbox and visit IP > Addresses. within the Address List window, click on the plus sign. Within the New Address window, put WAN IP address in the Address input field and choose WAN interface (ether1) from the Interface dropdown menu and click on the Apply and OK button.
- Click on the plus sign again and enter the LAN IP in the Address input field and select LAN interface (ether2) from the Interface dropdown menu and click on the Apply and OK button.
- Go to IP > DNS and put DNS servers IP in the Servers input field and click on the Apply and OK button.
- Go to IP > Firewall and click on the NAT tab then click on the sign (+). Using the General tab, select srcnat from the Chain dropdown menu and click on the Action tab after that select masquerade from the Action dropdown menu. Click on the Apply and OK button.
- Go to IP > Routes and click on sign plus. Under the New Route window, tap on the Gateway input box and put the WAN Gateway address (192.168.30.1) in the Gateway input box, and tap on the Apply and OK button.