Chromium Code Reviews| 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. | |
|
Sam Leffler
2011/03/31 17:11:27
mention StrongSwan somewhere in here?
| |
| 7 # | |
| 8 | |
| 9 { "name" : "VPNStrongSwanGenesis", | |
| 10 "steps":[ | |
| 11 ### Create WiFi connection from Client to Router. | |
|
Sam Leffler
2011/03/31 17:11:27
don't think any of the other tests use '###'; not
| |
| 12 [ "create", { "type" : "hostap" } ], | |
| 13 [ "config", { "channel" : "2412", "mode" : "11b" } ], | |
| 14 [ "connect", { "security" : "none" } ], | |
| 15 | |
| 16 ### Declare the templates for the configuration files which are | |
| 17 ### going to be used. Text of the form '@fnord@' can be replaced | |
| 18 ### at write-out time by putting it into the 'replacements' | |
| 19 ### parameter of the 'vpn_server_config' step. | |
| 20 ### | |
| 21 ### The text '@ipsecrets-ip@' is automtically replaced with the | |
| 22 ### correct server IP for the current test configuration, and | |
| 23 ### should not be replaced through this list of steps. | |
| 24 [ "vpn_strongswan_config_templates", { | |
|
Sam Leffler
2011/03/31 17:11:27
style nit; not sure you're using 4-space indent he
thutt
2011/04/05 21:38:21
I've removed this step altogether (unrelated to th
| |
| 25 "/etc/ipsec.conf" : | |
| 26 "config setup\n" | |
| 27 " charonstart=no\n" | |
| 28 " plutostart=yes\n" | |
| 29 " plutodebug=@plutodebug@\n" | |
| 30 "conn L2TP\n" | |
| 31 " keyexchange=ikev1\n" | |
| 32 " authby=psk\n" | |
| 33 " pfs=no\n" | |
| 34 " rekey=no\n" | |
| 35 " left=%defaultroute\n" | |
| 36 " leftprotoport=17/1701\n" | |
| 37 " right=%any\n" | |
| 38 " rightprotoport=17/%any\n" | |
| 39 " auto=add\n", | |
| 40 | |
| 41 "/etc/ipsec.secrets" : | |
| 42 "@ipsecrets-ip@ %any : PSK \"password\"", | |
| 43 | |
| 44 "/etc/xl2tpd/xl2tpd.conf" : | |
| 45 "[global]\n" | |
| 46 "\n" | |
| 47 "[lns default]\n" | |
| 48 " ip range = 192.168.1.128-192.168.1.254\n" | |
|
Sam Leffler
2011/03/31 17:11:27
can this be automatically filled in?
thutt
2011/04/05 21:38:21
Yes, it can. I don't have it set up for being fil
| |
| 49 " local ip = 192.168.1.99\n" | |
| 50 " require chap = yes\n" | |
| 51 " refuse pap = yes\n" | |
| 52 " require authentication = yes\n" | |
| 53 " name = LinuxVPNserver\n" | |
| 54 " ppp debug = yes\n" | |
| 55 " pppoptfile = /etc/ppp/options.xl2tpd\n" | |
| 56 " length bit = yes\n", | |
| 57 | |
| 58 "/etc/xl2tpd/xl2tp-secrets" : | |
| 59 "* them l2tp-secret", | |
| 60 | |
| 61 "/etc/xl2tpd/l2tp-secrets" : | |
| 62 "* them l2tp-secret", | |
| 63 | |
| 64 "/etc/ppp/chap-secrets" : | |
| 65 "chapuser * chapsecret *", | |
| 66 | |
| 67 "/etc/ppp/options.xl2tpd" : | |
| 68 "ipcp-accept-local\n" | |
| 69 "ipcp-accept-remote\n" | |
| 70 "ms-dns 192.168.1.1\n" | |
| 71 "ms-dns 192.168.1.3\n" | |
| 72 "ms-wins 192.168.1.2\n" | |
| 73 "ms-wins 192.168.1.4\n" | |
| 74 "noccp\n" | |
| 75 "auth\n" | |
| 76 "crtscts\n" | |
| 77 "idle 1800\n" | |
| 78 "mtu 1410\n" | |
| 79 "mru 1410\n" | |
| 80 "nodefaultroute\n" | |
| 81 "debug\n" | |
| 82 "lock\n" | |
| 83 "proxyarp\n" | |
| 84 "connect-delay 5000\n" | |
|
Sam Leffler
2011/03/31 17:11:27
much of the above is magic to me; please add comme
thutt
2011/04/05 21:38:21
I agree, it's entirely magic. I'd like to defer t
| |
| 85 }], | |
| 86 | |
| 87 ### Configure and launch the VPN server. | |
| 88 ### Automatically kills any previously running server. | |
| 89 ### | |
| 90 [ "vpn_server_config", { | |
| 91 "kind" : "l2tpipsec", | |
|
Sam Leffler
2011/03/31 17:11:27
indent
thutt
2011/04/05 21:38:21
Addressed.
| |
| 92 "replacements" : { | |
| 93 # @ipsecrets-ip@ should not be replaced here. | |
|
Sam Leffler
2011/03/31 17:11:27
don't understand this; did you mean "should not be
thutt
2011/04/05 21:38:21
Yes; the @ipsecrets-ip@ is replaced with a runtime
| |
| 94 # Instead, it is automatically replaced in | |
| 95 # 'site_linux_server.py' with the appropriate | |
| 96 # server IP address. | |
| 97 "@plutodebug@" : "all" | |
| 98 }}], | |
|
Sam Leffler
2011/03/31 17:11:27
add \n? also is vpn_server_config synchronous? are
thutt
2011/04/05 21:38:21
I did nothing to make it synchronous or asynchrono
| |
| 99 ### Launch the VPN Client. | |
| 100 [ "vpn_client_config", { "kind" : "l2tpipsec-psk" }], | |
| 101 | |
| 102 ### Verify the client is connected to the server | |
| 103 [ "client_ping", { "ping_ip" : "192.168.1.99", # In xl2tpd.conf. | |
|
Sam Leffler
2011/03/31 17:11:27
seems like you can factor out this fixed ip as we
thutt
2011/04/05 21:38:21
How? How will the code be able to differentiate b
| |
| 104 "count" : "10" } ], | |
| 105 | |
| 106 [ "vpn_server_kill" ], # Shut down the VPN Server. | |
| 107 [ "vpn_client_kill" ], # Shut down the VPN Client. | |
| 108 [ "disconnect" ], # Disconnect WiFi setup | |
| 109 ], | |
| 110 } | |
| OLD | NEW |