hi, i follow a guide online(
https://kifarunix.com/install-and-setup-openvpn-server-on-ubuntu-20-04/) on howto setup OpenVPN on Ubuntu, that could enable us to create different cert for different user. Hv follow and complete the setup(except the UFW) part as plan to use Iptables after everything is done and works. I manually copy the crt/key files into the ovpn file as that guide didn't teach or hv a script for generating the ovpn. Any help would be appreciate. Below is my ovpn file.Thanks!
The error(on OpenVPN client):
Sat Jul 04 21:20:22 2020 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sat Jul 04 21:20:22 2020 TLS Error: TLS handshake failed
I suspect maybe the path is incorrect, so i change and put the full path. I am on a vps using Ubuntu 20.04
port 1194
proto udp
dev tun
ca /etc/openvpn/server/ca.crt
cert /etc/openvpn/server/issued/server.crt
key /etc/openvpn/server/private/server.key # This file should be secret
dh /etc/openvpn/server/dh.pem
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 192.168.2.11"
client-to-client
keepalive 10 120
tls-auth ta.key 0 # This file is secret
cipher AES-256-CBC
comp-lzo
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
log-append /var/log/openvpn/openvpn.log
verb 3
explicit-exit-notify 1
auth SHA512
client
dev tun
proto udp
remote 103.102.46.220 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
auth SHA256
key-direction 1
comp-lzo
#copy from ca.crt
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
#copy from user1.crt
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
#copy from user1.key
<key>
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
</key>
#copy from ta.key
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-auth>