RDP disconnect after VPN connect


Getting a error once i connect the VPN inside my remote desktop "The connection has been lost. Attempting to reconnect to your session" after typing VPN username and password





I connect to server with remote desktop and everything is good. But when I enter VPN username and password and press connect, remote desktop hangs and disconnects instantly. And server needs to reboot to use again.






This is a common error, specially when your network administrator configured VPN in full tunnel mode.


Don't worry!!!!!!!!! i know you searched most of the articles and tried that but didn't work. Read the complete article carefully and this solution will work 100%.



Please understand first why you are facing this issue........... Once you connect the VPN it puts some temporary route on your system after connects. So you face this issue.

This is a normal behavior, nothing is new on it 😹



Solution : 


Just create a batch file and always run that before connect to VPN, you will never face thsi issue.


route add <Client Network ID> mask <client network subnet mask> <Gateway> metric 1


Those who don't understand please read below, i described this.................. 


Case Summary: I'm using FortiClient VPN which is installed on 10.0.5.23 server.  I'm talking the RDP of 10.0.5.23 server and try to connect the VPN, once VPN connected i lost my 10.0.5.23 server RDP.


My Server gateway is 192.168.1.1


How to check this? 


Go to Run and type CMD then hit enter


type ipconfig and hit enter


The network adaptor which is connected you will see those details as per below



So in my case command will be below


route add 10.0.5.0 mask 255.255.255.0 192.168.1.1 metric 1


Open notepad and paste above command and save the file. Now change file extension from .txt to .bat



I have created route.bat







Now your script is ready.............. Always run this .bat file as an administrator before connecting to VPN and you will see your server RDP will keep connected even after VPN connected.







If you enjoyed this article, follow and share it with your friends and colleagues!!!!!!!!!!! 👍


Posted By : Kamlesh Gaur






  





Comments

  1. It worked, thanks for the blog and sharing your knowledge.

    ReplyDelete
    Replies
    1. Great... Thanks for your valuable feedback!!!!!

      Delete

Post a Comment