Page 1 of 1
[solved] OpenVPN 2.5 server process closes on user logout
Posted: Sat Jun 26, 2021 10:28 am
by DaveG_NZ
I've installed Openvpn 2.5 on a Windows Server 2012 system using the default install options. All of the configs and certs are setup OK. On the install notes it says to use Openvpn Gui to start the server, which it does and the openvpn server runs fine and accepts connections.
The problem I have is that when the windows user account that ran Openvpn gui is logged off, the openvpn server shuts down and connections stop.
The installation was done from a windows server admin account and the same account is used when running the gui to start the openvpn server.
This isn't my first openvpn server install, but it is the first using the interactive service and google hasn't revealed what I'm missing here.
Re: OpenVPN 2.5 server process closes on user logout
Posted: Sat Jun 26, 2021 4:12 pm
by 300000
User logged off so network logged off too so how openvpn can connect anyway? What do you expect ? That is how Windows works and there is nothing openvpn can do. If you want you need to running it as windows service all the time connect.
Re: OpenVPN 2.5 server process closes on user logout
Posted: Sat Jun 26, 2021 4:40 pm
by TinCanTech
la signification de l'interface graphique est l'interface utilisateur graphique
Re: OpenVPN 2.5 server process closes on user logout
Posted: Sun Jun 27, 2021 12:22 am
by DaveG_NZ
300000 wrote: ↑Sat Jun 26, 2021 4:12 pm
User logged off so network logged off too so how openvpn can connect anyway? What do you expect ? That is how Windows works and there is nothing openvpn can do. If you want you need to running it as windows service all the time connect.
I'm trying to setup openvpn to run as a service on the server 2012.
So far, I've tried:
putting the config file in the config-auto folder and restarting the OpenvpnService service
running a task that runs openvpn-gui.exe --connect server.ovpn
Neither seem to start the service with the required config ie. I can't connect to the vpn from my PC client
The only thing that does work is running openvpn-gui from a user login on the server and selecting the connect option. That works fine and I can connect to the vpn from my PC. But as soon as the user is logged out on the windows server the connection drops.
Re: OpenVPN 2.5 server process closes on user logout
Posted: Sun Jun 27, 2021 12:29 am
by DaveG_NZ
TinCanTech wrote: ↑Sat Jun 26, 2021 4:40 pm
la signification de l'interface graphique est l'interface
utilisateur graphique
agreed, I should have made it clear in my OP that I'm trying to run openvpn as a service but haven't been successful yet.
Re: OpenVPN 2.5 server process closes on user logout
Posted: Sun Jun 27, 2021 12:57 am
by TinCanTech
You are aware that Openvpn generates a log where progress is recorded ?
I call it the log pile ..
Re: OpenVPN 2.5 server process closes on user logout
Posted: Sun Jun 27, 2021 1:24 am
by DaveG_NZ
OK, I've resolved the problem. Among the many troubleshooting steps I tried, I had changed the logon setting of the openvpn service to use a local admin account, after changing it back to use the local system account it picked up the config from config-auto folder and has started the vpn service successfully. Sorry for the noise.
Re: OpenVPN 2.5 server process closes on user logout
Posted: Sun Jun 27, 2021 1:34 am
by DaveG_NZ
TinCanTech wrote: ↑Sun Jun 27, 2021 12:57 am
You are aware that Openvpn generates a log where progress is recorded ?
I call it the
log pile ..
Yes, but I was looking in the user profile dir for the logs and omitted to check the log in the Program Files Openvpn folder where it said that wintun required system privileges. Running the service under an admin user login wasn't acceptable but using local system account was OK.