Server unable to open dh parameters

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
GC23
OpenVpn Newbie
Posts: 12
Joined: Mon Jun 10, 2013 6:51 pm

Server unable to open dh parameters

Post by GC23 » Mon Jun 10, 2013 7:12 pm

I have installed openVPN 2.2.2 and followed the how-to exactly, but I am encountering these errors (On windows xp sp 3):

Cannot open c:\program_files\openvpn\config\dh1024.pem for DH parameters: error:02001003:system library:fopen:No such process: error:2006d080:BIO routines:BIO_new_file:no such file

I have tried uninstalling openVPN, rebuilding the DH parameters file, rebooting, and changing the location of the DH parameters file in my server.ovpn file
(ie: c:\program files\openvpn\config vs c:\program_files\openvpn\config vs c:\programfiles\openvpn\config).
I have also attempted to direct openVPN towards dh1024 after placing it in my easy-rsa directory, all without success.

I would appreciate if someone could point out any mistakes I may be making.

Also, here is my server.ovpn file:

proto udp
dev tun
ca c:\\program_files\\openvpn\\config\\ca.crt
cert c:\\program_files\\openvpn\\config\\server.crt
key c:\\program_files\\openvpn\\config\\server.key
dh c:\\program_files\\openvpn\\config\\dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 4

GC23
OpenVpn Newbie
Posts: 12
Joined: Mon Jun 10, 2013 6:51 pm

Re: Server unable to open dh parameters

Post by GC23 » Mon Jun 10, 2013 11:55 pm

I also have "port 1194" at the beginning of my config file, but forgot to write that in my original post.

mwandelaar
OpenVPN Super User
Posts: 219
Joined: Mon Nov 23, 2009 8:24 pm

Re: Server unable to open dh parameters

Post by mwandelaar » Tue Jun 11, 2013 7:53 am

How did you generate the dh-params?
Can you regenerate the dh-param's using

Code: Select all

openssl dhparam -out dh1024.pem 1024
and try again?

The other option is to include the dh-parameters in the server-configfile using:

Code: Select all

<dh>
-----BEGIN DH PARAMETERS-----
MIGHAoGBAJtne4Nvau2/zVwJ7w5J9CcnDDRmws1+v17JCD58vyuETIjmYkv55u/L
p7PfK+LOsHTUKaFuXq5SB+AerImvOyJ3FRD2LGofg5YEt242pA3wwVQOcWFeLrHE
PyHGHVQwUl96zPZhe9XUmD9zDUR9US9q5SfgfqAnOrMZLeFP/5aTAgEC
-----END DH PARAMETERS-----
</dh>
Instead of pointing to a file.

GC23
OpenVpn Newbie
Posts: 12
Joined: Mon Jun 10, 2013 6:51 pm

Re: Server unable to open dh parameters

Post by GC23 » Wed Jun 12, 2013 1:33 pm

Thanks for the help, I was able to successfully start both server and client and ping across the VPN tunnel after including the dh parameters in my config file.

Post Reply