Link to home
Start Free TrialLog in
Avatar of Bassam72
Bassam72

asked on

How to establish an automatic VPN connection after login to a domain (Urgent Help)??

Hi Guys,

   I am facing an issue of how to establish a VPN connevtion to a VPN server automatically (without double click the VPN connvetion icon) after user login to the domain.

I have a LAN with a Domain Controller in my office. People want to establish VPN connections to a remote VPN server after they log on to the local Domain Controller of my office.

Currently they used to double click everytime on the VPN icon on their desktop after they logged on to the Domain Controller.

I have been told that I can write a Login Script and attach it to every user registered in the active directory of the domain controller. In fact I don't I don't know where and how can I find that script.

Your help will be highly appreciated

Regards
Bassam
ASKER CERTIFIED SOLUTION
Avatar of Quetzal
Quetzal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Quetzal
Quetzal

If these servers require a constant connection, consider setting up a router-to-router vpn connection that will make the 2 networks appear to be local to one another.
Avatar of Bassam72

ASKER

Ok, but how can I call this command from the server so that when a user logged on to my local domain controller he can establish the connevtion automatically?

what I mean here is what Login Script that I should write in order to call the command "rasdial" ??

In fact I want to include this script in a group policy or in a user profile.

regards
Bassam
Here is a way of incorporating this in your logon sequence.

You saved the the logon credentials in the VPN Connection. The name of the VPN connection (on the local machine that should dial out) is VPN.

Connect to your DC, open the sysvol share, doubleclick on your domain name, then open scripts. (ie: \\domsrv\SYSVOL\domain.local\SCRIPTS) Right click somewhere, click New... pick "Text Document".

Put this line in there:
rasdial "VPN"

save the document as logon.bat. Take care that you are able to view file extensions in explorer, othwerwise it will end up beeing its name "logon.bat.txt".

In "Active Directory Users and Computers" double click on the user, go to profile, under logon script enter "logon.bat". Repeat with other uers until done.

That should do it for you.

HTH,
Andy.