OLD | NEW |
---|---|
(Empty) | |
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 # | |
5 # An example of how to set up a VPN from the Client (DUT), through the | |
6 # Router to to the Server. | |
7 # | |
8 | |
9 { "name":"VPNGenesis", | |
10 "steps":[ | |
11 ### Create WiFi connection from Client to Router. | |
12 [ "create", { "type":"hostap" } ], | |
13 [ "config", { "channel":"2412", "mode":"11b" } ], | |
14 [ "connect", { "security":"none" } ], | |
15 | |
16 ### Create Client & Server VPN configurations. | |
17 ### | |
18 ### o Install certficiates files on Server, and Client. | |
19 ### o Create VPN configuration on the Server. | |
20 | |
21 [ "install_files", { "system" : "server", | |
22 "files" : | |
23 { "/tmp/vpn-ca.crt": | |
24 site_eap_certs.ca_cert_1, | |
25 "/tmp/vpn-server.crt": | |
26 site_eap_certs.server_cert_1, | |
27 "/tmp/vpn-server.key": | |
28 site_eap_certs.server_private_key_1, | |
29 "/tmp/vpn-dh1024.pem": | |
30 site_eap_certs.dh1024_pem_key_1 | |
31 }}], | |
32 [ "install_files", { "system" : "client", | |
33 "files" : | |
34 { "/tmp/ca.crt": | |
35 site_eap_certs.ca_cert_1, | |
36 "/tmp/client.crt": | |
37 site_eap_certs.client_cert_1, | |
38 "/tmp/client.key": | |
39 site_eap_certs.client_private_key_1 | |
40 }}], | |
41 ### Configure and launch the VPN server. | |
42 ### Automatically kills any previously running server. | |
43 ### | |
44 ### There are two vpn_server_config() uses to ensure that the | |
45 ### internal configuration is persistent across invocations. | |
46 [ "vpn_server_config", { "kind" : "openvpn", | |
47 "config" : | |
48 { "port":"1194", | |
49 "proto":"udp", | |
50 "dev":"tun", | |
51 "ca":"/tmp/vpn-ca.crt", | |
52 "cert":"/tmp/vpn-server.crt", | |
53 "key":"/tmp/vpn-server.key", | |
54 "dh":"/tmp/vpn-dh1024.pem", | |
55 "server":"10.8.0.0 255.255.255.0", | |
56 "ifconfig-pool-persist":"/tmp/ipp.txt", | |
57 "keepalive":"10 120", | |
58 "persist-key":"", | |
59 "persist-tun":"", | |
60 "status":"/tmp/openvpn-status.log", | |
61 "verb":"0" | |
62 } | |
63 }], | |
64 [ "vpn_server_config", { "kind" : "openvpn", | |
65 "config" : { "comp-lzo":"" } | |
66 }], | |
67 ### Launch the VPN Client. | |
68 [ "vpn_client_load_tunnel" ], | |
69 [ "vpn_client_config", { "kind":"openvpn", | |
70 "vpn-host-ip":"192.168.2.254", | |
Paul Stewart
2011/03/08 16:56:54
Would suggest you remove the 'vpn-host-ip' paramet
| |
71 "files":{ | |
72 "ca-certificate":"/tmp/ca.crt", | |
73 "client-certificate":"/tmp/client.crt", | |
74 "client-key":"/tmp/client.key" } | |
75 }], | |
76 | |
77 ### Verify the client is connected to the server | |
78 [ "client_ping", { "ping_ip":"10.8.0.1", | |
79 "count":"10" } ], | |
80 | |
81 [ "vpn_server_kill" ], # Shut down the VPN Server. | |
82 [ "vpn_client_kill" ], # Shut down the VPN Client. | |
83 [ "disconnect" ], # Disconnect WiFi setup | |
84 ], | |
85 } | |
OLD | NEW |