Autostart on Windows Server 2012
Posted: Thu Nov 18, 2021 4:07 pm
Hello!
I have installed OpenVPN on a Windows Server 2012 R2 Standard a long time ago.
It is working. The client can connect if I start the service with the gui on the server.
But I have to start manualy the OpenVPN server in the OpenVPN GUI from time to time.
My problem: Autostart
I found this ressource: https://openvpn.net/community-resources ... m-startup/
Now my questions are:
1. Do I need a sheduled task that for the VPN service starts or is it enough to set the start-type of "OpenVPN Interactive Service" and "OpenVPNService" to automatic? I want that the service is always running that for the client can connect at every time. (and I want that it runs, too, when no one is logged in)
2. Do I need to close the OpenVPN GUI that for the service(s) can start/run? There is an open connection in the GUI. (I have started manualy this connection in the GUI with the normal /config folder) I hope on a reboot/etc I dont need to open the connection manualy again. I hope it starts automaticly.
3. I have copied the .ovpn configuration file to C:\Program Files\OpenVPN\config-auto. Do I have to copy .crt/.key Files to the config-auto folder? In the configuration file all files are linked with the complete path. Thats why I think I dont have to. But only the ta.key file is linked without complete path. (here is the line: "tls-auth ta.key 0 # This file is secret") I've copied it to the config-auto folder. Can I delete it from the config-auto folder?
Im very thankful for answers! And I wish a good week!
Goodfred
P.S.: In the past I've set the start-type of the services to automatic. Today I found out that I need a .ovpn file in the config-auto folder. I hope that it works now.
I have installed OpenVPN on a Windows Server 2012 R2 Standard a long time ago.
It is working. The client can connect if I start the service with the gui on the server.
But I have to start manualy the OpenVPN server in the OpenVPN GUI from time to time.
My problem: Autostart
I found this ressource: https://openvpn.net/community-resources ... m-startup/
Now my questions are:
1. Do I need a sheduled task that for the VPN service starts or is it enough to set the start-type of "OpenVPN Interactive Service" and "OpenVPNService" to automatic? I want that the service is always running that for the client can connect at every time. (and I want that it runs, too, when no one is logged in)
2. Do I need to close the OpenVPN GUI that for the service(s) can start/run? There is an open connection in the GUI. (I have started manualy this connection in the GUI with the normal /config folder) I hope on a reboot/etc I dont need to open the connection manualy again. I hope it starts automaticly.
3. I have copied the .ovpn configuration file to C:\Program Files\OpenVPN\config-auto. Do I have to copy .crt/.key Files to the config-auto folder? In the configuration file all files are linked with the complete path. Thats why I think I dont have to. But only the ta.key file is linked without complete path. (here is the line: "tls-auth ta.key 0 # This file is secret") I've copied it to the config-auto folder. Can I delete it from the config-auto folder?
Im very thankful for answers! And I wish a good week!
Goodfred
P.S.: In the past I've set the start-type of the services to automatic. Today I found out that I need a .ovpn file in the config-auto folder. I hope that it works now.