Cant import ovpn file - Key file contains “client” which is not a key-value pair












4















When I try to import the VPN settings from an OVPN file, I get the following error.




The file "test.ovpn" could not be read or does not contain recognized VPN connection information.
Error: Key file contains line "client" which is not a key-value pair, group, or comment




I am quite sure that the line "client" should not be a problem, since I have it in other .ovpn files as well.



What is wrong with this?



PS: This is the beginning of the ovpn file (with fake data)



client
dev tun
proto tcp
remote xxxxx.yyyyyyyyy.de 443
verify-x509-name "C=de, L=Somewhere, O=mycompanyname AG, CN=xxxxx.yyyyyyyy.de, emailAddress=admins@yyyyyyyyy.de"
route remote_host 255.255.255.255 net_gateway
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass
cipher AES-256-CBC
auth MD5
comp-lzo no
route-delay 4
verb 3
reneg-sec 0









share|improve this question

























  • can you share with us the .ovpn file, I assume that we might find the problematic line there

    – Yaron
    Jan 25 '18 at 9:36











  • Not sure I am allowed to show you that... I will try to put some lines with dummy data

    – Enrique Moreno Tent
    Jan 25 '18 at 9:37













  • I have updated with some (hopefully) relevant info

    – Enrique Moreno Tent
    Jan 25 '18 at 10:21
















4















When I try to import the VPN settings from an OVPN file, I get the following error.




The file "test.ovpn" could not be read or does not contain recognized VPN connection information.
Error: Key file contains line "client" which is not a key-value pair, group, or comment




I am quite sure that the line "client" should not be a problem, since I have it in other .ovpn files as well.



What is wrong with this?



PS: This is the beginning of the ovpn file (with fake data)



client
dev tun
proto tcp
remote xxxxx.yyyyyyyyy.de 443
verify-x509-name "C=de, L=Somewhere, O=mycompanyname AG, CN=xxxxx.yyyyyyyy.de, emailAddress=admins@yyyyyyyyy.de"
route remote_host 255.255.255.255 net_gateway
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass
cipher AES-256-CBC
auth MD5
comp-lzo no
route-delay 4
verb 3
reneg-sec 0









share|improve this question

























  • can you share with us the .ovpn file, I assume that we might find the problematic line there

    – Yaron
    Jan 25 '18 at 9:36











  • Not sure I am allowed to show you that... I will try to put some lines with dummy data

    – Enrique Moreno Tent
    Jan 25 '18 at 9:37













  • I have updated with some (hopefully) relevant info

    – Enrique Moreno Tent
    Jan 25 '18 at 10:21














4












4








4








When I try to import the VPN settings from an OVPN file, I get the following error.




The file "test.ovpn" could not be read or does not contain recognized VPN connection information.
Error: Key file contains line "client" which is not a key-value pair, group, or comment




I am quite sure that the line "client" should not be a problem, since I have it in other .ovpn files as well.



What is wrong with this?



PS: This is the beginning of the ovpn file (with fake data)



client
dev tun
proto tcp
remote xxxxx.yyyyyyyyy.de 443
verify-x509-name "C=de, L=Somewhere, O=mycompanyname AG, CN=xxxxx.yyyyyyyy.de, emailAddress=admins@yyyyyyyyy.de"
route remote_host 255.255.255.255 net_gateway
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass
cipher AES-256-CBC
auth MD5
comp-lzo no
route-delay 4
verb 3
reneg-sec 0









share|improve this question
















When I try to import the VPN settings from an OVPN file, I get the following error.




The file "test.ovpn" could not be read or does not contain recognized VPN connection information.
Error: Key file contains line "client" which is not a key-value pair, group, or comment




I am quite sure that the line "client" should not be a problem, since I have it in other .ovpn files as well.



What is wrong with this?



PS: This is the beginning of the ovpn file (with fake data)



client
dev tun
proto tcp
remote xxxxx.yyyyyyyyy.de 443
verify-x509-name "C=de, L=Somewhere, O=mycompanyname AG, CN=xxxxx.yyyyyyyy.de, emailAddress=admins@yyyyyyyyy.de"
route remote_host 255.255.255.255 net_gateway
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass
cipher AES-256-CBC
auth MD5
comp-lzo no
route-delay 4
verb 3
reneg-sec 0






vpn openvpn






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 19 '18 at 8:21







Enrique Moreno Tent

















asked Jan 25 '18 at 9:31









Enrique Moreno TentEnrique Moreno Tent

1,04041944




1,04041944













  • can you share with us the .ovpn file, I assume that we might find the problematic line there

    – Yaron
    Jan 25 '18 at 9:36











  • Not sure I am allowed to show you that... I will try to put some lines with dummy data

    – Enrique Moreno Tent
    Jan 25 '18 at 9:37













  • I have updated with some (hopefully) relevant info

    – Enrique Moreno Tent
    Jan 25 '18 at 10:21



















  • can you share with us the .ovpn file, I assume that we might find the problematic line there

    – Yaron
    Jan 25 '18 at 9:36











  • Not sure I am allowed to show you that... I will try to put some lines with dummy data

    – Enrique Moreno Tent
    Jan 25 '18 at 9:37













  • I have updated with some (hopefully) relevant info

    – Enrique Moreno Tent
    Jan 25 '18 at 10:21

















can you share with us the .ovpn file, I assume that we might find the problematic line there

– Yaron
Jan 25 '18 at 9:36





can you share with us the .ovpn file, I assume that we might find the problematic line there

– Yaron
Jan 25 '18 at 9:36













Not sure I am allowed to show you that... I will try to put some lines with dummy data

