I used this script to configure openvpn on my work computer: https://github.com/angristan/openvpn-install
Systemd service didn't work at first because the default directory for server configuration changed to /etc/openvpn/server and I also had to change the log file to /var/log/openvpn/openvpn-status.log due to a SELINUX issue. I made those changes and the openvpn service started sucessfully.
I checked that the process is listening on my chosen port:
# lsof -i -P -n | grep 4000
openvpn 156770 nobody 9u IPv4 5541500 0t0 UDP *:4000
I copied the ovpn file to my home computer (also running Fedora 31) and executed it with openvpn:
$ openvpn Desktop/HomeDesktopFedora.ovpn
Fri Nov 15 08:28:03 2019 Unrecognized option or missing or extra parameter(s) in Desktop/HomeDesktopFedora.ovpn:17: block-outside-dns (2.4.8)
Fri Nov 15 08:28:03 2019 OpenVPN 2.4.8 x86_64-redhat-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Nov 1 2019
Fri Nov 15 08:28:03 2019 library versions: OpenSSL 1.1.1d FIPS 10 Sep 2019, LZO 2.08
Fri Nov 15 08:28:03 2019 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Fri Nov 15 08:28:03 2019 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Nov 15 08:28:03 2019 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Fri Nov 15 08:28:03 2019 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Fri Nov 15 08:28:03 2019 TCP/UDP: Preserving recently used remote address: [AF_INET][MY_OPENVPN_SERVER_IP]:4000
Fri Nov 15 08:28:03 2019 Socket Buffers: R=[212992->212992] S=[212992->212992]
Fri Nov 15 08:28:03 2019 UDP link local: (not bound)
Fri Nov 15 08:28:03 2019 UDP link remote: [AF_INET][MY_OPENVPN_SERVER_IP]:4000
Fri Nov 15 08:29:03 2019 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Fri Nov 15 08:29:03 2019 TLS Error: TLS handshake failed
Fri Nov 15 08:29:03 2019 SIGUSR1[soft,tls-error] received, process restarting
I also checked if the 4000/udp port is open, and it seems to be ok.
$ nc -z -v -u [MY_OPENVPN_SERVER_IP] 4000
Ncat: Version 7.80 ( https://nmap.org/ncat )
Ncat: Connected to [MY_OPENVPN_SERVER_IP]:4000.
Ncat: UDP packet sent successfully
Ncat: 1 bytes sent, 0 bytes received in 2.01 seconds.
However I'm not sure if the command above is right, I don't know if it's possible to check if a udp port is open because as far as I know it wouldn't send a confirmation package back. I know the 4000/tcp port is closed, would it be required to be open even if I'm using udp?
Now I'm not sure how to proceed to find out what's going wrong.