0

I am looking for a way to create a new VPN connection using only the command line. All I see in Google searches are how to connect to an existing VPN connection, which is through rasdial. Thanks.

louieansonng
  • 343
  • 2
  • 7
  • 17

2 Answers2

0

Cisco VPN can connect using the Command line.You can create your own script files that use the CLI commands to perform routine tasks, such as connect to a corporate server, run reports, and then disconnect from the server. To display a list of all VPN Client commands, go to the directory that contains the VPN Client software, and enter the vpnclient command at the command-line prompt: http://www.cisco.com/en/US/docs/security/vpn_client/cisco_vpn_client/vpn_client46/administration/guide/vcAch5.html

jonywags
  • 1
  • 1
0

You can try to use RAS API directly from Java.

If you want to create VPN connection from pure CMD, I'd try to append connection info to rasphone.pbk file in user's profile (%APPDATA%\Microsoft\Network\Connections\Pbk\rasphone.pbk).

For more ideas see How can I programmatically create a Windows VPN connection?

Community
  • 1
  • 1
MBu
  • 2,880
  • 2
  • 19
  • 25
  • I think the link you gave me with regards to the other question in stackoverflow states a solution in C#. Is it possible to use C# libraries in Java? – louieansonng Feb 09 '12 at 03:15
  • I am not a Java developer, but I think this may help you http://stackoverflow.com/questions/420617/accessing-net-dll-libraries-components-from-java – MBu Feb 09 '12 at 09:12