Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    openvpn-client-import fails

    Scheduled Pinned Locked Moved OpenVPN
    11 Posts 4 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      viragomann @greenturtle
      last edited by

      @greenturtle
      Try to take over the port into the remote line:

      remote xxx.yyy.net 1194 udp4
      

      This is for UDP IPv4.
      And remove the port line.

      G 1 Reply Last reply Reply Quote 1
      • G
        greenturtle @viragomann
        last edited by

        @viragomann
        Thanks! Moving the port and the proto to the remote seems to avoid the error.

        The client configuration in the router does not seem to relate much to the original ovpn-file. It seemed like everything worked the first time I imported, but subsequent restarts or re-imports (after deleting the client) failed to connect for some reason.

        Is there some way to bypass the configuration system of pfSense and just use the raw ovpn-file for this client configuration?

        V 1 Reply Last reply Reply Quote 0
        • V
          viragomann @greenturtle
          last edited by

          @greenturtle
          No, all settings are written into the pfSense config and the OpenVPN configuration files are written from pfSense then.

          I had never imported an. ovpn file till now. I look into the file and take over the values into the web GUI.
          You config file doesn't look very complicated. So this should go straight forward.

          Look into the log files for more details if there are issues.

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @greenturtle
            last edited by

            @greenturtle said in openvpn-client-import fails:

            remote xxx.yyy.net
            port 1194

            That's the old OpenVPN configuration format.

            @viragomann said in openvpn-client-import fails:

            remote xxx.yyy.net 1194 udp4

            This is the format valid used these days.

            @greenturtle because you sue and old(er) version of the OpenVPN config file, some options are 'converted', other are committed, and others, new option are added.
            What is your pfSense version ?

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            G 1 Reply Last reply Reply Quote 0
            • G
              greenturtle @Gertjan
              last edited by

              @gertjan
              pfSense+ 23.01-RELEASE

              I have tried to find a specification for the ovpn-file format. Is there any good description somewhere what can go into the file with all options and full syntax?

              T GertjanG 2 Replies Last reply Reply Quote 0
              • T
                tedquade @greenturtle
                last edited by tedquade

                @greenturtle Take a look at the following. It's not great but is the best I could find.

                https://github.com/OpenVPN/openvpn/blob/master/sample/sample-config-files/client.conf

                Ted Quade

                1 Reply Last reply Reply Quote 1
                • GertjanG
                  Gertjan @greenturtle
                  last edited by

                  @greenturtle said in openvpn-client-import fails:

                  pfSense+ 23.01-RELEASE
                  I have tried to find a specification for the ovpn-file format. Is there any good description somewhere what can go into the file with all options and full syntax?

                  First : what do we / you use :

                  [23.01-RELEASE][root@pfSense.never-local.here]/root: openvpn --version
                  OpenVPN 2.6_beta1 amd64-portbld-freebsd14.0 [SSL (OpenSSL)] [LZO] [LZ4] [MH/RECVDA] [AEAD] [DCO]
                  library versions: OpenSSL 1.1.1t-freebsd  7 Feb 2023, LZO 2.10
                  Originally developed by James Yonan
                  Copyright (C) 2002-2022 OpenVPN Inc <sales@openvpn.net>
                  ......
                  

                  So, it's openvpn 2.6 beta1

                  Now, you need to know that openvpn has the word 'open' in it, and that suggests that it's open source.
                  So : with the correct Google-food, you wind up here : https://openvpn.net/community-resources/reference-manual-for-openvpn-2-6/

                  Now, if you say : "wtf, that's huge !", then you're right. OpenVPN is a big project with all the zillion options and possibilities.

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

                  G 1 Reply Last reply Reply Quote 1
                  • G
                    greenturtle @Gertjan
                    last edited by

                    @Gertjan
                    Thanks, I think I found that manual when searching, but at first glance it seemed like there was only command line options.

                    I was just hoping that things would "just work", but apparently not.
                    I tried the provided ovpn file in several versions of the OpenVPN desktop client as well, but without success, which made me give up on the entire thing. Maybe a problem with the server I'm trying to connect to, and that is out of my control.

                    GertjanG 1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan @greenturtle
                      last edited by

                      @greenturtle

                      openvpn (server or client) "2.6" can connect to openvpn ( client or server ) "2.4" (from example).
                      Some hand editing is probably needed.

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      1 Reply Last reply Reply Quote 0
                      • G
                        greenturtle
                        last edited by

                        @gertjan
                        The administrator of the server decided to change something based on my log dumps, and now the connection just works at the first attempt.

                        Thank you everyone for your help. The only thing I had to change was the syntax of the remote line as mentioned by @viragomann, then the import worked just fine.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.