Setup openvpn does not work (SOLVED)

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jacpra

Setup openvpn does not work (SOLVED)

Post by jacpra »

Hi all, Thank you for reading
Mint 18.1, cinnamon 64bit here.
Setting up openvpn installation as described here: https://community.linuxmint.com/tutorial/view/1965
does not work
I did the Configuration with vpnbook-euro1-tcp443. exactly as it is described in ¨Method 1¨ and also exactly in ¨Method 2¨
User vpnbook
Pass:wra2ezEz
(latest password in openvpn ?)

When opening the network connections at the bottom of the screen I disable my wired connection but cannot enable the
vpnbook-euro1-tcp443.ovpn connection>

Then I disabled my gufw firewall but to no avail

How can I check what I did wrong
Thank you so much
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
phd21
Level 20
Level 20
Posts: 10103
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Setup openvpn does not work

Post by phd21 »

Hi "jacpra",

First, VPN connections work on top of, or concurrently with (along side of), your existing Internet connection from your Internet Service Provider (ISP), whomever and whatever internet access provider you are connecting to the Internet with (cable or phone company, satellite, coffee shop, restaurant, hotel, WiFi Hotspot, etc...). So, you should not disconnect from your local ISP Internet connection, or you will not have Internet service at all. While still connected to your Internet Service provider (ISP), you just click your Network Manager Icon in your system tray panel to also connect to one of the VPN server locations that you set up (imported) and want to connect with, and your system will show two connections, your local ISP and your VPN connection to whatever VPN server you chose.

The secure "openVPN" protocol and programs are already installed in all editions of Linux Mint, so you do not need to re-install those. And, after communicating with support staff at "openVPN", they told me that everyone should use the UDP openVPN protocol option.

Examples:
vpnbook-euro2-udp53.ovpn
or
vpnbook-euro2-udp25000.ovpn

How to Establish An OpenVPN Connection in Ubuntu
- newer versions of Linux Mint will automatically create the necessary certificate and key files.
http://ubuntuhandbook.org/index.php/201 ... untu-1404/

Video tutorial
https://www.youtube.com/watch?v=196_HoLIDIA

Also, do not disable your Linux software firewall, turn that back on (re-enable it).

You can verify that your VPN connection is working properly by going to "ipleak.net". I would recommend that you go to "ipleak.net" before connecting to a VPN server to see what your current normal Internet connection from your local ISP looks like, maybe print screen (screen capture) or write down the relevant information (your Current IP address and DNS Server IP Addresses (1-2 is enough), then connect to a VPN server location, refresh the "ipleak.net" web page (may need to refresh a couple times), and the information should now be different and reflect the now connected VPN server's information. From what I have read, it is recommended that everyone should restart any currently running Internet applications after connecting to a new VPN server, like restarting your browser, etc...

FYI: "vpnbook" is an excellent free system-wide VPN provider even though they only offer a few VPN servers around the world to connect to, and their password must be updated every week or so (easy to do). They do have limitations, like no P2P or torrent use. Most of my chat messaging applications will not work, or will stop working, after connecting to "vpnbook" VPN servers, except the superb "qTox" messaging application ( similar to but better than Skype) which works regardless whether I am connected to a VPN or not. That may or may not be the same for you. It is still a good idea to restart any chat messaging applications after connecting to a VPN server.

If you can afford it, I would sign up with the excellent low cost "Private Internet Access (PIA)" VPN provider, or another reliable VPN provider, where there are no limitations and they have VPN servers almost everywhere in the world. The newer versions of Linux Mint now have an even easier to install method for the "Private Internet Access (PIA)" VPN servers. "vpnbook" may also have a "paid for" VPN option as well with more features and does not require frequently resetting the password.

Hope this helps ...
LinuxMintKDE_173_VPN_Connections1sm.jpg
LinuxMintKDE_173_VPN_Connections2sm.jpg
LinuxMintKDE_173_VPN_Connections_vpngate2.jpg
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
jacpra

Re: Setup openvpn does not work

Post by jacpra »

Hi, phd21
Thank you so much for this very extensive and professional piece of advice.
Will try everything you suggested and I will keep you informed when I am successful
First of all in my netmanager I put on both the wired and vpn.
Secondly I will reconfigure with the server you suggested.

This will keep me busy
but I will definitely keep you posted phd21
jacpra

Re: Setup openvpn does not work

Post by jacpra »

Hi phd21,
I tseems that I was partly successful.
I tried the webpage they suggested in -vpnbook-http://www.vpnbook.com/howto/setup-openvpn-on-ubuntu
following the instructions :
1.) opened vpnbook directory with file: OpenVPN-US1.zip
2.) Extraced the files
3.) Did a ´sudo openvpn --config vpnbook-us1-udp25000.ovpn
4.) checked : with ípleak.com´
5.0 copy my route settings for you: It definitely shows the US1 settings


