NordVPN and buggy Network Manager ovpn import

I’m not a fan of Network Manager but it seems to be rather pervasive, I’m using Ubuntu. It’s not very good at importing openvpn .ovpn configuration files if the certificates are embedded. It asks for a CA .pem file but there are none as it’s embedded in the .ovpn file so you need to do a little work to get around Network Managers inadequacies.

To get it to work with NordVPN ovpn files where the import wants a CA .pem file requires a few steps.

  • Download the OpenVPN config files from NordVPN.
  • Download ovpnsplit from https://github.com/dolanor/ovpnsplit and stick it somewhere on your PATH.
  • Unpack the NordVPN config zip file. The latest zip contains a couple of directories ovpn_tcp and ovpn_udp.
  • Open a terminal and cd to the unpacked directory of choice, for this example ovpn_tcp. There should be a load of .ovpn files there.
  • Run opvnsplit theovpnfile.ovpn to split a single file or run: find . -name “*.ovpn” -exec ovpnsplit {} \; to split them all.
  • Open Network Manager and follow: Edit Connections->Add->Import a saved VPN Configuration->Create
  • Locate the directory with your recently split ovpn files. ovpnsplit has created <original file>.new.ovpn along with <original file>.ca.pem and <original file>.tls-auth.ovpn. Select one of the .new.ovpn files.
  • Enter your credentials you would normally use for NordVPN.
  • Network Manager should have pre-filled the CA Certificate, but it may not have gone far enough so click on the Advanced button, then the TLS Authentication tab and make sure Key Direction is set to 1.
  • Click OK, then Save to save the configuration. That’s it!

Choose your new configuration and it should connect.

xfce, chrome and deluge

Recently I switched from KDE to Xfce. The increase in speed is well worth the change. I like to have things look and work exactly was I want and I was able to customise and tweak Xfce to my requirements within a couple of hours.

Even before I made the move to Xfce I was having trouble getting Chrome to open magnet links. Chrome passes processing of magnet links off to xdg-open which was refusing to read the .desktop files and mime settings I had to have them open in deluge (or any other torrent app that was not transmission).

xdg-open would hand control to exo-open which would in turn open a new chrome window/tab to handle the magnet link.

After much frustration I decided to modify xdg-open. I modified the open_xfce() function to loook for a magnet URL and process it BEFORE I handed it off elsewhere.

I changed the open_xfce function to:

open_xfce()
{
    if(echo "$1" | grep -q '^magnet:'); then
       deluge "$1" 
       if [ $? -eq 0 ]; then
          exit_success
       fi
    fi
                                        
    exo-open "$1"

    if [ $? -eq 0 ]; then
        exit_success
    else
        exit_failure_operation_failed
    fi
}

All is now well. magnet links in chrome now open successfully in deluge.

Switch to our mobile site