How to: complete disconnect when vpn drops?

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

How to: complete disconnect when vpn drops?

Post by ray5450 » Mon Aug 26, 2019 8:45 pm

(I'm not sure I will use the correct terms here, but I'll try).

Occasionally, a vpn connection will drop, and when it does, the public network connection resumes. My question is, is there a way to set up such that, when a vpn drops, the whole internet connection (public network) will also disconnect?

Thanks.

Mcicool
Posts: 6
Joined: Fri Aug 23, 2019 1:11 pm

Re: How to: complete disconnect when vpn drops?

Post by Mcicool » Tue Aug 27, 2019 3:12 pm

Outbound firewall of your work machine...

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Tue Aug 27, 2019 5:32 pm

If you correct ip route table as i do for android then no problem.

You have to have the only route to vpn server ip address then nothing else works.

It is a long time reported bug for vpnclient by me....

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Tue Aug 27, 2019 10:32 pm

"Outbound firewall of your work machine..."
--You are saying then, that there is a firewall setting that will make all internet connections disconnect when a vpn disconnects?


"If you correct ip route table as i do for android then no problem."
"You have to have the only route to vpn server ip address then nothing else works."
--Are these 2 different options?...or 2 steps to one option?

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Wed Aug 28, 2019 5:35 am

I do not think so...

search my articles, I posted it here already

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Fri Aug 30, 2019 5:37 am

"I do not think so..."
--What is it that you do not think is so?

"search my articles, I posted it here already"
--Search for what? What am I looking for? What I asked about? What you said in your reply? Something else?

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Fri Aug 30, 2019 5:49 am

ray5450 wrote:
Fri Aug 30, 2019 5:37 am
"I do not think so..."
--What is it that you do not think is so?

>>>>> it is not the same, two different things

"search my articles, I posted it here already"
--Search for what? What am I looking for? What I asked about? What you said in your reply? Something else?
>>>>>>>>>>>>>>>> how to correct ip route table

if you do not understand what I write I am afraid it is over your current abilities to understand, but you can learn...

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Fri Aug 30, 2019 5:52 am

sky59 wrote:
Fri Aug 30, 2019 5:49 am
ray5450 wrote:
Fri Aug 30, 2019 5:37 am
"I do not think so..."
--What is it that you do not think is so?

>>>>>>>>>>>>>>>> it is not the same, two different things

"search my articles, I posted it here already"
--Search for what? What am I looking for? What I asked about? What you said in your reply? Something else?


>>>>>>>>>>>>>>>> how to correct ip route table

>>>>>>>>>>>>>>>>if you do not understand what I write I am afraid it is over your current abilities to understand, but you can learn...
if you have the one and only route out of your system to reach internet (to vpn server), then if this falls down everything stops

vpnclient for linux has a problem that it keeps more ways parallel = total chaos, you never know with certainty which way it would go to internet
most likely bypassing vpn server = fastest and easiest way for any system, if it is there, any system will use it first

I am not sure, but it seems vpnclient for Windows does not suffer this terrible problem, about the rst I do not know, not my interest

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Sun Sep 01, 2019 6:18 pm

Understanding the meaning of what you say is different than the understanding, at least, of the syntax of what you say. You were not clear, rather abbreviated, and spread your suggestion through several messages.

Now that you have clarified some, I can tell you that I am using Windows. I don't know about Linux, but if there is no initial internet connection with Windows, Softether cannot connect a VPN. While connected, it does disconnect sometimes, some sessions more than others. It would take too long to just wait for one to drop, and the specific connection may never have a problem, so the only way I can think of to test it, is to manually disconnect a VPN. If I do so, or again, if it drops on its own, the initial internet connection is still active, and which is what I would like to make so that does not happen, especially if it drops on its own. I agree that this simple thing may be difficult to explain in words. If I am not clear enough, let me know.

As I understand it, what you are saying is that this issue can be fixed by "correcting the IP route table", the instructions for which, as you say, are available here for me to look up. However, it seems you are also saying that this procedure only works for Linux. Please, advise further.

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Sun Sep 01, 2019 6:23 pm

