LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   OpenVPN won't start (https://www.linuxquestions.org/questions/linux-newbie-8/openvpn-wont-start-898085/)

jonaskellens 08-18-2011 10:16 AM

OpenVPN won't start
 
Hello,

I installed openvpn :
Code:

Package openvpn-2.1.4-1.el6.x86_64 already installed and latest version
Starting the openvpn deamon does not work :
Code:

[root@p2 openvpn]# /sbin/service openvpn start
Starting openvpn:                                          [FAILED]

Getting the version also does not work :
Code:

[root@p2 openvpn]# /usr/sbin/openvpn -version
Options error: In [CMD-LINE]:1: Error opening configuration file: -version
Use --help for more information.

This is the configuration file :
Code:

[root@p2 openvpn]# cat vpn-server.conf
# OpenVPN configuration file for VPN SERVER
dev tun
ifconfig 10.10.0.1 10.10.0.2
secret /etc/openvpn/staticVPN2.key
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
user openvpn
group openvpn
daemon


kostya 08-18-2011 06:46 PM

Do you mean your configuration file is called "vpn-server.conf"?

Normally it is called "server.conf" for server and "client.conf" or else it won't start.
And it normally resides in /etc/openvpn.

lystor 08-19-2011 12:30 AM

Quote:

Originally Posted by jonaskellens (Post 4446752)
[root@p2 openvpn]# /usr/sbin/openvpn -version
Options error: In [CMD-LINE]:1: Error opening configuration file: -version
Use --help for more information.

Hi
"-version" is invalid command line parameter of openvpn.
Try "--version":
Code:

# openvpn --version
OpenVPN 2.1.4 x86_64-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Mar 17 2011


kostya 08-19-2011 12:17 PM

Quote:

Originally Posted by kostya (Post 4447208)
Do you mean your configuration file is called "vpn-server.conf"?

Normally it is called "server.conf" for server and "client.conf" or else it won't start.
And it normally resides in /etc/openvpn.

Yet if you insist on calling your config file "vpn-server.conf", then try to start your openvpn like this:
Code:

#openvpn --config /etc/openvpn/vpn-server.conf
You can read the /etc/init.d/openvpn in order to see why the default config is called "server.conf" or "client.conf". So if you use the startup script it will be using such config file.


All times are GMT -5. The time now is 04:23 PM.