Ask the Expert

Is it possible to establish a VPN connection programmatically?

I want to establish a VPN connection programmatically (when I run my VB.NET application, the app will create a VPN without the needing the user -runs win2k- establishes the connection). Is it possible to do it programmatically and how or the only way to do it is manually?

    Requires Free Membership to View

Microsoft provides a command-line tool that you can invoke from your application to set up IPsec policy. From the Microsoft website:
"Ipsecpol.exe: Internet Protocol Security Policies Tool
 Posted: July 13, 2001
 * *
 Download Fileipsecpol_setup.exe
 147 KB file
 1 min @ 28.8 Kbps
 Related Links
 Buy the Windows 2000 Server Resource Kit.
 Buy the Windows 2000 Professional Resource Kit.
 * *

This command-line tool configures Internet Protocol Security (IPSec) policies in the Directory Service, or in a local or remote registry. It does everything that the IPSec Microsoft Management Console (MMC) snap-in does, and is even modeled after the snap-in. IPSecPol has two mutually exclusive modes: dynamic and static. The default mode is dynamic. This tool runs only on Microsoft Windows 2000."

There is an equivalent tool (ipseccmd) for Windows XP.

This was first published in January 2004

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: