Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I start openvpn on the server with:

sudo openvpn /etc/openvpn/server.conf 

It works and I can connect my client to it.

When I start it with:

sudo /etc/init.d/openvpn start

It appears to work as I see:

* Starting virtual private network daemon(s)...
*   Autostarting VPN 'openvpn': missing /etc/openvpn/openvpn.conf file !

But I cannot connect the client to it.

Checking the port shows it as "closed" (in the sense that nothing is listening there... it is not closed by the firewall) in the latter case while "open" in the former.

So where is the disconnect? Is init.d not starting what I thought it would? Is it not loading the correct conf file (but then why do I not need to load openvpn.conf when I start the server directly)? Am I missing a parameter somewhere?

EDIT: Reason behind the solution

Examining the init.d script as suggested by JeffG showed it was getting the $NAME of the conf file from:


Which then looks for:


This made: NAME=openvpn so then the script went looking for openvpn.conf which does not exist as I named the file server.conf (which is how the instructions on the openvpn site say to name the file). Simply copying that file over to be named as the init.d script wanted (Hyppy's solution) fixed the problem.

share|improve this question
up vote 1 down vote accepted

Try this:

sudo cp /etc/openvpn/server.conf /etc/openvpn/openvpn.conf
share|improve this answer
Bingo. That did it. Thanks! – Lothar_Grimpsenbacher Mar 21 '11 at 21:40

Check you init.d script. Ensure that it is using /etc/openvpn/server.conf for configuration

share|improve this answer
I wish I could vote two answers up as, while Hyppy's answer satisfied my immediate problem, your answer helped me see why. Turns out the init.d script was getting the name of the conf file from the PID of openvpn. That being 'openvpn' and there was no openvpn.conf so it was not working properly. Thanks for the input though, I appreciate the assistance. – Lothar_Grimpsenbacher Mar 21 '11 at 21:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.