Sign in to follow this  
Followers 0
jhedpena

Setup VPN L2TP clients

2 posts in this topic

Can someone help me if setting up VPN L2TP clients can be done in AutoIT? here's I want to do:

1. Click on the Start Menu and go to the Control Panel.
2. Go to the Network and Internet section.
3. Click Network and Sharing Center.
4. Click Set up a new connection or network.
5. Select Connect to a workplace and click Next.
6. Click Use my Internet connection (VPN).
7. Enter VPN Server IP in the Internet address field.
8. Enter VPN Server IP in the Destination name field.
9. Check the Don't connect now; just set it up so I can connect later checkbox.
10. Click Next.
11. Enter VPN Username in the User name field.
12. Enter VPN Password in the Password field. You can type any password for now.
13. Ensure the Remember this password checkbox is unchecked.
14. Click Create, and then Close.
15. Return to Network and Sharing Center. On the left, click Change adapter settings.
16. Right-click on the new VPN entry and choose Properties.
17. Click the Options tab and uncheck Include Windows logon domain.
18. Click the Security tab. Select "Layer 2 Tunneling Protocol with IPsec (L2TP/IPSec)" for the Type of VPN.
19. Click Allow these protocols. Uncheck "Challenge Handshake Authentication Protocol (CHAP)" checkbox. Ensure "Microsoft CHAP Version 2 MS-CHAP v2" is checked.
20. Click the Advanced settings button.
21. Select Use preshared key for authentication and enter VPN IPsec PSK for the Key.
22. Click OK to close the Advanced settings.
23. Click OK to save the VPN connection details.
24. Run command prompt as an administrator.
25. Issue the registry command

REG ADD HKLM\SYSTEM\CurrentControlSet\Services\IPSec /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f

26. Restart machine

 

Thanks in Advance!

Share this post


Link to post
Share on other sites



@jhedpena Welcome to the forum. We operate on the "Teach a Man to Fish" motto, rather than you simply putting in a request and someone writing it all for you. A search of the forum will show you several threads where this has been done in the past, with code you can modify to your own needs:

https://www.google.com/search?safe=strict&rlz=1C1GGRV_enUS752US752&q=site%3Aautoitscript.com+configure+VPN&oq=site%3Aautoitscript.com+configure+VPN&gs_l=psy-ab.3...2712.7960.0.8369.25.19.5.0.0.0.171.1948.9j9.18.0.dummy_maps_web_fallback...0...1.1.64.psy-ab..2.0.0....0.DVG5zF4Zn2E

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0