Hi, I set up an open vpn through Linode. Checking the IP address shows me that it goes back to the local one intermittently. I’m not sure if this is just when the computer sleeps as I only noticed it recently. I’m using Ubuntu. When it goes back to local, what’s happened is that the toggle button in the settings under VPN has turned off. All I have to do to get it working again is toggle it back on, but this is annoying and more importantly would seem to compromise privacy since it’s always going off. Is there a way to set that so it doesn’t turn off?
It may be the case that your power options turn off your wifi when the computer sleeps and when it comes back on OpenVPN is not yet set up to turn on automatically.
We can fix this issue for sure, which Linux desktop are you using on Ubuntu? Gnome, KDE, Cinnamon?
I believe the default is Gnome, so if that is indeed your case to activate the VPN to automatically connect to your network adapter type the following command in a terminal window:
This will bring up a screen where you can select your WIFI adapter’s general settings tab. Then check the box that is titled ‘Automatically connect to VPN’
This should fix this problem for you, and if not please let us know.
Hi @mva, I don’t use wifi; I’m wired at the house. I’m using Ubuntu, which I just just installed on my main laptop!! Meaning officially off of windows. I’ve been learning on a different laptop for a while now, so that’s exciting. BUT my root password also isn’t working (or because I now have 50 million passwords, I’m getting it wrong; I tried about 20). Not to mention, I can’t get my thunderbird set up on the “new” computer today. So I am really pulling my hair out. So if it’s not wifi, any other thoughts?
I’m sorry that I assumed you are using a Wifi connection, but this same behavior also applies to the wired ethernet connections as well. Are you able to run the sudo nm-connection-editor command?
There should also be an option there named ‘Wired’ where you can check the vpn auto connect option there too.
I am going to boot up my ubuntu laptop now so I can post a proper screenshot for you from there.
Does your local (non-root) userid have sudo privileges? If so, then you will not need the root password for tasks like these, however you may still need to know that password for other tasks though.
I made a typo in my original post and I corrected it, as the terminal command should be:
this should bring up this window
then clicking on the wired connection will bring up
Where you can click on the automatic box for the VPN connection. (I don’t have one set up here, but you should see your VPN name in the box once its checked. Then hit Save and you should be good to go.
@mva, you’re the best!! That worked wonderfully. Thank you!!
I’m happy that I was able to help and good luck on your Linux journey.
If you are a member of the Jeff and Vasileios Linux Beginners LMS classes, there is a workshop #051 where @vasileios does a wonderful job teaching us to further enhance the Gnome environment with a few very nice extensions. A handy one that he mentions is “IP Finder” which nicely shows some info about your VPN right on the menu bar. If you are not in this course, let me know and I can walk you through it if you are interested.
@mva I am in the course. I’ll make a note of it and check it out for sure!
I remember seeing the auto vpn connect options when I was trying different distros, now I am on Ubuntu, I was looking for it. Thank you for the very help instructions! Next, go watch LMS 051 for the IP Finder thing.
Thank you @mva and @Ai for helping her out as my time has been packed with the NextCloud Hub II. I think you are going to like this one, as I intentionally ran the entire process for that LMS 6 times. Personal and private files are extremely important, so I wanted the deployment to have zero issues. Which, I’m happy to say, has been accomplished (I tested the security setting of the NextCloud and came up as A+).
Down to the VPN.
I recently switched several of my devices to a VPS-powered VPN solution as well. I now use commercial ones even less, since they love to be forced out of the intended location. This came to me when I encountered issues connecting to Truth Social. In one of my tests, I found out my location was Moscow(!).
Usually, I wouldn’t think about something like this much, but when it comes to you guys, it’s extremely important. The reason is a certain three-letter agency (you all know which monitors comms). Once a US citizen is routed outside the US, they become a legitimate target for monitoring. They can’t do it when the comms are domestic. Hence I’ve been looking into it more - and have been in contact with VPN providers. The issue is a bit more complicated and my currently available time is a bit limited to go into details.
Therefore, a VPN that stays domestic is important. And a VPS VPN does exactly that. Hence course 17 of the LMS is important nowadays.
During my breaks, I’ve been delving into converting the VPN connection into a systemd service, which is always on. I have performed a similar task for my RHEL workstation, but for Nord. Once I get some extra time, I will dissect it for the OpenVPN protocol (and for the VPS), so that it stays on. In short, I made it run continuous tests every few moments to check the status of the VPN. And if it detects a disconnection, it resumes it immediately.
Another task I’ve been getting myself accustomed to is the Cron Jobs. Those are periodical checks and executions that are done in the background. That’s another way of looking at it - and I was able to play with them more lately. In short, I am including such a task for automatically renewing SSL certificates for your upcoming NextCloud Server. Thus, this is something you can learn from too.
I will keep on diving deeper into the cyber security aspects and letting you know my findings.
@vasileios, always appreciate how diligent you are when it comes to helping us!
When I picked the VPS, I simply followed Rob Braxman’s advice and stayed in the States. I didn’t know about the issue in using a foreign VPS.
About keeping the VPN up at all times. I used the command @mva provided and set up the auto VPN connections, then installed IP Finder with instructions from LMS 051 (It wouldn’t work with Brave from flatpak nor snap, I had to do manual install). Haven’t seen it dropped at all. Super cool!
Always learning new things with Linux!
You ladies and gentlemen make it possible for me to keep on moving!
If I were in Greece, I’d probably have given up by now. However, I’ve seen the spirits of Americans and you are second to none. I admit it.
After I deploy the NextCloud course, I intend to start a live-stream on Rumble to address Q&A and take things further. I already set up the account for that.