OS: Centos 7 VMWare
Hi There
I am new to Linux
I follow the instruction below:
Install the Epel package:
Rpm –Uvh
https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel_release-7-5.noarch.rpm
Install OpenVPN:
Yum install openvpn
Install easy-rsa
Yum install easy-rsa
Copy the easy-rsa to openvpn
cp –R /usr/share/easy-rsa/ /etc/openvpn
Clean the current certificate if any exist and generate a new one:
cd /etc/openvpn/easy-rsa/2.0
source ./vars
./clean-all
./build-ca
./build-key-server server
./build-key client
./build-dh
vi /etc/openvpn/server.conf
systemctl -f enable
openvpn@server.service
I cannot start openvpn
as soon as I run
systemctl start
openvpn@server.service
I receive therroe message below:
Job for
openvpn@server.service failed. See 'systemctl status
openvpn@server.service' and 'journalctl -xn' for details
running systemctl status
openvpn@server.service
[root@localhost openvpn]# systemctl status
openvpn@server.service
openvpn@server.service - OpenVPN Robust And Highly Flexible Tunneling Application On server
Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled)
Active:
failed (Result: exit-code) since Tue 2015-08-25 16:03:26 EDT; 2min 0s ago
Process: 5475 ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
(code=exited, status=1/FAILURE)
Aug 25 16:03:26 localhost.localdomain systemd[1]: Starting OpenVPN Robust And Highly Flexible Tunneling Application On server...
Aug 25 16:03:26 localhost.localdomain openvpn[5475]:
Options error: --server directive network/netmask combination is invalid
Aug 25 16:03:26 localhost.localdomain openvpn[5475]: Use --help for more information.
Aug 25 16:03:26 localhost.localdomain systemd[1]:
openvpn@server.service: control process exited, code=exited status=1
Aug 25 16:03:26 localhost.localdomain systemd[1]:
Failed to start OpenVPN Robust And Highly Flexible Tunneling Application On server.
Aug 25 16:03:26 localhost.localdomain systemd[1]: Unit
openvpn@server.service entered failed state.
=====server.conf ==========
port 1194
proto udp
dev tun
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key # This file should be kept secret
dh /etc/openvpn/easy-rsa/2.0/keys/dh2048.pem
server 192.168.100.14 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
====================