Question L2TP VPN dies and gets confused

jjgurley

Honorable
Jan 27, 2015
50
2
10,545
1
My desktop has a L2TP client (MS Built-in) that I connect to the office to do daily backup. I never "see" it happen, since it's overnight, but I lose the connectivty, and the VPN shows that it is not connected. Normal internet connectivity works fine. When I try to reconnect, I get "element not found". Re-booting my desktop clears the problem, but I'm hoping someone has a suggestion for a script that might clear the problem short of rebooting, or maybe even a fix. I'm planning on changing to an OpenVPN and maybe that is more robust.
 

jjgurley

Honorable
Jan 27, 2015
50
2
10,545
1
I should add there's an Error 829 error in the Event log from RasClient. It wouldn't surprise me if there was a hiccup in the network, but needing to reboot to clear the blockage is the issue.
 

jjgurley

Honorable
Jan 27, 2015
50
2
10,545
1
I don't know where such an option might be hiding, although I don't think it would help.

When the connection drops, an attempt at a manual reconnect results in "element not found".

When in this 'stuck' state, you can ping 8.8.8.8, but you can't browse.
I'm guessing there's a route left hanging or something, but I don't know any of the commands to play with that functionality. I've tried disabling/enabling the adapter(s),
checking the IVP4 properties and reloading them - rebooting is the only cure I've found.
 

jjgurley

Honorable
Jan 27, 2015
50
2
10,545
1
My problem is more fundamental. Once disconnected from the VPN, my whole computer is connectivity sick. If I ping 8.8.8.8, I just get "No resources". I can log into my router, and from it, I can ping other hosts, do trace routes, etc. An ipconfig shows everything is properly in place.

I just want to figure out what purge or flush or re-init to do to regain connectivity without the pain of a reboot.
 

neojack

Prominent
Apr 4, 2019
351
58
790
8
did you try to disable your network adaptor and re-enable it ?

if you're on windows, you can do that in the console ncpa.cpl

if that works, you can probably write a script for that


PS : I have setup a lot of LT2P vpns on ubiquiti routers because of the pandemic, and it's much more stable if i reboot the router every night. just did a cron and no more client calls
 
Last edited:

jjgurley

Honorable
Jan 27, 2015
50
2
10,545
1
It's happened a few more times when I'm not using the VPN. My router is working, since wifi devices are still working, but my desktop is just getting "stuck". Rebooting is the only fix I've found. The route table is identical before and after reboot. Disabling/enabling any or all adapters doesn't clear it. The PC has a static local IP, and my DNS looks okay. Are there any other magic commands that might clear the logjam?
 

ASK THE COMMUNITY