Navigation

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

    OpenVPN - Client Export - bad archive

    OpenVPN
    3
    6
    2347
    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.
    • J
      jupiters_spot last edited by

      I recently installed pfSense 2.0.1-RELEASE (i386) on a Soekris net4801 with a compact flash drive.  I installed the package "OpenVPN Client Export Utility" and I am able to download the OVPN file from the "Configuration" link.  However, when I try the "Configuration archive" link, I get a 260 byte file that is not a valid archive.  I have uninstalled and reinstalled the Client Export package, but I get the same issue.  I need the p12 file that is usually in the configuration archive.

      Two questions:

      1. any ideas on what I can do to get the Client Export utility to generate a valid archive download/
      2. failing that, can I get the p12 file directly from the pfSense file system?
      1 Reply Last reply Reply Quote 0
      • N
        Nachtfalke last edited by

        Choose another browser and/or completely delete the brwoser's cache.

        1 Reply Last reply Reply Quote 0
        • J
          jupiters_spot last edited by

          I used three different browsers (Safari, Firefox, and SR Ware Iron (a Chrome-based browser)) on a new machine and still no luck.  I think I'm going to remove all vestiges of my OpenVPN configuration and start fresh.

          1 Reply Last reply Reply Quote 0
          • J
            jupiters_spot last edited by

            SOLVED

            I noticed that the zip file pfSense was trying to create was named "-udp-1194-config.zip".  That lead me to look at the PHP code that constructs the archive name (openvpn_export_config in openvpn_client_export.inc), and I found that it was constructing the archive name using (in part) the HOSTNAME of the pfSense instance (on the GUI at System>General Setup>Hostname).  The Hostname is not required on that screen and I had left my field blank, and creation of the OpenVPN configuration archive failed.  Once I specified a valid hostname I was able to export the client configuration without issues.

            The fact that the OpenVPN Client Export script requires Hostname in order to work implies that either of the two changes should be implemented:
            a) Hostname should become a required field, or
            b) the code in openvpn-client-export.inc should be changed to work without a value in Hostname

            As it stands, the code will not produce a valid archive if the Hostname field is blank.

            1 Reply Last reply Reply Quote 0
            • J
              jupiters_spot last edited by

              Further data. 
              When I attempted to export the client archive while having a blank hostname, I would get a malformed zip file of 260 bytes.  I just examined the contents of the file, and rather than a zip file or some other LZW output, it has plain text:

              Warning: filesize(): stat failed for /tmp/-udp-1194-config.zip in /usr/local/www/vpn_openvpn_export.php on line 186

              Warning: readfile(/tmp/-udp-1194-config.zip): failed to open stream: No such file or directory in /usr/local/www/vpn_openvpn_export.php on line 198

              1 Reply Last reply Reply Quote 0
              • jimp
                jimp Rebel Alliance Developer Netgate last edited by

                Try the latest revision of the package.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post