I am going to setup a VPN Server
on Centos 7
VPS, running as Docker container. However, after installing OpenVPN
and configuring it, I see the server status failed:
This is my server.conf file:
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
And this is what written in messages
file in var/log/ after run command below:
systemctl start [email protected]
Oct 7 08:35:39 systemd: Cannot add dependency job for unit systemd-vconsole-setup.service, ignoring: Unit is masked.
Oct 7 08:35:39 systemd: Starting OpenVPN Robust And Highly Flexible Tunneling Application On server...
Oct 7 08:35:39 openvpn: Fri Oct 7 08:35:39 2022 OpenVPN 2.4.12 x86_64-redhat-linux-gnu [Fedora EPEL patched] [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar 17 2022
Oct 7 08:35:39 openvpn: Fri Oct 7 08:35:39 2022 library versions: OpenSSL 1.0.2k-fips 26 Jan 2017, LZO 2.06
Oct 7 08:35:39 openvpn: Fri Oct 7 08:35:39 2022 Diffie-Hellman initialized with 2048 bit key
Oct 7 08:35:39 openvpn: Fri Oct 7 08:35:39 2022 ROUTE_GATEWAY ON_LINK IFACE=venet0 HWADDR=00:00:00:00:00:00
Oct 7 08:35:39 openvpn: Fri Oct 7 08:35:39 2022 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Oct 7 08:35:39 openvpn: Fri Oct 7 08:35:39 2022 Exiting due to fatal error
Oct 7 08:35:39 systemd: Started OpenVPN Robust And Highly Flexible Tunneling Application On server.
Oct 7 08:35:39 systemd: [email protected]: main process exited, code=exited, status=1/FAILURE
Oct 7 08:35:39 systemd: Unit [email protected] entered failed state.
Oct 7 08:35:39 systemd: [email protected] failed.