I have an openvpn server configuration but for some reason it is unable to run.
The service is at this status:
gateway@gateway:/etc/openvpn$ sudo systemctl status openvpn@VPN_server.service
● openvpn@VPN_server.service - OpenVPN connection to VPN_server
Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-06-23 11:06:40 EEST; 27min ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 26935 ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/%i.conf --writepid /run/openvpn/%i.pid (code=exited, status=1/FAILURE)
Jun 23 11:06:40 gateway systemd[1]: Starting OpenVPN connection to VPN_server...
Jun 23 11:06:40 gateway systemd[1]: openvpn@VPN_server.service: Control process exited, code=exited status=1
Jun 23 11:06:40 gateway systemd[1]: Failed to start OpenVPN connection to VPN_server.
Jun 23 11:06:40 gateway systemd[1]: openvpn@VPN_server.service: Unit entered failed state.
Jun 23 11:06:40 gateway systemd[1]: openvpn@VPN_server.service: Failed with result 'exit-code'.
I couldn't see anything helpful from the journal:
Jun 22 16:34:57 gateway systemd[1]: Starting OpenVPN connection to VPN_server...
Jun 22 16:34:58 gateway systemd[1]: openvpn@VPN_server.service: Control process exited, code=exited status=1
Jun 22 16:34:58 gateway systemd[1]: Failed to start OpenVPN connection to VPN_server.
Jun 22 16:34:58 gateway systemd[1]: openvpn@VPN_server.service: Unit entered failed state.
Jun 22 16:34:58 gateway systemd[1]: openvpn@VPN_server.service: Failed with result 'exit-code'.
Jun 22 17:02:08 gateway systemd[1]: Starting OpenVPN connection to VPN_server...
Jun 22 17:02:08 gateway systemd[1]: openvpn@VPN_server.service: Control process exited, code=exited status=1
Jun 22 17:02:08 gateway systemd[1]: Failed to start OpenVPN connection to VPN_server.
Jun 22 17:02:08 gateway systemd[1]: openvpn@VPN_server.service: Unit entered failed state.
Jun 22 17:02:08 gateway systemd[1]: openvpn@VPN_server.service: Failed with result 'exit-code'.
Jun 22 17:26:06 gateway systemd[1]: Starting OpenVPN connection to VPN_server...
Jun 22 17:26:06 gateway systemd[1]: openvpn@VPN_server.service: Control process exited, code=exited status=1
Jun 22 17:26:06 gateway systemd[1]: Failed to start OpenVPN connection to VPN_server.
Jun 22 17:26:06 gateway systemd[1]: openvpn@VPN_server.service: Unit entered failed state.
Jun 22 17:26:06 gateway systemd[1]: openvpn@VPN_server.service: Failed with result 'exit-code'.
Jun 22 17:34:14 gateway systemd[1]: Starting OpenVPN connection to VPN_server...
Jun 22 17:34:14 gateway systemd[1]: openvpn@VPN_server.service: Control process exited, code=exited status=1
Jun 22 17:34:14 gateway systemd[1]: Failed to start OpenVPN connection to VPN_server.
Jun 22 17:34:14 gateway systemd[1]: openvpn@VPN_server.service: Unit entered failed state.
Jun 22 17:34:14 gateway systemd[1]: openvpn@VPN_server.service: Failed with result 'exit-code'.
Jun 22 17:43:09 gateway systemd[1]: Stopped OpenVPN connection to VPN_server.
Jun 22 17:43:09 gateway systemd[1]: Starting OpenVPN connection to VPN_server...
Jun 22 17:43:09 gateway systemd[1]: openvpn@VPN_server.service: Control process exited, code=exited status=1
And this is what I get on logs:
Fri Jun 23 10:53:02 2023 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan 9 2019
Fri Jun 23 10:53:02 2023 library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
Fri Jun 23 10:53:02 2023 WARNING: using --duplicate-cn and --client-config-dir together is probably not what you want
Fri Jun 23 10:53:02 2023 Diffie-Hellman initialized with 2048 bit key
Fri Jun 23 10:53:02 2023 Control Channel Authentication: using '/etc/openvpn/ta.key' as a OpenVPN static key file
Fri Jun 23 10:53:02 2023 Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Jun 23 10:53:02 2023 Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Jun 23 10:53:02 2023 Socket Buffers: R=[212992->212992] S=[212992->212992]
Fri Jun 23 10:53:02 2023 ROUTE_GATEWAY 192.168.10.254/255.255.255.0 IFACE=eth2 HWADDR=14:02:ec:83:e1:98
Fri Jun 23 10:53:02 2023 TUN/TAP device tunleo opened
Fri Jun 23 10:53:02 2023 TUN/TAP TX queue length set to 100
Fri Jun 23 10:53:02 2023 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Jun 23 10:53:02 2023 /sbin/ip link set dev tunleo up mtu 1500
Fri Jun 23 10:53:02 2023 /sbin/ip addr add dev tunleo 192.168.50.1/24 broadcast 192.168.50.255
Fri Jun 23 10:53:02 2023 /sbin/ip route add 172.20.207.0/24 via 192.168.50.2
Fri Jun 23 10:53:02 2023 UDPv4 link local (bound): [AF_INET]192.168.10.2:1194
Fri Jun 23 10:53:02 2023 UDPv4 link remote: [undef]
Fri Jun 23 10:53:02 2023 MULTI: multi_init called, r=256 v=256
Fri Jun 23 10:53:02 2023 IFCONFIG POOL: base=192.168.50.2 size=252, ipv6=0
Fri Jun 23 10:53:02 2023 Initialization Sequence Completed
Fri Jun 23 10:55:54 2023 event_wait : Interrupted system call (code=4)
Fri Jun 23 10:55:54 2023 /sbin/ip route del 172.20.207.0/24
Fri Jun 23 10:55:54 2023 Closing TUN/TAP interface
Fri Jun 23 10:55:54 2023 /sbin/ip addr del dev tunleo 192.168.50.1/24
Fri Jun 23 10:55:54 2023 SIGINT[hard,] received, process exiting
Can you see what is going on? Do I need to provide any additional info?