jacpra@jacpra-desktop ~ $ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.10.0.21 128.0.0.0 UG 0 0 0 tun2
default fritz.box 0.0.0.0 UG 100 0 0 enp1s5
10.8.0.0 * 255.255.255.0 U 0 0 0 tun0
10.10.0.1 10.10.0.21 255.255.255.255 UGH 0 0 0 tun2
10.10.0.21 * 255.255.255.255 UH 0 0 0 tun2
128.0.0.0 10.10.0.21 128.0.0.0 UG 0 0 0 tun2
link-local * 255.255.0.0 U 1000 0 0 tun0
192.168.178.0 * 255.255.255.0 U 100 0 0 enp1s5
us1.vpnbook.com fritz.box 255.255.255.255 UGH 0 0 0 enp1s5



I am so happy my friend phd21
jacpra@jacpra-deskto
phd21
Level 20
Level 20
Posts: 10103
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Setup openvpn does not work

Post by phd21 »

Hi "jacpra",

You are welcome.
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
phd21
Level 20
Level 20
Posts: 10103
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Setup openvpn does not work (SOLVED)

Post by phd21 »

Hi "jacpra" & Everyone else,

For your Information (FYI) 2017/01/05

LM 18.x - How to easily setup a VPN connection

You must already have a working connection to the Internet from a local Internet Service Provider (ISP) because a VPN connection works with your existing Internet connection, for example Internet service from: Cable TV company, Phone Company, Hotel / Motel, Coffee shop, some restaurants, any WiFi Hotspot, etc... .

1. First goto a VPN provider's website and download any VPN configuration files that you want or need. For an example: using "vpnbook", you could download the VPN server for connecting to a USA server (VPNBook.com-OpenVPN-US1.zip). I also recommend that you create a "vpn" folder under your "/Documents" folder to store the downloaded "openVPN" configuration files, example: if you use the free VPN provider "vpnbook", then you might consider creating a "vpn" folder and underneath that another folder "vpnbook",
"/home/username/Documents/vpn/vpnbook". Some instructions suggest using the "/etc/openvpn" folder, but that requires "root" user access.

2. Usually these vpn configuration files are downloaded in an archive file (VPNBook.com-OpenVPN-US1.zip), so you will probably have to right click the file, and choose "extract here" or "extract here autodetect sub-folder" which will create a new folder with the actual "openVPN" configuration file in it, "somewhere.ovpn".
ex: /home/user69/Documents/vpn/vpnbook/VPNBook.com-OpenVPN-US1/

3. Click the Network Manager icon in the lower right of your system tray which manages your Internet and network connections, select "Network Connections".

4. Click "+ Add" in the upper right, select from the list box options "Import a saved VPN configuration", click "Create".

5. The File Browse window will appear, browse to wherever you saved the VPN configuration file, like: "vpnbook-us1-udp25000.ovpn", and click it to select it. I recommend using the super secure "openVPN" UDP configuration files.

6. When the Edit VPN Connection screen pops up for this particular VPN server's location (If your system does not automatically bring up the edit Connection Screen, then double click your new connection), you have to then enter in your login information, your user name (for the "vpnbook" VPN provider use "vpnbook" without quotes), for the password use whatever password is appropriate ("vpnbook" changes their password every week or two, today's password is "peswU6" without quotes), the "Private Key Password" is not required - click the image to the right of that to select not required option, click save, apply, and or ok. The "Connection Type" should already be set.

Tip: If you want, you can change the "Connection Name" at the very top of your newly added VPN server location to whatever you want; this is good for making it easier to identify this VPN connection, like which country and or locality (state or city), etc... Another free VPN provider "vpngate" does not have the server's location in the name of the ".ovpn" configuration file you download, so using a folder name with the location and changing the "Connection name" to include the location makes sense, like "vpngate_usa_104.184._udp_1195".

Comment: Thank you so much to the Linux Mint 18 team and whoever else finally made it so that users did not have to manually extract from the ".ovpn" configuration file to create the 3 normally required files: CA certificate, Certificate, and Key files. This was not hard to do, but was a pain in the neck. In Linux Mint 18.x it is now automatically done. :)

