start VPNserver on reboot

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
JEDs
Posts: 8
Joined: Sun Jan 07, 2018 1:59 pm

start VPNserver on reboot

Post by JEDs » Sun Jan 07, 2018 2:10 pm

I am running the server and client on windows 7,(both on same machine).

So on reboot I have to manually start the server then the client. The client has the option to start on reboot but I have not found how to start the server on reboot.

Be advised I am not real good at any code, it would have to be spelled out if there is a way to do this. and it would have to be done so the server starts first of course.

Thanks in advance, the vpn works great manually, just would like to automate startup.

qupfer
Posts: 202
Joined: Wed Jul 10, 2013 2:07 pm

Re: start VPNserver on reboot

Post by qupfer » Sun Jan 07, 2018 10:15 pm

Never used the Windows Server, but i would just create a planed task at startup.
Win+R --> Taskschd.msc

cedar
Site Admin
Posts: 2070
Joined: Sat Mar 09, 2013 5:37 am

Re: start VPNserver on reboot

Post by cedar » Mon Jan 08, 2018 9:39 am

VPN Server which is installed in service mode runs as a Windows service.
It should run when startup of the Windows OS.
(VPN Server Manager is just a GUI for controlling a VPN Server. It is not the main body.)

JEDs
Posts: 8
Joined: Sun Jan 07, 2018 1:59 pm

Re: start VPNserver on reboot

Post by JEDs » Tue Jan 09, 2018 3:07 pm

Thanks both of you for replying. qupfer, good idea I should have thought of it.

cedar, I think I understand that I do not need to start the server manager, it is vpnserver_x64.exe that needs to start.

Not sure how to install in service mode, would you explain that further please?

I am running vpnserver_x64.exe in a task scheduled to run on startup ("C:\Program Files\SoftEther VPN Server\vpnserver_x64.exe" /start)

I think it starts, because ipconfig lists an ipv4 address and subnet mask for the Ethernet adapter VPN-VPN client but it does not list everything that is listed when connected.

And I think the server has started because if I manually connect the client after reboot, it works.
However the client (programmed to re-connect automatically after disconnect, infinite number of tries) keeps failing to connect after reboot

Thanks!!

cedar
Site Admin
Posts: 2070
Joined: Sat Mar 09, 2013 5:37 am

Re: start VPNserver on reboot

Post by cedar » Tue Jan 09, 2018 3:17 pm

If you install using the installer, it will be in service mode.
Please check the service in the control panel.

cedar
Site Admin
Posts: 2070
Joined: Sat Mar 09, 2013 5:37 am

Re: start VPNserver on reboot

Post by cedar » Tue Jan 09, 2018 3:20 pm

If for some reason the service is not running properly, you should see an error in the event log.

JEDs
Posts: 8
Joined: Sun Jan 07, 2018 1:59 pm

Re: start VPNserver on reboot

Post by JEDs » Tue Jan 09, 2018 8:53 pm

there are no errors in server or client error log
in Services (local) both the server and client are started

my concerns: the client (programmed to re-connect automatically after disconnect, infinite number of tries) keeps failing to connect after reboot
and the incomplete ipconfig:
Ethernet adapter VPN - VPN Client:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::b867:9b1d:515a:a255%14
Autoconfiguration IPv4 Address. . : 169.254.162.85
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

and if I manually connect the client which shows as not connected I get:

Ethernet adapter VPN - VPN Client:

Connection-specific DNS Suffix . :
IPv6 Address. . . . . . . . . . . : 2604:6000:dcc2:cc00:b867:9b1d:515a:a255
Temporary IPv6 Address. . . . . . : 2604:6000:dcc2:cc00:d9da:402e:9d42:d595
Link-local IPv6 Address . . . . . : fe80::b867:9b1d:515a:a255%14
Autoconfiguration IPv4 Address. . : 169.254.162.85
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . : fe80::aa6b:adff:fee8:2f3e%14

So I know the server starts after reboot, but the client (again, programmed to re-connect automatically after disconnect, infinite number of tries) which opens and tries to connect, cannot connect.

So why isn't the client able to connect automatically? Is there a switch to enable connection (possibly in the background as the server now does with my scheduled task.

Note, the manual at: https://www.softether.org/4-docs/1-manu ... Connection
states you can set the startup connection, and my icon matches the icon in the manual. Yet when I right click the connection, "Set as startup connection" is grayed out and not selectable.

cedar
Site Admin
Posts: 2070
Joined: Sat Mar 09, 2013 5:37 am

Re: start VPNserver on reboot

Post by cedar » Wed Jan 10, 2018 1:01 am

What error code is shown when connection failed?

JEDs
Posts: 8
Joined: Sun Jan 07, 2018 1:59 pm

Re: start VPNserver on reboot

Post by JEDs » Wed Jan 10, 2018 5:11 pm

error code 1

2018-01-10 12:02:45.378 SoftEther VPN Client Version 4.24 Build 9651 (English)
2018-01-10 12:02:45.378 Compiled 2017/10/23 01:52:32 by yagi at pc33
2018-01-10 12:02:45.378 The SoftEther VPN Client Engine has been started.
2018-01-10 12:02:46.767 Loading configuration file...
2018-01-10 12:02:46.829 Monitoring the directory "C:\Program Files\SoftEther VPN Client". If the amount of available free disk space becomes less than 8.00 GBytes, the backup files for log files and configurations that are saved on the sub-directories of this directory will be automatically deleted in the order of oldest first. The amount of free disk space that determines when to start deletion can be modified by changing the "AutoDeleteCheckDiskFreeSpaceMin" item in the configuration file.
2018-01-10 12:02:46.969 The configuration file has been loaded.
2018-01-10 12:02:47.313 Connection processing for VPN Connection Setting "client1" has started.
2018-01-10 12:02:47.313 VPN Connection Setting "client1": Connection operation starting (this is now 1 times).
2018-01-10 12:02:48.779 VPN Connection Setting "client1": The connection has been either disconnected or it failed. Cause: Connection to the server failed. Check network connection and make sure that address and port number of destination server are correct. (code 1)
2018-01-10 12:03:03.809 VPN Connection Setting "client1": Connection operation starting (this is now 2 times).
2018-01-10 12:03:04.979 VPN Connection Setting "client1": The connection has been either disconnected or it failed. Cause: Connection to the server failed. Check network connection and make sure that address and port number of destination server are correct. (code 1)

JEDs
Posts: 8
Joined: Sun Jan 07, 2018 1:59 pm

Re: start VPNserver on reboot

Post by JEDs » Wed Jan 10, 2018 5:22 pm

just had a brain fart - you can create a shortcut to connect to the server, might be able to run that in task scheduler.

will have to try that later.

JEDs

cedar
Site Admin
Posts: 2070
Joined: Sat Mar 09, 2013 5:37 am

Re: start VPNserver on reboot

Post by cedar » Thu Jan 11, 2018 9:03 am

I guess the VPN server's global IP address changes when restarting.
VPN Client caches the numerical IP address resolved from host name when connection starts.
Therefore, VPN client can't connect automatically if the IP address of the server changes until restart connection manually.

Post Reply