OpenVPN - Client Export - bad archive
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.
- any ideas on what I can do to get the Client Export utility to generate a valid archive download/
- failing that, can I get the p12 file directly from the pfSense file system?
Nachtfalke last edited by
Choose another browser and/or completely delete the brwoser's cache.
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.
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.
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
Try the latest revision of the package.