Import unified OVPN file to Network Manager

As for now, the openvpn network-manager plugin in Ubuntu 16.04 cannot import unified openvn configuration files. An unified openvpn file contains inline certificates beside the configuration itself.
The simplest workaround for this would be splitting the file by using a python script.
Here below you can find how to use it step by step:

  1. Create a dir:   mkdir ~/.openvpn
  2. cd  ~/.openvpn
  3. Move here your .ovpn file
  4. Download the script:  wget https://gist.githubusercontent.com/seebk/bb94a7fd70d4cc454aaa/raw/6dae6ca707066f4b9dcadadc0284cdad3015f9bd/extract_ovpn_cert.py -O split.py
  5. run python split.py your_file.ovpn
  6. Open the client_nocerts.ovpn file and remove the lines reneg-sec and setenv FORWARD_COMPATIBLE 1 if there
  7. Now you can import  your_file_no_certs.ovpn in network-manager using the common procedure:
    1.  Click on Network Manager icon in the desktop bar->
    2. VPN Connections ->
    3. configure VPN.. This opens the Network Connections dialogue. Then, Add ->
    4. import saved vpn configuration ->
    5. choose .ovpn file.

If there is any problem please check the logs with tail /var/log/syslog

 

Leave a Reply

Your email address will not be published. Required fields are marked *