1

I'm trying to set up an OpenVPN server on an EC2 instance. There doesn't seem to be any Ubuntu documentation for OpenVPN, so I'm mostly following the instructions here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-14-04

My Android phone reports "connection refused". Tunnelblick says "TLS handshake failed".

I would like to check that OpenVPN actually is listening on my server. But there's no OpenVPN process running - it uses systemd. And it uses UDP rather than TCP, so the usual trick of connecting with telnet doesn't work. Can anyone tell me how I can verify that OpenVPN is actually listening?

The server is running Ubuntu Trusty.

1

I got OpenVPN working. To answer my question:

There should be a server running like this:

$ ps auxww | grep openvpn
root       536  0.0  0.5  35672  5108 ?        Ss   00:47   0:00 /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/server.pid

In my case there wasn't due to a misconfiguration. It's fairly obvious, but for the record: to find openvpn problems in the syslog:

sudo service openvpn stop
sudo service openvpn start
sudo tail /var/log/syslog
| improve this answer | |
  • Glad you got it to work. Some of the Android flavors have issues with VPN connections. I had no problem with 4.2.2, a huge struggle with 5.1.1 – Organic Marble Feb 27 '17 at 2:58
  • 1
    For the record, this is working fine for me with Android 5.1 and OpenVPN for Android 0.6.63. – Matthew Exon Feb 27 '17 at 3:48
  • I got it to work with 5.1 but I had to use a different client on the droid. – Organic Marble Feb 27 '17 at 4:02
0

I have poor experience with Linux. I've the same issue. I installed openvpn server on Lubuntu 20.04. Then I generated the portasalvo.ovpn file. When I tried to connect from the client, I got the usual no answer "TSL error: TSL key negotiation failed to occour within 60 secs". From the client side I can ping the public address, both directly and via DDNS. On the server side I made an attempt to get some information. Below the output. Any hint?

salvo@salvo-Latitude-E5500:~$ sudo service openvpn stop
salvo@salvo-Latitude-E5500:~$ sudo service openvpn start
salvo@salvo-Latitude-E5500:~$ sudo tail /var/log/syslog
May 19 19:28:40 salvo-Latitude-E5500 ovpn-server[8539]: Options error: --cert fails with 'server.crt': No such file or directory (errno=2)
May 19 19:28:40 salvo-Latitude-E5500 ovpn-server[8539]: WARNING: cannot stat file 'server.key': No such file or directory (errno=2)
May 19 19:28:40 salvo-Latitude-E5500 ovpn-server[8539]: Options error: --key fails with 'server.key': No such file or directory (errno=2)
May 19 19:28:40 salvo-Latitude-E5500 ovpn-server[8539]: WARNING: cannot stat file 'ta.key': No such file or directory (errno=2)
May 19 19:28:40 salvo-Latitude-E5500 ovpn-server[8539]: Options error: --tls-auth fails with 'ta.key': No such file or directory (errno=2)
May 19 19:28:40 salvo-Latitude-E5500 ovpn-server[8539]: Options error: Please correct these errors.
May 19 19:28:40 salvo-Latitude-E5500 ovpn-server[8539]: Use --help for more information.
May 19 19:28:40 salvo-Latitude-E5500 systemd[1]: openvpn@server.service: Main process exited, code=exited, status=1/FAILURE
May 19 19:28:40 salvo-Latitude-E5500 systemd[1]: openvpn@server.service: Failed with result 'exit-code'.
May 19 19:28:40 salvo-Latitude-E5500 systemd[1]: Failed to start OpenVPN connection to server.
| improve this answer | |
  • So, I solved many problems by prefixing "/etc/openvpn/server/" to file references. Now I've a different problem, but I'll open a new question. Thanks for reading. – Salrandazzo May 20 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.