Asked
Updated
Viewed
11.7k times

I download OpenVPN Server on Debian, extract this file /etc/openvpn/client.tar.gz and that includes the following files:

  • client.crt
  • client.csr
  • client.key
  • ca.crt
  • client.conf or client.ovpn for windows client

I then copy all files to this path:

C:\Program Files\OpenVPN\config

I make edits to client.ovpn for some paths like:

ca /etc/openvpn/km31512-05.hostingaura.com-keys/ca.crt
cert /etc/openvpn/km31512-05.hostingaura.com-keyss/client.crt
key /etc/openvpn/km31512-05.hostingaura.com-keys/client.key**

change to this path for windows clients:

ca F:\\Program\ Files\\OpenVPN\\config\\ca.crt
cert F:\\Program\ Files\\OpenVPN\\config\\client.crt
key F:\\Program\ Files\\OpenVPN\\config\\client.key

and then run OpenVPN GUI and click for connect. This is log connect:

Tue Mar 03 01:36:52 2009 NOTE: --user option is not implemented on Windows
Tue Mar 03 01:36:52 2009 NOTE: --group option is not implemented on Windows
Tue Mar 03 01:36:52 2009 OpenVPN 2.1_rc15 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Nov 19 2008
Tue Mar 03 01:36:52 2009 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue Mar 03 01:36:52 2009 Control Channel Authentication: using 'F:\Program Files\OpenVPN\config\ta.key' as a OpenVPN static key file
Tue Mar 03 01:36:52 2009 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Mar 03 01:36:52 2009 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Mar 03 01:36:52 2009 LZO compression initialized
Tue Mar 03 01:36:52 2009 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Tue Mar 03 01:36:53 2009 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Mar 03 01:36:53 2009 Local Options hash (VER=V4): '53f7fc82'
Tue Mar 03 01:36:53 2009 Expected Remote Options hash (VER=V4): 'b5edb94e'
Tue Mar 03 01:36:53 2009 Socket Buffers: R=[8192->8192] S=[8192->8192]
Tue Mar 03 01:36:53 2009 UDPv4 link local: [undef]
Tue Mar 03 01:36:53 2009 UDPv4 link remote: 87.118.54.110:1194

But OpenVPN GUI Status is yellow! not green? What is the problem? Here is my configure file:

export OPENVPN_SERVER="vpn.km31512-05.hostingaura.com"
export OPENVPN_CLIENTS="client"
export OPENVPN_IPRANGE="10.23.213"
export OPENVPN_LOCALDOMAIN="km31512-05.hostingaura.com"

Here is my OpenVPN server log:

