Reconnecting to a cascading connection on Softether VPN Server

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
Barton
Posts: 8
Joined: Sun Jan 29, 2017 1:34 pm

Reconnecting to a cascading connection on Softether VPN Server

Post by Barton » Thu Jun 01, 2023 12:16 pm

Hi. I saw in this topic https://www.vpnusers.com/viewtopic.php?t=67587 manual for switching for Softether VPN Client. I have a Softether VPN Server installed and would also like to reconnect at a certain time. I need to switch to a cascade connection. Please help me how to implement this?

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: Reconnecting to a cascading connection on Softether VPN Server

Post by solo » Thu Jun 01, 2023 12:33 pm

Code: Select all

6.4.48 "CascadeOnline": Switch Cascade Connection to Online Status
Command Name 	CascadeOnline
Purpose 	Switch Cascade Connection to Online Status
Description 	When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to online status. The Cascade Connection that is switched to online status begins the process of connecting to the destination VPN Server in accordance with the Connection Setting. The Cascade Connection that is switched to online status will establish normal connection to the VPN Server or continue to attempt connection until it is switched to offline status.
You cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster.
Command-line 	CascadeOnline [name]
Arguments for "CascadeOnline":
name 	Specify the name of the Cascade Connection to switch to online status.
 
6.4.49 "CascadeOffline": Switch Cascade Connection to Offline Status
Command Name 	CascadeOffline
Purpose 	Switch Cascade Connection to Offline Status
Description 	When a Cascade Connection registered on the currently managed Virtual Hub is specified, use this to switch that Cascade Connection to offline status. The Cascade Connection that is switched to offline will not connect to the VPN Server until next time it is switched to the online status using the CascadeOnline command
You cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster.
Command-line 	CascadeOffline [name]
Arguments for "CascadeOffline":
name 	Specify the name of the Cascade Connection to switch to offline status.

Barton
Posts: 8
Joined: Sun Jan 29, 2017 1:34 pm

Re: Reconnecting to a cascading connection on Softether VPN Server

Post by Barton » Fri Jun 02, 2023 11:09 am

Thanks! Please help me with the syntax, this option does not work,

vpncmd 127.0.0.1:5555 /SERVER /adminhub:VPN /PASSWORD:MYPASSWORD /CMD:CascadeOffline connectname CascadeOnline connectname

Only one thing works, for example:

vpncmd 127.0.0.1:5555 /SERVER /adminhub:VPN /PASSWORD:MYPASSWORD /CMD:CascadeOffline connectname

CascadeOnline ignored. I tried with /IN anyway, 2 commands in a row are not executed.

Thanks!

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: Reconnecting to a cascading connection on Softether VPN Server

Post by solo » Fri Jun 02, 2023 11:59 am

Works for me...

Code: Select all

C:\Program Files\SoftEther VPN Server>vpncmd localhost:5555 /server /password:9999 /adminhub:VPN /cmd CascadeOffline test
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.41 Build 9787   (English)
Compiled 2023/03/14 11:00:03 by buildsan at crosswin with OpenSSL 3.0.7
Copyright (c) 2012-2023 SoftEther VPN Project. All Rights Reserved.
Connection has been established with VPN Server "localhost" (port 5555).
You have administrator privileges for the entire VPN Server.
The Virtual Hub "VPN" has been selected.
VPN Server/VPN>CascadeOffline test
CascadeOffline command - Switch Cascade Connection to Offline Status
The command completed successfully.

C:\Program Files\SoftEther VPN Server>vpncmd localhost:5555 /server /password:9999 /adminhub:VPN /cmd CascadeOnline test
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.41 Build 9787   (English)
Compiled 2023/03/14 11:00:03 by buildsan at crosswin with OpenSSL 3.0.7
Copyright (c) 2012-2023 SoftEther VPN Project. All Rights Reserved.
Connection has been established with VPN Server "localhost" (port 5555).
You have administrator privileges for the entire VPN Server.
The Virtual Hub "VPN" has been selected.
VPN Server/VPN>CascadeOnline test
CascadeOnline command - Switch Cascade Connection to Online Status
The command completed successfully.

Barton
Posts: 8
Joined: Sun Jan 29, 2017 1:34 pm

Re: Reconnecting to a cascading connection on Softether VPN Server

Post by Barton » Fri Jun 02, 2023 12:03 pm

So it also works for me, how do I transfer the connection offline and then online in one line? Like this:

vpncmd 127.0.0.1:5555 /SERVER /adminhub:VPN /PASSWORD:MYPASSWORD /CMD:CascadeOffline connectname CascadeOnline connectname

Does not work.

solo
Posts: 1228
Joined: Sun Feb 14, 2021 10:31 am

Re: Reconnecting to a cascading connection on Softether VPN Server

Post by solo » Fri Jun 02, 2023 12:21 pm

Easy, run "transfer-the-connection-offline-and-then-online-in-one-line.bat"

Code: Select all

---------------
@echo off
path=%path%;C:\Program Files\SoftEther VPN Server
vpncmd localhost:5555 /server /password:9999 /adminhub:VPN /cmd CascadeOffline test
ping -n 3 127.0.0.1 >nul
vpncmd localhost:5555 /server /password:9999 /adminhub:VPN /cmd CascadeOnline test
---------------

Barton
Posts: 8
Joined: Sun Jan 29, 2017 1:34 pm

Re: Reconnecting to a cascading connection on Softether VPN Server

Post by Barton » Fri Jun 02, 2023 12:32 pm

Thank you so much for your help!

Post Reply