Client TCP connection is 0 but not reconnect or disconnect

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
dfc643
Posts: 6
Joined: Mon Mar 23, 2015 4:08 am

Client TCP connection is 0 but not reconnect or disconnect

Post by dfc643 » Sat Mar 02, 2024 1:20 pm

Hi everyone,

I have a private network running in same ISP in my city.
the SoftEther as the access server without any function of layer-3.

the SoftEther can running properly in short time (less than 5 days).
the client connection will broken (but not disconnect) if client connected to server more than 5 days.

the fault manifests as:
1. client shows connected to the server properly.
2. client cannot ping any ip in private network (include gateway) replies timed out.
3. virtual hub shows client tcp connection is 0 in server side.
4. client network back to normal if client disconnect and reconnect.
5. whether client mode or cascade mode has the problem.
Image

logging (loop forever):

Code: Select all

2024-03-02 21:21:59.061 On the TCP Listener (Port 11000), a Client (IP address xx.xx.yy.yy, Host name "xx.xx.yy.yy", Port number xxyy) has connected.
2024-03-02 21:21:59.061 For the client (IP address: xx.xx.yy.yy, host name: "xx.xx.yy.yy", port number: xxyy), connection "CID-165146" has been created.
2024-03-02 21:21:59.091 SSL communication for connection "CID-165146" has been started. The encryption algorithm name is "TLS_AES_256_GCM_SHA384".
2024-03-02 21:21:59.101 Connection "CID-165146" has been terminated.
server side: openwrt / softether 5.01 dev
client side: windows / softether 4.38 (cascade) / softether 4.43 (client)

what expected:
1. client do redial if client network broken.

how to solve it? thx.
Last edited by dfc643 on Sat Mar 02, 2024 1:47 pm, edited 1 time in total.

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

Re: Client TCP connection is 0 but not reconnect or disconnect

Post by solo » Sat Mar 02, 2024 1:36 pm

https://openwrt.org/packages/pkgdata/so ... vpn-server
I see 4.38-9760-2 there, try it instead of v5.

dfc643
Posts: 6
Joined: Mon Mar 23, 2015 4:08 am

Re: Client TCP connection is 0 but not reconnect or disconnect

Post by dfc643 » Sun Mar 03, 2024 1:16 am

solo wrote:
Sat Mar 02, 2024 1:36 pm
https://openwrt.org/packages/pkgdata/so ... vpn-server
I see 4.38-9760-2 there, try it instead of v5.
thank you! try it first. :)

dfc643
Posts: 6
Joined: Mon Mar 23, 2015 4:08 am

Re: Client TCP connection is 0 but not reconnect or disconnect

Post by dfc643 » Wed Mar 06, 2024 1:44 pm

i wrote a script to kick-out broken session finally :)

Code: Select all

#!/bin/sh
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
SEVPN_PORT="5555"
SEVPN_HUB="VPNHUB123"
SEVPN_PASS="*********"
SEVPN_CMD="/usr/bin/vpncmd /Server localhost:$SEVPN_PORT /Hub:$SEVPN_HUB /Password:$SEVPN_PASS /CSV /CMD"


#__force_disconnect_broken_sessions__
SE_BROKEN_SESSIONS=$($SEVPN_CMD SessionList | grep -E ',0 / [0-9]+,' | awk -F, '{print $1}')
echo "$SE_BROKEN_SESSIONS" | while read -r line ; do
	printf "%-60s" "Found broken session: $line, trying to disconnection ..."
	$SEVPN_CMD SessionDisconnect $line 2>&1 >/dev/null
	if [ $? -eq 0 ]; then
		printf "%20s\n" "[ Disconnected ]"
	else
		printf "%20s\n" "[ Failed ]"
	fi
done


echo "script finished!"
exit 0
put it in crontab

Code: Select all

#__disconnect_broken_session_sevpn__
10/* * * * * /root/sevpnhelper &
it works!

Post Reply