Switch to full style
Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems
Post a reply

Session Termination

Apr 20 21 3:29 am

Hi,

I have opened a ticket on this, but got no response, so I'm posting it again here, hoping to get an answer.

Is there a way to programmatically end client device's sessions? I vaguely remember being possible on some older versions.

Here is my issue, so you can propose a differente approach if killing sessions is not possible:

I have a few client devices that should not be connected to the Internet all day long.
So, I made a list of their MAC addresses and wrote a policy that check them against a time table.
It works fine as long as the client device is NOT connected to the Internet. But, as soon as the time table allows it to connect, it's usually very unlinkely it will be disconnected, even when the allowed period set on the time table expires.

The only way I found to disconnect them so the time table policy works again, is to restart WinGate, which is not a good idea, because it (obviously) will also interrupt the connections of all other devices that are not time-limited.

I also thought about adding them to the "IP Blackhole" list, then removing them after a period of time, but I found no way of doing so programmatically.

Thanks!

Re: Session Termination

Apr 23 21 1:49 pm

Hi

We don't currently have a script option to terminate a session by IP or ID.

You can terminate only the current session from within flow-chart policy.

We can add this fairly easily.

Regards

Adrien

Re: Session Termination

Apr 24 21 1:07 pm

Hi, Adrien. Thanks for the post.

When you say "We can add this fairly easily.", are you refering to "terminating the current session" or "terminating all sessions"?

If the first, please, I need a hint on how to.

If the sencond, oh, yes, please!

Thanks

Re: Session Termination

Apr 27 21 9:03 am

to terminate the current session, there's usually in flow-chart policy a result option to terminate the connection.

But I was referring to adding the option to terminate all sessions on a specific IP address, or by ID. There would need to be a way to enumerate / discover session IDs.

Adrien

Re: Session Termination

Apr 28 21 1:05 pm

Hi, Adrien. Thanks for the input

I'd really love to see that "Terminate all sessions" script option in a future release.

Just out of curiosity, though: there is a right-click option in the Activity pane, on any client, to terminate all sessions on that client; I know I'm being veeeery simplistic here, without any knowledge of the inner workings of WinGate, but...wouldn't it be just to create a symbol that fires the "terminate all sessions on <ip_address>" method? Say "Session.ClientIp.TerminateAllSessions()"? Please forgive me if being too nosy.... ;)


As per the flow-chart policy, now I get it. I do use it in my policy, mentioned on the first post of this thread. But unfortunately, at least as I understand, it works only when the client is trying to establish a session, not when the session is already established.

Any way, thank you very much

Re: Session Termination

Dec 23 21 6:26 pm

a bit late to the party here, but couldn't the "Session.ExpiryTime" be used for these sessions so when they are started the expiry is set?

Script: Session.ExpiryTime
"The date / time at which this session will be terminated if you set a value. Format for date is YYYY-MM-DD, format for time is HH:MM:SS, you may specify a date and or time. "
Post a reply