I'm total newbie regarding openvpn server, but I've followed a guide, and it seems to work, but I couldn't connect to it.
Upon checking the log, I saw this strange behavior:
(Yeah, I'm aware of the warning about the local IP, but that can't be the reason it starts and stops all the time..)
Jan 15 14:07:39 Vpnserver systemd[1]: Stopped OpenVPN connection to server.
Jan 15 14:07:39 Vpnserver systemd[1]: Starting OpenVPN connection to server...
Jan 15 14:07:39 Vpnserver ovpn-server[7961]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
Jan 15 14:07:39 Vpnserver systemd[1]: Started OpenVPN connection to server.
Jan 15 14:07:39 Vpnserver ovpn-server[7961]: NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Jan 15 14:07:44 Vpnserver systemd[1]: Stopped OpenVPN connection to server.
Jan 15 14:07:44 Vpnserver systemd[1]: Starting OpenVPN connection to server...
Jan 15 14:07:44 Vpnserver ovpn-server[7976]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
Jan 15 14:07:44 Vpnserver systemd[1]: Started OpenVPN connection to server.
Jan 15 14:07:44 Vpnserver ovpn-server[7976]: NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Jan 15 14:07:50 Vpnserver systemd[1]: Stopped OpenVPN connection to server.
Jan 15 14:07:50 Vpnserver systemd[1]: Starting OpenVPN connection to server...
Jan 15 14:07:50 Vpnserver ovpn-server[7991]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
Jan 15 14:07:50 Vpnserver systemd[1]: Started OpenVPN connection to server.
Jan 15 14:07:50 Vpnserver ovpn-server[7991]: NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Jan 15 14:07:55 Vpnserver systemd[1]: Stopped OpenVPN connection to server.
Jan 15 14:07:55 Vpnserver systemd[1]: Starting OpenVPN connection to server...
Jan 15 14:07:55 Vpnserver ovpn-server[8006]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
Jan 15 14:07:55 Vpnserver systemd[1]: Started OpenVPN connection to server.
Jan 15 14:07:55 Vpnserver ovpn-server[8006]: NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Here are my server.conf (I stripped out all comments to save space here..)
port 4949
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
push "dhcp-option DNS 46.227.67.134"
push "dhcp-option DNS 192.165.9.158"
keepalive 10 120
tls-auth ta.key 0
cipher AES-256-CBC
auth SHA256
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
verb 3
explicit-exit-notify 1
Running Linux Ubuntu 18.04lte mini