Cannot open dh1024.pem for DH parameters… routines:BIO_new_f

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
s052
OpenVpn Newbie
Posts: 1
Joined: Sun Mar 16, 2014 1:32 pm

Cannot open dh1024.pem for DH parameters… routines:BIO_new_f

Post by s052 » Sun Mar 16, 2014 1:36 pm

I'm reciving the following error when I start openvpn

Code: Select all

    Cannot open dh1024.pem for DH parameters: error:02001002:system library:fopen:No such file or directory: error:2006D080:BIO routines:BIO_new_file:no such file
not sure why I get this error as "dh1024.pem" is located in my /etc/openvpn

Code: Select all

    ls -l /etc/openvpn/dh1024.pem 
    -rw-r--r-- 1 root root 245 Mar 14 11:12 /etc/openvpn/dh1024.pem
server.conf:

Code: Select all

  ;local a.b.c.d
    
    port 1194
    
    ;proto tcp
    proto udp
    
    ;dev tap
    dev tun
    
    ;dev-node MyTap
    
    
    
    ca ca.crt
    cert server.crt
    key server.key  # This file should be kept secret
    
    dh dh1024.pem
    
    
    server 10.8.0.0 255.255.255.0
    
    
    
    ;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
    
    ;server-bridge
    
    ;push "route 192.168.10.0 255.255.255.0"
    ;push "route 192.168.20.0 255.255.255.0"
    
    
    ;client-config-dir ccd
    ;route 192.168.40.128 255.255.255.248
    
    ;client-config-dir ccd
    ;route 10.9.0.0 255.255.255.252
    
    ;learn-address ./script
    
    ;push "redirect-gateway def1 bypass-dhcp"
    
    push "dhcp-option DNS 8.8.8.8"
    push "dhcp-option DNS 8.8.4.4"
    
    ;client-to-client
    
    duplicate-cn
    
    keepalive 10 120
    
    ;tls-auth ta.key 0 # This file is secret
    
    ;cipher BF-CBC        # Blowfish (default)
    ;cipher AES-128-CBC   # AES
    ;cipher DES-EDE3-CBC  # Triple-DES
    
    comp-lzo
    
    ;max-clients 100
    
    ;user nobody
    ;group nogroup
    
    persist-key
    persist-tun
    
    status openvpn-status.log
    
    ;log         openvpn.log
    ;log-append  openvpn.log
    
    verb 3
    
    
    ;mute 20


G_known
OpenVPN User
Posts: 32
Joined: Sun Aug 31, 2014 2:14 am

Re: Cannot open dh1024.pem for DH parameters… routines:BIO_n

Post by G_known » Wed Sep 10, 2014 2:52 am

You most likely need to edit your conf file to reflect the path of the DH file.
Debian Wheezy amd64
Gnome 3.4.2
HP Pavilion dv6-3000 CTO
OpenVPN 2.2.1

Post Reply