commandline setting of VPN preshared key?

Discussion in 'Windows Networking' started by Rob, May 29, 2010.

  1. Rob

    Rob Guest

    On Windows XP, a VPN connection can be defined using the GUI
    from the properties page of networking. When the VPN is set
    to L2TP/IPsec, a preshared key can be entered.

    Where is this preshared key stored on the system?
    Is it possible to set the preshared key from a batchfile using
    some commandline program?

    The other settings of the VPN end up in a file named

    C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk

    but the preshared key is not in that file...
     
    Rob, May 29, 2010
    #1
    1. Advertisements

  2. You may try the
    netsh
    command, but I don't know if it supports this. I dumped the entire network
    configuration, but couldn't find any preshared keys in plain text inside it.

    You may also have a look at the iPSec settings in the registry:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\windows\IPSec\Policy]


    George Valkov



    | On Windows XP, a VPN connection can be defined using the GUI
    | from the properties page of networking. When the VPN is set
    | to L2TP/IPsec, a preshared key can be entered.
    |
    | Where is this preshared key stored on the system?
    | Is it possible to set the preshared key from a batchfile using
    | some commandline program?
    |
    | The other settings of the VPN end up in a file named
    |
    | C:\Documents and Settings\All Users\Application
    Data\Microsoft\Network\Connections\Pbk\rasphone.pbk
    |
    | but the preshared key is not in that file...
     
    George Valkov, Jun 3, 2010
    #2
    1. Advertisements

  3. Rob

    Rob Guest

    Thanks for your reply.
    I looked in that registry key and it does have our policy defined IPsec
    stuff, but the dialup VPN entry is not defined by policy. It is created
    manually.
    Maybe I should try to find if it is possible to create a VPN by policy,
    that should solve the issue.
     
    Rob, Jun 3, 2010
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.