I am on Ubuntu 18.04 and I would like to set up a VPN.

I found the thread What's a good free VPN for Ubuntu? and did the option suggested by pvaesrtdoe, the top answer.

After, I tried turning on the VPN, which, after ~30 seconds, resulted in a connection failed message from Ubuntu.

Next, I tried as suggested by Gannet in this thread. I entered the command line (after cd'ing the correct directory and getting the file name and login info):

sudo openvpn vpn_file.ovpn

This is the output I got after inputting the requested info (received from VPNBook):

Sun Sep  9 17:24:09 2018 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Sun Sep  9 17:24:09 2018 NOTE: --fast-io is disabled since we are not using UDP
Sun Sep  9 17:24:09 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]
Sun Sep  9 17:24:09 2018 Socket Buffers: R=[87380->87380] S=[16384->16384]
Sun Sep  9 17:24:09 2018 Attempting to establish TCP connection with [AF_INET] [nonblock]
Sun Sep  9 17:24:10 2018 TCP: connect to [AF_INET] failed: Connection refused
Sun Sep  9 17:24:10 2018 SIGUSR1[connection failed(soft),init_instance] received, process restarting
Sun Sep  9 17:24:10 2018 Restart pause, 5 second(s)

How does one set up VPNBook on Ubuntu 18.04?

  • TCP: connect to [AF_INET] failed: Connection refused – Looks like the VPN server refuses the connection. Please review the server address and port and make sure that there really is a VPN service running. (I’ll write a proper answer if somebody notifies me when this question reopened.) Commented Sep 11, 2018 at 7:39

1 Answer 1


Just download any of openvpn zips from vpnbook web page. Unpack it. Run in terminal the following: sudo openvpn vpn_file.ovpn and enter the password on ask. That's it.

  • I edit my question after trying out the method Commented Sep 10, 2018 at 0:29
  • I shows Connection refused from another side. Is your vpn-file freshly downloaded from vpnbook site?
    – Gannet
    Commented Dec 29, 2018 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .