Thursday, May 2, 2024
14
rated 0 times [  14] [ 0]  / answers: 1 / hits: 52153  / 2 Years ago, sun, may 29, 2022, 12:16:19

I need to access VPN from my Ubuntu 12.04.



I see that there is VPN connections > Configure VPN in network manager, but it asks for username and password.



All I have is some .crt, .csr, .key, .ovpn files, which are suited for some windows client.



I'm really newbie with VPN.



I also found this blog post. Is that a way to go?


More From » network-manager

 Answers
4

This is the procedure I followed to get it working. There's a bug in network manager where it doesn't do ovpn import properly - since 2010 (!)



https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/606365



Until that's fixed, I found this site



http://howto.praqma.net/ubuntu/vpn/openvpn-access-server-client-on-ubuntu



PROCEDURE



Create a new folder in your home dir - I called mine vpn.config
Copy your downloaded client.ovpn file into the new folder

Open client.opvn in an editor

Open a new file
Cut the lines between <ca> tags in client.ovpn
Paste into new file, save this file as ca.crt
Remove both <ca> tags from client.ovpn

Open a new file
Cut the lines between <cert> tags in client.ovpn
Paste into new file, save this file as client.crt
Remove both <cert> tags from client.ovpn

Open a new file
Cut the lines between <key> tags in client.ovpn
Paste into new file, save this file as client.key
Remove both <key> tags from client.ovpn

Open a new file - this is the last one :-)
Cut the lines between <tls-auth> tags in client.ovpn
Paste into new file, save this file as ta.key
Remove both <tls-auth> tags from client.ovpn

And remove this line:
key-direction 1


Now position the cursor in client.ovpn, right above the line # -----BEGIN RSA SIGNATURE-----

Insert the following lines

ca ca.crt
cert client.crt
key client.key
tls-auth ta.key 1

Save and close all the files.

Goto Network Manager -> Edit Connections ->VPN
click Import, browse to the modified client.ovpn in the folder you recently created - and where your certificates are, and import that file
Enter vpn username and password if prompted
On the VPN page, select Advanced
On the General Tab, uncheck the first option, "Use custom gateway"

Save

Use...

[#38564] Sunday, May 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
odyroc

Total Points: 324
Total Questions: 109
Total Answers: 103

Location: Belize
Member since Mon, Apr 17, 2023
1 Year ago
odyroc questions
;