Author Topic: Establishing a VPN from the Cosmo using .ovpn files  (Read 13172 times)

TheNetEffect

  • Newbie
  • *
  • Posts: 25
    • View Profile
Establishing a VPN from the Cosmo using .ovpn files
« on: March 22, 2021, 01:23:56 pm »
It took a me a little while to figure out how to add a .ovpn connection to the Cosmo and get it working so documenting here for anyone else who has that issue:

Open a Terminal and:

sudo apt install network-manager-openvpn-gnome openvpn-systemd-resolved

Next import your .ovpn

sudo nmcli connection import type openvpn file /path/to/your.ovpn

You can go and edit your network connection and you will see the newly added VPN

To activate the VPN from the command line:

nmcli connection up <the VPN you just imported>

To de-activate the VPN:

nmcli connection down <the VPN you just imported>

You can use this also for VPN's like NordVPN:

To obtain the .ovpn config's for Nord:

sudo wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip

sudo unzip ovpn.zip (assuming you have unzip installed otherwise sudo apt install unzip)

Now you want to find the most appropriate VPN that Nord recommends for your location in the country that you wish. to do this you can launch the below webpage from Nord:

https://nordvpn.com/servers/tools/

and choose the country and it will recommend the best server based on the path from your location.

Once you have the country you can find its entry in that zip file you just created ie.

ls -a | grep ch247.nordvpn.com [that is an example based on switzerland]

Now you have the entry, enter similar commands as we did above ie:

sudo nmcli connection import type openvpn file /path/to/your.Nord.ovpn [for Nord unless you have a specific reason use the TCP directory from that zip when choosing .ovpn entries]

Visit the connection tab, find the newly created VPN entry and enter your name and password

Next back to the command line and:

nmcli connection up <the Nord VPN entry you just imported>