blob: 38ec411da3333572ea3938e4eaaf9aecc7159dbb [file] [log] [blame]
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# An example of how to set up an IPSec VPN from the Client (DUT),
# through the Router to to the Server.
#
{ "name" : "012L2tpIpsecPSK",
"steps":[
# Create WiFi connection from Client to Router.
[ "create", { "type" : "hostap" } ],
[ "config", { "channel" : "2412", "mode" : "11b" } ],
[ "connect", { "security" : "none" } ],
# Launch the VPN server.
[ "vpn_server_config", {
"kind" : "l2tpipsec-psk",
"replacements" : { "@plutodebug@" : "all" }}],
[ "set_user_onc",
{
"onc":
"""{
"NetworkConfigurations": [
{
"GUID": "{641dfd0e-d044-de75-46983d5cc31c6f27}",
"Name": "l2tpipsec-psk",
"Type": "VPN",
"VPN": {
"Host": "172.22.50.181",
"Type": "L2TP-IPsec",
"IPsec": {
"IKEVersion": 1,
"AuthenticationType": "PSK",
"PSK": "chapsecret"
},
"L2TP": {
"SaveCredentials": true,
"Username": "chapuser",
"Password": "password"
}
},
"ProxySettings": {
"Type": "Direct"
}
}],
"Certificates": []
}"""
}],
# Launch the VPN Client.
[ "connect_vpn_onc" ],
# Verify the client is connected to the server
[ "client_ping", { "ping_ip" : "172.22.50.181", # IP in xl2tpd.conf.
"count" : "10" } ],
[ "vpn_client_kill" ], # Shut down the VPN Client.
[ "vpn_server_kill" ], # Shut down the VPN Server.
[ "disconnect" ], # Disconnect WiFi setup
],
}