# grep "openvpn" /var/log/*
/var/log/daemon.log:Mar  2 13:04:47 km31512-05 ovpn-server[11314]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/dpkg.log:2009-02-23 14:17:37 install openvpn <none> 2.0.9-4etch1
/var/log/dpkg.log:2009-02-23 14:17:37 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-23 14:17:37 status unpacked openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-23 14:17:44 status half-configured openvpn 2.0.9-4etch                                                                             
/var/log/dpkg.log:2009-02-23 14:17:46 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 14:54:59 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 14:55:07 remove openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 14:55:07 status half-configured openvpn 2.0.9-4etch                                                                              /var/log/dpkg.log:2009-02-25 14:55:07 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 14:55:08 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 14:55:08 purge openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 14:55:09 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 14:55:09 status not-installed openvpn <none>
/var/log/dpkg.log:2009-02-25 16:51:02 install openvpn <none> 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 16:51:02 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 16:51:03 status unpacked openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-25 16:51:03 status half-configured openvpn 2.0.9-4etch                                                                              
/var/log/dpkg.log:2009-02-27 11:52:47 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:52:51 remove openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:52:51 status half-configured openvpn 2.0.9-4etch                                                                             
/var/log/dpkg.log:2009-02-27 11:52:52 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:52:52 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:52:52 purge openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:52:52 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:52:52 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:52:53 status not-installed openvpn <none>
/var/log/dpkg.log:2009-02-27 11:53:14 install openvpn <none> 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:53:14 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:53:14 status unpacked openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-27 11:53:15 status half-configured openvpn 2.0.9-4etch                                                                             /var/log/dpkg.log:2009-02-27 11:53:15 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:25:52 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:25:53 remove openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:25:53 status half-configured openvpn 2.0.9-4etch                                                                             /var/log/dpkg.log:2009-02-28 23:25:53 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:25:53 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:25:53 purge openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:25:53 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:25:54 status not-installed openvpn <none>
/var/log/dpkg.log:2009-02-28 23:27:14 install openvpn <none> 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:27:14 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:27:14 status unpacked openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:27:14 status unpacked openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:27:14 status half-configured openvpn 2.0.9-4etch                                                                             
/var/log/dpkg.log:2009-02-28 23:27:16 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:28:35 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:28:35 remove openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:28:35 status half-configured openvpn 2.0.9-4etch                                                                             
/var/log/dpkg.log:2009-02-28 23:28:36 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:28:36 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:28:36 purge openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:28:36 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:28:37 status not-installed openvpn <none>
/var/log/dpkg.log:2009-02-28 23:29:26 install openvpn <none> 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:29:26 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:29:27 status unpacked openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:29:27 status half-configured openvpn 2.0.9-4etch                                                                             
/var/log/dpkg.log:2009-02-28 23:29:29 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:19 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:19 remove openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:19 status half-configured openvpn 2.0.9-4etch                                                                             /var/log/dpkg.log:2009-02-28 23:35:19 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:19 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:19 purge openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:19 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:21 status not-installed openvpn <none>
/var/log/dpkg.log:2009-02-28 23:35:43 install openvpn <none> 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:43 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:43 status unpacked openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:43 status unpacked openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:35:43 status half-configured openvpn 2.0.9-4etch                                                                             
/var/log/dpkg.log:2009-02-28 23:35:45 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:38:07 status installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:38:07 remove openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:38:07 status half-configured openvpn 2.0.9-4etch                                                                             
/var/log/dpkg.log:2009-02-28 23:38:08 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:38:08 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:38:08 purge openvpn 2.0.9-4etch1 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:38:08 status config-files openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:38:09 status not-installed openvpn <none>
/var/log/dpkg.log:2009-02-28 23:49:08 install openvpn <none> 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:49:08 status half-installed openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:49:08 status unpacked openvpn 2.0.9-4etch1
/var/log/dpkg.log:2009-02-28 23:49:08 status half-configured openvpn 2.0.9-4etch                                                                             /var/log/dpkg.log:2009-02-28 23:49:10 status installed openvpn 2.0.9-4etch1
/var/log/syslog:Feb 24 16:14:12 km31512-05 ovpn-server[12275]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 24 16:18:05 km31512-05 ovpn-server[17534]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 24 16:20:54 km31512-05 ovpn-server[18370]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 24 16:32:38 km31512-05 ovpn-server[20229]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 24 18:18:42 km31512-05 ovpn-server[3862]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 24 19:10:08 km31512-05 ovpn-server[13886]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 24 19:59:42 km31512-05 ovpn-server[26214]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 24 20:01:51 km31512-05 ovpn-server[26373]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 25 10:21:32 km31512-05 ovpn-server[20050]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 27 00:27:14 km31512-05 ovpn-server[30333]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Feb 27 11:52:20 km31512-05 ovpn-server[28648]: Cannot open file key file '/etc/openvpn/keys/ta.key': No such file or directory (errno=2)
/var/log/syslog:Feb 27 12:12:45 km31512-05 ovpn-server[5581]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Mar  1 00:03:44 km31512-05 ovpn-server[15978]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file
/var/log/syslog:Mar  2 13:04:47 km31512-05 ovpn-server[11314]: Control Channel Authentication: using '/etc/openvpn/keys/ta.key' as a OpenVPN static key file

I cannot ping from the Windows Client to 10.23.213.0.

How come my Windows client cannot connect to the OpenVPN server?

  • 0
    Did you run make && make install after you extracted the files on the Debian box? After that you have to start the VPN daemon. Then you can connect from windows. — Don2007
  • 0
    I used this tutorial. I ran apt-get install openvpn openssl liblzo1 — mohsen
  • 0
    I'll try it on Ubuntu and FreeBSD. I don't have debian. — Don2007
  • 0
    My friends tell me if the server is on the internet, then you can't connect from client to server! alright?? — mohsen
add a comment
1

1 Answer

  • Votes
  • Oldest
  • Latest
Answered
Updated

One of the entries in your OpenVPN log file says:

OpenVPN static key file /var/log/daemon.log:Feb 27 11:52:20 km31512-05 ovpn-server[28648]: Cannot open file key file '/etc/openvpn/keys/ta.key': No such file or directory (errno=2)

The file that contains your encryption key is missing. You need to run the following:

openvpn --genkey --secret ta.key

If you haven't run that command already, make sure to do that as it should solve your problem.

  • 0
    I set up OpenVPN on Ubuntu without encryption or authentication just to see if I could get it to connect. I couldn't connect to it from XP so I installed it on FreeBSD and I was able to connect. However, after the "Initialization Sequence Completed" message, I couldn't do anything else with it. Am I supposed to be able to run commands the way I can with SSH or FTP? — Don2007
add a comment
1