Page 1 of 1

problems autostarting client centos 7

Posted: Mon Feb 19, 2018 7:58 pm
by emilopez
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.

Re: problems autostarting client centos 7

Posted: Mon Feb 19, 2018 8:03 pm
by TinCanTech
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 ?

Re: problems autostarting client centos 7

Posted: Mon Feb 19, 2018 8:15 pm
by emilopez
I am trying to start the client. But I don't know why openvpn is looking for server.conf.

Re: problems autostarting client centos 7

Posted: Mon Feb 19, 2018 8:20 pm
by TinCanTech
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 ..

Re: problems autostarting client centos 7

Posted: Mon Feb 19, 2018 8:28 pm
by emilopez
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