7. Click "Save". You can close the "Network Connections" window, or add another VPN connection using the same method.

8. Now you have a new VPN connection. Just click the "Network Manager" icon in the system tray panel again, and under the heading "VPN Connections", double click a VPN server location to connect with; if there is only one VPN server location setup, you can also click the button to the right of "VPN Connections" to also turn on (connect) or turn off (disconnect) a VPN server connection.

Once you click to connect to a VPN server's location, you should get a message showing that it worked, and the Network Manager icon will usually show a "lock", maybe even change color. You can also click the Network Manager icon to see what the "Active" connections are, they have a "dot" next to them, and what other connections are available. When connected to a VPN, you should see two Active connections, your local Internet Service Provider (ISP), and the now connected VPN server.

I noticed that some people, including yourself "jacpra", choose to use another simple method of connecting to a VPN server location through the console terminal prompt, that is not the preferred method because that method does not usually change the "DNS name servers" which means that some of your information and what you are doing on the Internet is available to those that might be "snooping" or "monitoring" what you are doing, or worse trying to "Hack" into your system. Also, you have to manually run the command from a console terminal prompt every time you want to connect to a specific VPN server location, where as in the Network Manager it stores your VPN connections for easy access.


Hope this helps ...
Last edited by phd21 on Fri Jan 06, 2017 2:33 pm, edited 8 times in total.
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
chrisuk

Re: Setup openvpn does not work (SOLVED)

Post by chrisuk »

phd21 wrote:[...]
I noticed that some people, including yourself "jacpra", choose to use the simple method of connecting to a vpn server through the console terminal prompt, that is not the preferred method because that method does not usually change the "DNS name servers" which means that some of your information and what you are doing on the Internet is available to those that might be "snooping" or "monitoring" what you are doing.


Hope this helps ...
It's actually the other way around for most using Gnome/MATE etc, as there's a Bug in Network Manager that exposes your true IP. Many different fixes are posted online - none work for me or many others. The only sure way is to bypass Network Manager by using the Terminal... until the bug gets fixed.
phd21
Level 20
Level 20
Posts: 10103
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Setup openvpn does not work (SOLVED)

Post by phd21 »

Hi "chrisuk", & Anyone Else Interested in this,

Unless I am mistaken, according to the people who created the "openVPN" protocol and client software, they recommend using the openVPN client software through your Network Manager, NOT using the console terminal prompt for making your VPN connections, and for the reasons I explained before.

Not that you need to do this, but anyone can update their "openVPN" software to the newest editions using their instructions in the link below. I recommend using their "Stable" instructions.
https://community.openvpn.net/openvpn/w ... twareRepos

To update the Linux Mint openVPN programs, from a console terminal prompt type or copy and paste the lines below one by one:

Code: Select all

sudo -s

Code: Select all

wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg|apt-key add -
Linux Mint 17.x (Ubuntu 14.04 Trusty) Stable OpenVPN

Code: Select all

echo "deb http://build.openvpn.net/debian/openvpn/stable trusty main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
Linux Mint 18.x (Ubuntu 16.04 Xenial) Stable OpenVPN

Code: Select all

echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list

Code: Select all

sudo apt-get update && apt-get install openvpn
Then, exit or close your console terminal window. then, restart your computer or at least logout and log back in.


"OpenVPN" and others also recommend installing "easy-rsa" from the Software Manager or Synaptic Package Manager.


FYI: In my Linux Mint KDE 17.x or 18.x, my VPN connections and the updating the DNS server information from the VPN connection do work properly through the Network Manager, but not from the console terminal prompt. I still manually change my local ISP's DNS server addresses to safe and secure ones.

I also recommend, and so do others, that everyone change their local ISP connection's DNS Name Servers from the default Automatic ones from your ISP to more secure ones from a neutral safe DNS provider, like "opennic project", "dns.watch", "openDNS", etc... Then, regardless whether you connect to a VPN server or not, you are still more secure, and if you are using a VPN connection that for whatever reason is showing (leaking) your default DNS server IP addresses, they will still be from the secure safe DNS server IP addresses that you entered. It is in my humble opinion that using a reliable VPN provider servers and changing the default ISP DNS server IP addresses is the safest way to surf the Internet.

DNS.Watch - Free Secure DNS servers for everyone.
https://dns.watch/index

IPv4: 84.200.69.80,84.200.70.40

IPv6: 2001:1608:10:25::1c04:b12f,2001:1608:10:25::9249:d69b

