Community Support Forum
 
  OpenVPN.net  •  Forum Index  •  FAQ  

It is currently Thu Nov 27, 2014 9:10 am


Forum rules


If you would like help, here is a few things you will want to do in order to help us help you.

**Post your configs from client and server, without comments. you can strip comments in linux/bsd with something like this:
grep -vE '^#|^;|^$' server.conf
**Tell us your goal.
**If you are having problems connecting, post your logfiles from server and client after using verb 4 in both configs


Also, there are 2 things you should be aware of:

**Sometimes you cannot avoid tunneling over tcp, but if you can avoid it, DO. Why TCP Over TCP Is A Bad Idea: http://sites.inka.de/~bigred/devel/tcp-tcp.html
**You ONLY want to use dev tap if you are tunneling layer2 traffic, if you are using IP traffic you want tun. If you are using tap only for windows file sharing, look into running a WINS server instead.



Post new topic Reply to topic  [ 12 posts ] 
 Error opening configuration file: 
Author Message
 Post subject: Error opening configuration file:
PostPosted: Wed Apr 27, 2011 3:36 am 
OpenVPN User

Joined: Sun Oct 03, 2010 4:55 pm
Posts: 48
helo I had to remake my server and I am using a different interface on my client. I would like to known why I am receiving this error on my logs?

What sould I do, the openvpn I am using is the last one from yum installer and I am using the same Ip address on the new interface.


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Wed Apr 27, 2011 6:21 am 
Forum Team
User avatar

Joined: Fri Aug 20, 2010 2:57 pm
Posts: 2702
Location: Amsterdam
we need a little more information if you want us to help you.
Which configuration file is openvpn trying to open? using which command/script? what happens if you run
Code:
openvpn --config </full/path/to/config/file>

where "</full/path/to/config/file>" is the path to your config file (a good place to start looking is /etc/openvpn.

which Linux distro are you using?


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Wed Apr 27, 2011 6:44 am 
OpenVPN User

Joined: Sun Oct 03, 2010 4:55 pm
Posts: 48
thanks my friend, I found the problem using openvpn --config it is a route problem.


Offline
 Profile  
 
 Post subject: rRe: Eror opening configuration file:
PostPosted: Wed Apr 27, 2011 8:25 am 
OpenVPN User

Joined: Sun Oct 03, 2010 4:55 pm
Posts: 48
sorry, but when I give --config parameter it works!!!, but When I command service openvpn start; gives me this error at /var/log/messages
openvpn[3230]: Options error: In [CMD-LINE]:1:Eror opening configuration file:

I am using a centos.

On debian .conf works well should I have another .conf like .cfg or something on centos?
Why is it not reading my .conf?

what kind of permission should I set for the configuration file on centos and what Owner?

can somebody help me?


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Wed Apr 27, 2011 10:46 am 
Forum Team
User avatar

Joined: Fri Aug 20, 2010 2:57 pm
Posts: 2702
Location: Amsterdam
to start openvpn on the command line you always need to specify '--config'. this is true for Debian also. What might happen on Debian is that a wrapper script is present which does this for you.

When you install OpenVPN on CentOS (which I use regularly) you can use the /etc/init.d/openvpn script to start openvpn as a service; this script picks up all configuration files from /etc/openvpn/*.conf


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Wed Apr 27, 2011 7:48 pm 
OpenVPN User

Joined: Sun Oct 03, 2010 4:55 pm
Posts: 48
I was believing on that too, but When I restart the service gives me this error.

I have on my configuration the parameter cd /etc/openvpn/ is that correct?

It works on debian.

do you known why is not getting up the .conf?


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Wed Apr 27, 2011 9:29 pm 
Forum Team
User avatar

Joined: Fri Aug 20, 2010 2:57 pm
Posts: 2702
Location: Amsterdam
how do you restart the server? on centos you'd normally use
Code:
service openvpn restart

or
Code:
/etc/init.d/openvpn restart


if openvpn works from the commandline but not as a service then there's something wrong with your /etc/openvpn files ; there's no need to use 'cd /etc/openvpn' inside an openvpn config file, as long as you use absolute paths to the certificate and key files.

If the openvpn service does not work then check the /var/log/messages file for any warnings/errors (other than 'cannot open config file').

As a final debugging trick you can run
Code:
bash -vx /etc/init.d/openvpn restart


and post the output here - it should give a good clue as to what is going wrong here.


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Thu Apr 28, 2011 12:20 am 
OpenVPN User

Joined: Sun Oct 03, 2010 4:55 pm
Posts: 48
I will change the verbose to 9 and later I will recreate the .conf and I give you more information.


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Thu Apr 28, 2011 2:04 am 
OpenVPN User

Joined: Sun Oct 03, 2010 4:55 pm
Posts: 48
it is not giving me any more logs and even reading the parameters log, log-append and staus. it is only giving me when I execute openvpn --config parameter.
I will reinstall the operational system and later try again, if I have the same problem I will post more questions.

thank you very much


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Fri Apr 29, 2011 1:28 am 
OpenVPN User

Joined: Sun Oct 03, 2010 4:55 pm
Posts: 48
hello thanks again, I have reinstalled the os and its comeback reading the .conf.


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Fri Apr 29, 2011 8:13 am 
Forum Team
User avatar

Joined: Fri Aug 20, 2010 2:57 pm
Posts: 2702
Location: Amsterdam
can you post the configuration file that it is trying to read? or all /etc/openvpn/*.conf files, for that matter?


Offline
 Profile  
 
 Post subject: Re: Error opening configuration file:
PostPosted: Fri Jul 27, 2012 4:11 am 
OpenVpn Newbie

Joined: Fri Jul 27, 2012 3:48 am
Posts: 1
Sorry for reopening an old thread, but I just had a similar issue and found this post while searching for an answer.

For me, it seems selinux (in enforcing mode) was blocking the init script from running, but allowing root to start the process from command line. Once I changed /etc/sysconfig/selinux to passive mode and rebooted, the init script started working.

[vpn]# /etc/init.d/openvpn start
/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/vpnserv.pid --config /etc/openvpn/vpnserv.conf --cd /etc/openvpn --script-security 2
Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/vpnserv.conf

[vpn]# /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/vpnserv.pid --config /etc/openvpn/vpnserv.conf --cd /etc/openvpn --script-security 2
[vpn]# ps -eaf |grep openvpn
root 1790 1 0 Jul26 ? 00:00:00 /usr/sbin/openvpn ......

Regards,
Scott


Offline
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


 Who is online 

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


phpBB SEO
[ Time : 0.086s | 14 Queries | GZIP : On ]

 
Index  |  FAQ


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group