– Enrique Moreno Tent
Jan 25 '18 at 9:37







Not sure I am allowed to show you that... I will try to put some lines with dummy data

– Enrique Moreno Tent
Jan 25 '18 at 9:37















I have updated with some (hopefully) relevant info

– Enrique Moreno Tent
Jan 25 '18 at 10:21





I have updated with some (hopefully) relevant info

– Enrique Moreno Tent
Jan 25 '18 at 10:21










2 Answers
2






active

oldest

votes


















4














There is a known bug in NetworkManager : configuration files with inline certificates can't be imported.



There are several workarounds which can be taken:




  1. Use the this python script which extract the embedded certificates and rewrite the ovpn config to use separate key and cert files. (reference)



  2. Execute the ovpn config using command line:



    sudo openvpn your-ovpn-config-filename.ovpn



  3. separate lines which contains port into several lines:



    remote xxxxx.yyyyyyyyy.de 443


    To be:



    remote xxxxx.yyyyyyyyy.de 
    port 443







share|improve this answer































    0














    Could be because of mssfix 0 option. Per NM opinion it's wrong. How to check which option is not acceptable? Try from terminal:



    # nmcli connection import type openvpn file client1_udp.ovpn
    [sudo] password for ipeacocks:
    Error: failed to import 'client1_udp.ovpn': configuration error: invalid 1th argument to “mssfix” where number expected (line 136).


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






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f999665%2fcant-import-ovpn-file-key-file-contains-client-which-is-not-a-key-value-pair%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      There is a known bug in NetworkManager : configuration files with inline certificates can't be imported.



      There are several workarounds which can be taken:




      1. Use the this python script which extract the embedded certificates and rewrite the ovpn config to use separate key and cert files. (reference)



      2. Execute the ovpn config using command line:



        sudo openvpn your-ovpn-config-filename.ovpn



      3. separate lines which contains port into several lines:



        remote xxxxx.yyyyyyyyy.de 443


        To be:



        remote xxxxx.yyyyyyyyy.de 
        port 443







      share|improve this answer




























        4














        There is a known bug in NetworkManager : configuration files with inline certificates can't be imported.



        There are several workarounds which can be taken:




        1. Use the this python script which extract the embedded certificates and rewrite the ovpn config to use separate key and cert files. (reference)



        2. Execute the ovpn config using command line:



          sudo openvpn your-ovpn-config-filename.ovpn



        3. separate lines which contains port into several lines:



          remote xxxxx.yyyyyyyyy.de 443


          To be:



          remote xxxxx.yyyyyyyyy.de 
          port 443







        share|improve this answer


























          4












          4








          4







          There is a known bug in NetworkManager : configuration files with inline certificates can't be imported.



          There are several workarounds which can be taken:




          1. Use the this python script which extract the embedded certificates and rewrite the ovpn config to use separate key and cert files. (reference)



          2. Execute the ovpn config using command line:



            sudo openvpn your-ovpn-config-filename.ovpn



          3. separate lines which contains port into several lines:



            remote xxxxx.yyyyyyyyy.de 443


            To be:



            remote xxxxx.yyyyyyyyy.de 
            port 443







          share|improve this answer













          There is a known bug in NetworkManager : configuration files with inline certificates can't be imported.



          There are several workarounds which can be taken:




          1. Use the this python script which extract the embedded certificates and rewrite the ovpn config to use separate key and cert files. (reference)



          2. Execute the ovpn config using command line:



            sudo openvpn your-ovpn-config-filename.ovpn



          3. separate lines which contains port into several lines:



            remote xxxxx.yyyyyyyyy.de 443


            To be:



            remote xxxxx.yyyyyyyyy.de 
            port 443








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 25 '18 at 10:59









          YaronYaron

          9,02871940




          9,02871940

























              0














              Could be because of mssfix 0 option. Per NM opinion it's wrong. How to check which option is not acceptable? Try from terminal:



              # nmcli connection import type openvpn file client1_udp.ovpn
              [sudo] password for ipeacocks:
              Error: failed to import 'client1_udp.ovpn': configuration error: invalid 1th argument to “mssfix” where number expected (line 136).


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






              share|improve this answer




























                0














                Could be because of mssfix 0 option. Per NM opinion it's wrong. How to check which option is not acceptable? Try from terminal:



                # nmcli connection import type openvpn file client1_udp.ovpn
                [sudo] password for ipeacocks:
                Error: failed to import 'client1_udp.ovpn': configuration error: invalid 1th argument to “mssfix” where number expected (line 136).


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






                share|improve this answer


























                  0












                  0








                  0







                  Could be because of mssfix 0 option. Per NM opinion it's wrong. How to check which option is not acceptable? Try from terminal:



                  # nmcli connection import type openvpn file client1_udp.ovpn
                  [sudo] password for ipeacocks:
                  Error: failed to import 'client1_udp.ovpn': configuration error: invalid 1th argument to “mssfix” where number expected (line 136).


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






                  share|improve this answer













                  Could be because of mssfix 0 option. Per NM opinion it's wrong. How to check which option is not acceptable? Try from terminal:



                  # nmcli connection import type openvpn file client1_udp.ovpn
                  [sudo] password for ipeacocks:
                  Error: failed to import 'client1_udp.ovpn': configuration error: invalid 1th argument to “mssfix” where number expected (line 136).


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







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 7 at 11:25









                  ipeacocksipeacocks

                  3451316




                  3451316






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f999665%2fcant-import-ovpn-file-key-file-contains-client-which-is-not-a-key-value-pair%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                      Mangá

                      Eduardo VII do Reino Unido