Cannot start openvpn
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
dklaintea
- OpenVpn Newbie
- Posts: 2
- Joined: Tue Apr 19, 2016 4:23 pm
Cannot start openvpn
OS : Centos 7.2.1511
i am new to linux ( especially Centos )
im follow the tutorial below on this site : https://www.howtoforge.com/tutorial/how ... -centos-7/
its include :
Enable the epel-repository in CentOS.
Install openvpn, easy-rsa and iptables.
Configure easy-rsa.
Configure openvpn.
Disable firewalld and SELinux.
Configure iptables for openVPN.
Start openVPN Server.
Setting up the OpenVPN client application.
but i cant start OpenVPN
when i running the command " systemctl status openvpn@server.service "
i receive message below :
● openvpn@server.service - OpenVPN Robust And Highly Flexible Tunneling Application On server
Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2016-04-19 23:17:14 WIB; 4min 5s ago
Process: 4660 ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf (code=exited, status=1/FAILURE)
Apr 19 23:17:14 centos-aiman systemd[1]: Starting OpenVPN Robust And Highly Flexible Tunneling Application On server...
Apr 19 23:17:14 centos-aiman systemd[1]: openvpn@server.service: control process exited, code=exited status=1
Apr 19 23:17:14 centos-aiman systemd[1]: Failed to start OpenVPN Robust And Highly Flexible Tunneling Application On server.
Apr 19 23:17:14 centos-aiman systemd[1]: Unit openvpn@server.service entered failed state.
Apr 19 23:17:14 centos-aiman systemd[1]: openvpn@server.service failed.
and the server.conf was :
port 1337
proto udp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh1024.pem
server 192.168.200.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
duplicate-cn
keepalive 20 60
comp-lzo
persist-key
persist-tun
daemon
log-append /var/log/myvpn/openvpn.log
verb 3
Any help Appreciated
i am new to linux ( especially Centos )
im follow the tutorial below on this site : https://www.howtoforge.com/tutorial/how ... -centos-7/
its include :
Enable the epel-repository in CentOS.
Install openvpn, easy-rsa and iptables.
Configure easy-rsa.
Configure openvpn.
Disable firewalld and SELinux.
Configure iptables for openVPN.
Start openVPN Server.
Setting up the OpenVPN client application.
but i cant start OpenVPN
when i running the command " systemctl status openvpn@server.service "
i receive message below :
● openvpn@server.service - OpenVPN Robust And Highly Flexible Tunneling Application On server
Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2016-04-19 23:17:14 WIB; 4min 5s ago
Process: 4660 ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf (code=exited, status=1/FAILURE)
Apr 19 23:17:14 centos-aiman systemd[1]: Starting OpenVPN Robust And Highly Flexible Tunneling Application On server...
Apr 19 23:17:14 centos-aiman systemd[1]: openvpn@server.service: control process exited, code=exited status=1
Apr 19 23:17:14 centos-aiman systemd[1]: Failed to start OpenVPN Robust And Highly Flexible Tunneling Application On server.
Apr 19 23:17:14 centos-aiman systemd[1]: Unit openvpn@server.service entered failed state.
Apr 19 23:17:14 centos-aiman systemd[1]: openvpn@server.service failed.
and the server.conf was :
port 1337
proto udp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh1024.pem
server 192.168.200.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
duplicate-cn
keepalive 20 60
comp-lzo
persist-key
persist-tun
daemon
log-append /var/log/myvpn/openvpn.log
verb 3
Any help Appreciated
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: Cannot start openvpn
Start openvpn like so:
and watch for errors in the terminal .. also check your log @ /var/log/myvpn/openvpn.log
Code: Select all
$ sudo openvpn --config /path/to/server.conf-
dklaintea
- OpenVpn Newbie
- Posts: 2
- Joined: Tue Apr 19, 2016 4:23 pm
Re: Cannot start openvpn
didTraffic wrote:Start openvpn like so:and watch for errors in the terminal .. also check your log @ /var/log/myvpn/openvpn.logCode: Select all
$ sudo openvpn --config /path/to/server.conf
sudo openvpn --config /path/to/server.conf
but nothing appear
and here is what's on openvpn.log
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
-
dddango
- OpenVpn Newbie
- Posts: 1
- Joined: Mon Aug 08, 2016 3:14 pm
Re: Cannot start openvpn
Hi!dklaintea wrote: Options error: --dh fails with '/etc/openvpn/keys/dh1024.pem': No such file or directory
Options error: --ca fails with '/etc/openvpn/keys/ca.crt': No such file or directory
Options error: --cert fails with '/etc/openvpn/keys/server.crt': No such file or directory
Options error: --key fails with '/etc/openvpn/keys/server.key': No such file or directory
Options error: Please correct these errors.
Use --help for more information.
Just recheck file locations for .pem .crt and .key files.
Files are probably in wrong folder.
-
thedelorean89
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Oct 26, 2016 2:42 pm
Re: Cannot start openvpn
I am having a similar to OP.
My error is as follows:
[oconf=]
[root@Centreon-Central openvpn]# sudo openvpn --config /etc/openvpn/server.conf
Options error: Unrecognized option or missing parameter($) in /etC/openvpn/server.conf:305: □kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd (2.3.12)
Use --help for more information.
[root@Centreon-Central openvpn]#
[/oconf]

Any thoughts?
My error is as follows:
[oconf=]
[root@Centreon-Central openvpn]# sudo openvpn --config /etc/openvpn/server.conf
Options error: Unrecognized option or missing parameter($) in /etC/openvpn/server.conf:305: □kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd (2.3.12)
Use --help for more information.
[root@Centreon-Central openvpn]#
[/oconf]
Any thoughts?
-
TinCanTech
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Cannot start openvpn
Did you read the error message ?thedelorean89 wrote:Options error: Unrecognized option or missing parameter($) in /etC/openvpn/server.conf:305: □kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd (2.3.12)
- File: /etC/openvpn/server.conf
- Line: 305
- Option: □kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd□kd
-
thedelorean89
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Oct 26, 2016 2:42 pm
Re: Cannot start openvpn
lol ... I checked the file. When I was editing it in vi apparently I added some text to the end of the file. I corrected those, and then the service failed again. Same error as above.
I had trouble with the easy-rsa part as it is not a part of the openvpn RPM anymore.
Where should the certs be located?
I had trouble with the easy-rsa part as it is not a part of the openvpn RPM anymore.
Where should the certs be located?
-
TinCanTech
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