(Dear Administrator(s): I believe I made a post x2. If so, please, delete this post, and the duplicate.)

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Sun Sep 01, 2019 7:35 pm

I do not understand what you mean by "understanding...." at the beginning of your text. Should i feel offensed or something else?

What you describe as behaviour in windows it is the same for linux

I already posted in this forum corrected ip route table so i am not going to copy-paste for you. Search for it

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Sun Sep 01, 2019 7:49 pm

1. Offensed? I don't think so. Maybe you were in a hurry? I don't know.

2. Okay, same for Windows. Thanks. I'll look into it.

3. You have already said this and I have already acknowledged it in my previous post to you.

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Sun Sep 01, 2019 9:59 pm

sky59, the only related posts of yours that I find are concerning Android. Is that what you are suggesting I see?

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Mon Sep 02, 2019 3:25 am

ray5450 wrote:
Sun Sep 01, 2019 9:59 pm
sky59, the only related posts of yours that I find are concerning Android. Is that what you are suggesting I see?
Yes, sorry, I forgot that not everybody knows it is 100% linux /android/

Android is just interpreter of java semicode /like BASIC interpreter 40 years ago on PCs/

With those commands i remove unwanted ip routes and add new ones.. so the system has only one and one /nothing else/ how to get outside.. in my case the only route is to the server softether

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Mon Sep 02, 2019 5:38 pm

Before posting here, I thought there might be a setting in Softether to do what I am inquiring about. I can basically follow what you are pointing out regarding shutting off all routes except the one to Softether, but otherwise, I really don't know anything about these type of manipulations.

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Wed Sep 04, 2019 9:26 pm

...in other words, I understand, generally, what needs to be done, but do not have enough information to perform the changes needed.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Thu Sep 05, 2019 5:34 am

if this is aimed towards me I can only say, you have to open terminal and correct ip route table
as I have written already many times over here on this forum there is incorect table created by SE (SE still the best vpn)

how to correct ip route table you have learn this on your own, you must be familiar with command "ip route add.. ip route del ..." and so on

also you must use your brain to make what is needed - only you know what you want

no setting in SE - only chance is to do it manually

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Thu Sep 05, 2019 4:01 pm

Okay. I have searched the phrase: "correct ip route table". Excluding this thread of mine, 3 threads by you came up. 2 of the 3 referred to other posts. 1 of the 3, I presume, is the said "other" post where you posted the list of steps you took in your case, which are:
------------------------------------
ip route del default via 192.168.92.1 dev vpn_banovce
ip route add 0.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 64.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 128.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 192.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add xx.xx.xx.xx via 192.168.8.1 dev wlan0

xx is ip adress of your se server
------------------------------------
I understand that the data you changed here are specific to your case. You say that xx represents the SE server. Please, identify what the other numbers in each step represent. Thank-you.

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Thu Sep 05, 2019 6:52 pm

These are gateways

without understanding ip route table you do not know what you are doing

study and understand ip route table haw it works, to me it took almost two weeks searching googling reading...

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Thu Sep 05, 2019 9:15 pm

sky59:
You are telling me then to go re-invent the wheel when you already have the answers. I don't believe that is the purpose of a support forum, to go away and find the answers elsewhere, but rather sharing is. If I wanted to know how to change a lock in a door, according to you, I would need to take a course in mechanical engineering and that is that?

I can't make you tell me and I shouldn't have to.


Is there anyone else here who can share this information, and/or an alternative solution before I seek answers from somewhere other than here, the software's home site?

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Fri Sep 06, 2019 4:45 am

------------------------------------
ip route del default via 192.168.92.1 dev vpn_banovce
ip route add 0.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 64.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 128.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 192.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add xx.xx.xx.xx via 192.168.8.1 dev wlan0

xx is ip adress of your se server
------------------------------------


What more you want!? This is a "wheel"! I am not a teacher.

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Fri Sep 06, 2019 8:58 pm

