Index: server/site_tests/network_VPN/000VPNGenesis |
diff --git a/server/site_tests/network_VPN/000VPNGenesis b/server/site_tests/network_VPN/000VPNGenesis |
new file mode 100644 |
index 0000000000000000000000000000000000000000..32cc94201ef541a402e85b9420022b29758fc372 |
--- /dev/null |
+++ b/server/site_tests/network_VPN/000VPNGenesis |
@@ -0,0 +1,85 @@ |
+# 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 a VPN from the Client (DUT), through the |
+# Router to to the Server. |
+# |
+ |
+{ "name":"VPNGenesis", |
+ "steps":[ |
+ ### Create WiFi connection from Client to Router. |
+ [ "create", { "type":"hostap" } ], |
+ [ "config", { "channel":"2412", "mode":"11b" } ], |
+ [ "connect", { "security":"none" } ], |
+ |
+ ### Create Client & Server VPN configurations. |
+ ### |
+ ### o Install certficiates files on Server, and Client. |
+ ### o Create VPN configuration on the Server. |
+ |
+ [ "install_files", { "system" : "server", |
+ "files" : |
+ { "/tmp/vpn-ca.crt": |
+ site_eap_certs.ca_cert_1, |
+ "/tmp/vpn-server.crt": |
+ site_eap_certs.server_cert_1, |
+ "/tmp/vpn-server.key": |
+ site_eap_certs.server_private_key_1, |
+ "/tmp/vpn-dh1024.pem": |
+ site_eap_certs.dh1024_pem_key_1 |
+ }}], |
+ [ "install_files", { "system" : "client", |
+ "files" : |
+ { "/tmp/ca.crt": |
+ site_eap_certs.ca_cert_1, |
+ "/tmp/client.crt": |
+ site_eap_certs.client_cert_1, |
+ "/tmp/client.key": |
+ site_eap_certs.client_private_key_1 |
+ }}], |
+ ### Configure and launch the VPN server. |
+ ### Automatically kills any previously running server. |
+ ### |
+ ### There are two vpn_server_config() uses to ensure that the |
+ ### internal configuration is persistent across invocations. |
+ [ "vpn_server_config", { "kind" : "openvpn", |
+ "config" : |
+ { "port":"1194", |
+ "proto":"udp", |
+ "dev":"tun", |
+ "ca":"/tmp/vpn-ca.crt", |
+ "cert":"/tmp/vpn-server.crt", |
+ "key":"/tmp/vpn-server.key", |
+ "dh":"/tmp/vpn-dh1024.pem", |
+ "server":"10.8.0.0 255.255.255.0", |
+ "ifconfig-pool-persist":"/tmp/ipp.txt", |
+ "keepalive":"10 120", |
+ "persist-key":"", |
+ "persist-tun":"", |
+ "status":"/tmp/openvpn-status.log", |
+ "verb":"0" |
+ } |
+ }], |
+ [ "vpn_server_config", { "kind" : "openvpn", |
+ "config" : { "comp-lzo":"" } |
+ }], |
+ ### Launch the VPN Client. |
+ [ "vpn_client_load_tunnel" ], |
+ [ "vpn_client_config", { "kind":"openvpn", |
+ "vpn-host-ip":"192.168.2.254", |
Paul Stewart
2011/03/08 16:56:54
Would suggest you remove the 'vpn-host-ip' paramet
|
+ "files":{ |
+ "ca-certificate":"/tmp/ca.crt", |
+ "client-certificate":"/tmp/client.crt", |
+ "client-key":"/tmp/client.key" } |
+ }], |
+ |
+ ### Verify the client is connected to the server |
+ [ "client_ping", { "ping_ip":"10.8.0.1", |
+ "count":"10" } ], |
+ |
+ [ "vpn_server_kill" ], # Shut down the VPN Server. |
+ [ "vpn_client_kill" ], # Shut down the VPN Client. |
+ [ "disconnect" ], # Disconnect WiFi setup |
+ ], |
+} |