vpnbook.com offers a free openVPN service. This is one of their files: http://paste.ubuntu.com/7231382/ with the name vpnbook-uk1-tcp80.ovpn
.
I want to convert it to 3 files to be usable in network-manager-openvpn:
vpnbook.com offers a free openVPN service. This is one of their files: http://paste.ubuntu.com/7231382/ with the name vpnbook-uk1-tcp80.ovpn
.
I want to convert it to 3 files to be usable in network-manager-openvpn:
Copy the text between
<ca>
and</ca>
, paste it in a text editor and save it asca.crt
. The text between<cert>
and</cert>
should be saved asclient.crt
and the text between<key>
and</key>
should be saved asclient.key
.You must set some advanced options in accordance to the configuration file. I couldn't connect to servers using port 80, but port 443 works for me. This is what I did:
I created a script here to automate fetching password & zip files from vpn websites such as vpnbook.com, extracting the
ca
,cert
, andkey
data from the ovpn files, and updating the opvn files so the certs should just import for you.since all ovpn files are all simple plain text files, you can create a python scripts with the following logic:
(1) read the contents of ovpn text file;
(2) grab relevant text between tags using regular expression;
(3) copy that text into a new text file;
(4) the mapping between tags and new-text-file to create looks like this:
I created this repository as an example implementation of that logic to grab all ovpn files and create certificates
*.ovpn --> *-ca.crt, *-client.crt, *-client.key