sky59:
To me, you shared the finished "cart" and not the "wheel".

You consider further answering my, and likely others', questions as teaching, and I suppose it is a form of teaching, but you prefer not to...so, okay, go ahead and keep it to yourself. No one is twisting your arm. I already made a request to other members here before seeking elsewhere.

Anyone?

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Fri Sep 20, 2019 7:58 pm

ADAM31 wrote:
Fri Sep 20, 2019 5:17 pm
sky59 wrote:
Tue Aug 27, 2019 5:32 pm
If you correct ip route table as i do for android then no problem.

You have to have the only route to vpn server ip address then nothing else works.

It is a long time reported bug for vpnclient by me....
Occasionally, a vpn connection will drop, and when it does, the public network connection resumes. My question is, is there a way to set up such that, when a vpn drops, the whole internet connection (public network) will also disconnect?
Good morning!

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Fri Sep 20, 2019 8:00 pm

See this text above:


if you have the one and only route out of your system to reach internet (to vpn server), then if this falls down everything stops

sky59
Posts: 477
Joined: Tue Sep 11, 2018 5:58 pm

Re: How to: complete disconnect when vpn drops?

Post by sky59 » Wed Sep 25, 2019 7:55 am

neetabhale wrote:
Wed Sep 25, 2019 7:41 am
Helpful thread. Thanks for sharing.
Thanx for appreciation :-)

fenice
Posts: 183
Joined: Sun Jul 19, 2015 4:23 pm

Re: How to: complete disconnect when vpn drops?

Post by fenice » Wed Sep 25, 2019 9:18 am

sky59 wrote:
Wed Sep 25, 2019 7:55 am
neetabhale wrote:
Wed Sep 25, 2019 7:41 am
Helpful thread. Thanks for sharing.
Thanx for appreciation :-)
That was a spammer. :)
Regards


Bill

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Wed Nov 04, 2020 7:42 am

After all this time, I have not exactly found the information I am still searching for, and including that mysteriously mentioned by sky59. Instead, I wrote a batch file loop to check for the default connection (check your IP, etc). If the VPN disconnects and the default connects, it will then disconnect the default with netsh wlan disconnect. If anyone knows a better solution, AND is willing to post how to do so, please, do.

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Tue May 18, 2021 6:45 am

sky59:

One more time...

ip route del default via 192.168.92.1 dev vpn_banovce
ip route add 0.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 64.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 128.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add 192.0.0.0/2 via 192.168.92.1 dev vpn_banovce
ip route add xx.xx.xx.xx via 192.168.8.1 dev wlan0


I am having difficulty in finding a translation from Linux to Windows, but I can have someone else help me with that.

I still need to know where, specifically, you got these numbers from. I think some of them might be new numbers you are creating here. Others, might be from your route table.
Are you here creating: 0..., 64..., 128...?
Are the gateways 192.168.92.1 and 192.168.8.1 in your route table? If so, where did these gateways numbers come from, and/or where do the gateways go to?

flygun
Posts: 13
Joined: Tue May 18, 2021 4:23 am

Re: How to: complete disconnect when vpn drops?

Post by flygun » Wed May 19, 2021 3:38 am

on windows, use this:
open a terminal as administrator(if you donnt know, google it).

then in the terminal type the command to show route table

Code: Select all

route -print 4

ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Wed May 19, 2021 8:11 am

I know how to view the route table.

I need the Linux commands above translated to Windows commands, and the sources of the previously posted IP numbers.

flygun
Posts: 13
Joined: Tue May 18, 2021 4:23 am

Re: How to: complete disconnect when vpn drops?

Post by flygun » Thu May 20, 2021 1:38 am


ray5450
Posts: 44
Joined: Mon Aug 26, 2019 8:19 pm

Re: How to: complete disconnect when vpn drops?

Post by ray5450 » Thu May 20, 2021 8:04 am

To: sky59
(and anyone who seeks and finds this thread)

The real answer is at the above thread link by flygun.

Post Reply