kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.77k stars 2.39k forks source link

Can't import ovpn client config Null characters #440

Open jessemlay opened 5 years ago

jessemlay commented 5 years ago

I'm running this container via docker from windows server 2019. When I export the ovpn file and try to load it on my mac via Tunnelblick 3.7.8 (build 5180) I get

Dec  9 02:42:10 Jesses-MacBook-Pro Tunnelblick[45169]: Converting/Installing /Users/jesselay/Downloads/jesselay.ovpn: File '/Users/jesselay/Downloads/jesselay.ovpn' contains one or more NUL characters.
Dec  9 02:42:10 Jesses-MacBook-Pro Tunnelblick[45169]: commandOptionsStatusForOpenvpnConfigurationAtPath:forTblk: returned 'error occurred' for /Users/jesselay/Downloads/jesselay.ovpn
Dec  9 02:42:10 Jesses-MacBook-Pro Tunnelblick[45169]: error status 0 returned from commandOptionsInConfigurationsAtPaths:
mathieu-aubin commented 5 years ago

Make sure the running user has access to the file

Else, maybe its a line endings problem from windows CRLF? try running dos2unix /path/filename on the file to remove the CARRIAGE_RETURN or this sed command sed -i 's/\r$//g' /path/filename

and see if that helps. If not check for empty variables/configs arguments.