This tutorial should help to setup OpenVPN on an VPS/Dedi server with Linux and also setup OpenVPN on the client computer with MS Windows and Android.

Server side setup

Login to Your Linux server that you want to act as a VPN server / proxy server. If you do not have one, try Linux VPS 256MB RAM from there: https://instantcpanelhosting.com/cart.php?gid=4 After order you will receive SSH login details so you can access your linux server command line. Following are Linux commands to run.

First check tun/tap is available:
cat /dev/net/tun

A) It is OK because it says "cat: /dev/net/tun: File descriptor in bad state"

B) It is bad, tun device is not available currently, it says "cat: /dev/net/tun: Operation not permitted". In case of a dedicated server, do command "modprobe tun" and then add tun into /etc/modules.conf or on RHEL into /etc/sysconfig/modules/my.modules add line "/sbin/modprobe tun". If you are on a VPS (not dedicated server), then ask your VPS provider to enable tun/tap. On OpenVZ provider will issue command: "vzctl set CTID --devnodes net/tun:rw --capability net_admin:on --save"

Then download installation bash script for the Linux Debian, Ubuntu, CentOS (no centos 5.x). The webpage of this script is: https://github.com/Nyr/openvpn-install
You can use following command to download & install it:

wget git.io/vpn --no-check-certificate -O openvpn-install.sh && bash openvpn-install.sh

Maybe worth using 443 port as it will be rarely restricted.

After it is successful, it should tell that the openvpn configuration file is at ~/client.ovpn (/root/client.ovpn)
Download this file to your device from which you can connect to the OpenVPN server

Client side setup

Windows client

Place your .ovpn configuration file into the proper directory, C:\Program Files\OpenVPN\config, and click Connect in the GUI.

Linux client

openvpn --config ~/path/to/client.ovpn

Android client

I installed this software. And then downloaded my .ovpn file to the phone. Then open that file in phone and select VPN client you just installed to open it. It will import the file.

---
After connection is established, the OS connections should be routed thru the OpenVPN. If not, or internet fails, verify your proxy settings in InternetExplorer or in the app that fails to connect internet.

If apps still can't connect internet, try to switch to the server and discover your network interface name (usually eth0 or venet0):
route|grep default|awk '{print $8}'

Then execute command on the server:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE
(i used venet0 as im on the OpenVZ VPS)

----------------------------------------
How to setup torrent client to work with OpenVPN? https://internetlifeforum.com/security/6552-how-make-qbittorent-working-openvpn/