problems autostarting client centos 7

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.
Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
emilopez
OpenVpn Newbie
Posts: 3
Joined: Mon Feb 19, 2018 7:05 pm

problems autostarting client centos 7

Post by emilopez » Mon Feb 19, 2018 7:58 pm

Dears,

I am using centos7.4.1708 and openvpn 2.4.4-1 both server and client.

I have successful tested the server and client using the manual commands openvpn --config server.conf and openvpn --config client.conf
Then, I have started the server using

Code: Select all

#systemctl start openvpn@server.service
#systemctl -f enable openvpn@server.service
rebooting the system and tested again the client with the openvpn --config client.conf.
Everything was fine.

The problem now is with the client when i tried to do:

Code: Select all

#systemctl start openvpn@server.service
the following error appear:

Job for openvpn@server.service failed because the control process exited with error code. See "systemctl status openvpn@server.service" and "journalctl -xe" for details.

after the journalctl -xe:
...
Options error: in [CMD-LINE]:1: Error opening configuration file: server.conf
...

The same result if I do:
#systemctl start openvpn-client@server.service

I have disabled firewalld and selinux, but didnt solve the problem.

I put the client files (ca.crt, cliente1-openvpn.crt, cliente1-openvpn.key, ta.key and client.conf) inside the client directory under /etc/openvpn/client.

Any help will be very useful.
Thanks in advance.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 4641
Joined: Fri Jun 03, 2016 1:17 pm

Re: problems autostarting client centos 7

Post by TinCanTech » Mon Feb 19, 2018 8:03 pm

emilopez wrote:
Mon Feb 19, 2018 7:58 pm
Options error: in [CMD-LINE]:1: Error opening configuration file: server.conf
emilopez wrote:
Mon Feb 19, 2018 7:58 pm
I put the client files (ca.crt, cliente1-openvpn.crt, cliente1-openvpn.key, ta.key and client.conf) inside the client directory under /etc/openvpn/client
Which do you mean .. client or server ?

emilopez
OpenVpn Newbie
Posts: 3
Joined: Mon Feb 19, 2018 7:05 pm

Re: problems autostarting client centos 7

Post by emilopez » Mon Feb 19, 2018 8:15 pm

I am trying to start the client. But I don't know why openvpn is looking for server.conf.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 4641
Joined: Fri Jun 03, 2016 1:17 pm

Re: problems autostarting client centos 7

Post by TinCanTech » Mon Feb 19, 2018 8:20 pm

emilopez wrote:
Mon Feb 19, 2018 7:58 pm
The problem now is with the client when i tried to do:

Code: Select all

#systemctl start openvpn@server.service
Not much I can help with here ..

emilopez
OpenVpn Newbie
Posts: 3
Joined: Mon Feb 19, 2018 7:05 pm

Re: problems autostarting client centos 7

Post by emilopez » Mon Feb 19, 2018 8:28 pm

Thanks for your help.

The solution was:

#systemctl start openvpn-client@client

where the last client is the name of the config client file

Thanks again.
Regards

Post Reply