Score:0

Launch openvpn SERVER (not client) on startup with no password prompts

vu flag

I currently have an openvpn server setup on my desktop so that I can use it while traveling. Everything works and I can connect to it from my laptop from different networks.

If my house loses power I've set my computer to automatically restart. After it does that, I need it to launch the openvpn server without asking for a password like it currently does so that I can enter my password at the ubuntu login screen and continue using my computer remotely.

This seems like it should be a standard thing to discuss, but I haven't been able to find anything on it. I followed the guide here to setup openvpn. And I have only been able to find information online about using auth-user-pass on the client-side to automatically connect to a server. The same option can't be used on the server-side.

Is what I'm asking for even possible? Or is this disabled for some security reasons? If it's possible, how can I pull it off?

Info: I am using Ubuntu 20, and installed openvpn with sudo apt install openvpn

ar flag
Please add the following information [in your question](https://askubuntu.com/posts/1447061/edit): the version of Ubuntu you are using, and how you installed openvpn. It should be installed as a service, which should start when the computer boots. You may have installed it incorrectly. The best way to install is to install from the Ubuntu repository.
MaanDoabeDa avatar
vu flag
Thanks! I could check to see if the process is running on startup, it probably is. But just having openvpn process running doesn't mean that the particular server I have setup will be running, correct? That would still need to be launched in some way, and it will ask me for a password, I believe
Organic Marble avatar
us flag
I installed openvpn server using this tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-and-configure-an-openvpn-server-on-ubuntu-20-04 I don't have to do anything to start the server. It starts when the machine boots
MaanDoabeDa avatar
vu flag
@OrganicMarble Thank you!! That is a very useful guide. The key step seems to be using the `nopass` option in `./easyrsa gen-req server nopass` so that a password is not required to launch the server. There is just one problem that I have to get past the Ubuntu login screen before the server is launched. So it doesn't fully solve the problem of using my computer remotely if the power goes out. Any ideas how to solve that last problem?
MaanDoabeDa avatar
vu flag
@OrganicMarble Please mention the `nopass` option and that link to that tutorial in an answer and I'll be happy to accept it.
Organic Marble avatar
us flag
To get past the login screen you need to set the computer to autologin. How you do that depends on what flavor of Ubuntu you are using. There are many questions on this site about that already.
MaanDoabeDa avatar
vu flag
Just for completeness, a quick search for Ubuntu auto login yields [this](https://help.ubuntu.com/stable/ubuntu-help/user-autologin.html.en)
Score:0
vu flag

Thanks to @OrganicMarble for pointing out this tutorial from Digital Ocean.

The key step seems to be using the nopass option in ./easyrsa gen-req server nopass so that a password is not required to launch the server.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.