Procedure to change your DNS Name Servers on your Local ISP Connection:

-> Linux Mint Cinnamon, Mate, Xfce?: Click the Network Manager icon in your system tray panel, click Network Connections, click or double click your local ISP connection that connects you to the Internet (wired or wireless), edit that connection, click the IPv4 tab, change "Method" to Automatic Addresses Only, on the "DNS Servers" line, enter in 2 (or more) DNS Server IP addresses separated by a comma, for example: 84.200.69.80,84.200.70.40, click ok, then restart your computer. With some Linux Mint editions and versions, you can enter in one DNS Server IP address, click the + add button below to add another DNS server IP address, and so on, click apply, ok, or save when done. At this time, you could click the Network Manager icon and just disconnect from your local ISP, wait 12-20 seconds, then re-connect, but I think it is better to restart your computer.

FYI: Most people would just change the IPv4 settings, but if you use IPv6, you can change those settings as well in the same way, only click the IPv6 tab, change "Method" to Automatic Addresses Only, enter in 2 (or more) DNS Server IP addresses, just be sure to use IPv6 DNS Server addresses, like that below, click apply, or ok, or save.
2001:1608:10:25::1c04:b12f,2001:1608:10:25::9249:d69b

-> Linux Mint KDE users can click the Network Manager icon, then click the "wrench" tool to the right of their ISP's connection (usually the first entry listed) to edit that in the same manner as described above.


Hope this helps ...
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
jacpra

Re: Setup openvpn does not work (SOLVED)

Post by jacpra »

I also have reinstalled openvpn packages and reinstalled :
sudo apt-get install openvpn network-manager-openvpn network-manager-vpnc
There is still ¨vpn connection failed" because of timeouts ??
ip route command shows:

jacpra@jacpra-desktop ~ $ ip route
default via 192.168.178.1 dev enp1s5 proto static metric 100
169.254.0.0/16 dev enp1s5 scope link metric 1000
172.27.224.0/23 dev as0t0 proto kernel scope link src 172.27.224.1
172.27.226.0/23 dev as0t1 proto kernel scope link src 172.27.226.1
172.27.228.0/23 dev as0t2 proto kernel scope link src 172.27.228.1
172.27.230.0/23 dev as0t3 proto kernel scope link src 172.27.230.1
172.27.232.0/23 dev as0t4 proto kernel scope link src 172.27.232.1
172.27.234.0/23 dev as0t5 proto kernel scope link src 172.27.234.1
172.27.236.0/23 dev as0t6 proto kernel scope link src 172.27.236.1
172.27.238.0/23 dev as0t7 proto kernel scope link src 172.27.238.1
192.168.178.0/24 dev enp1s5 proto kernel scope link src 192.168.178.21 metric 100

My own ip address is: 91.119.202.3

I am completely at a loss

Thank you all for reading
jacpra

Re: Setup openvpn does not work (SOLVED)

Post by jacpra »

To phd21,
Today I tried openvpn config: vpnbook-de233-tcp80.ovpn
and miraculously it works.
Now I have with network icon a ¨lock¨ symbol .
and the vpn connection is holding :D

Thank you all that helped me

jackson
phd21
Level 20
Level 20
Posts: 10103
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Setup openvpn does not work (SOLVED)

Post by phd21 »

Hi "jacpra",

Glad to hear that you have it working now.

The other VPN servers should work now too.
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
jacpra

Re: Setup openvpn does not work (SOLVED)

Post by jacpra »

To phd21, Yes now the vpn connect is stable.
Now I am using vpnbook-ca1-tcp80"which is also stable.

I am happy and content, definitely not without your professional help

jacpra
phd21
Level 20
Level 20
Posts: 10103
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Setup openvpn does not work (SOLVED)

Post by phd21 »

Hi "jacpra",

You are welcome again.

Although the openVPN TCP option works, the openVPN developers support staff told me in an email that they recommended using the "UDP" VPN setup option because of a problem with TCP.

See #7 in the link below
https://docs.openvpn.net/how-to-tutoria ... ty-issues/
Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
Pat D

Re: Setup openvpn does not work (SOLVED)

Post by Pat D »

So what does it mean when the little "lock" icon stops appearing when connected to your VPN?
The connection still shows safe at ipleak.net and dnsleaktest.com, but why is it AWOL?

Asking that helped me rephrase my search and i found:

https://github.com/linuxmint/Cinnamon/issues/5527
Locked

Return to “Software & Applications”