VPN to the test lab

This commit is contained in:
Michael Kuzmin 2018-04-24 22:11:33 +03:00
parent fce740bd1c
commit c2a8d0c91e
7 changed files with 41 additions and 4 deletions

1
.gitignore vendored
View File

@ -4,4 +4,3 @@ packer-builder-vsphere*
bin/
test*.json
crash.log
vpn/

View File

@ -441,7 +441,7 @@ func sshKeyConfig() string {
config := defaultConfig()
config["communicator"] = "ssh"
config["ssh_username"] = "root"
config["ssh_private_key_file"] = "../test-key.pem"
config["ssh_private_key_file"] = "../test/test-key.pem"
return commonT.RenderConfig(config)
}

View File

@ -4,10 +4,10 @@ services:
container_name: vpn
image: jetbrainsinfra/openvpn
volumes:
- ./vpn:/vpn:ro
- ./test:/vpn:ro
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
dns: 10.0.0.1
command: --config /vpn/jetbrains-vsphere-lab.ovpn --script-security 2 --auth-user-pass /vpn/creds.txt
entrypoint: "sh -c 'echo ${VPN_PASSWORD} | openvpn --cd /vpn/ --config lab.ovpn --askpass /dev/stdin'"

38
test/lab.ovpn Normal file
View File

@ -0,0 +1,38 @@
dev tun
persist-tun
persist-key
cipher AES-256-CBC
ncp-ciphers AES-256-GCM:AES-128-GCM
auth SHA1
tls-client
client
resolv-retry infinite
remote 81.3.129.9 2000 tcp-client
remote-cert-tls server
pkcs12 lab.p12
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
6c9efab783fc2ee1a558bcedeaf92f8d
85322bc05432fbb00745fcd00bb48857
77cbf0c82462726a848657c56b62f6fd
b9b1622c633188e848ce78c1b4476e9f
938338532c79784f36d80156e3b29bcf
493e64c393ee216b776c7a5d62c03aa8
5fc5fea73990612f07660988da133b61
34c847e67f65b8af407ae0b2761de402
49ede990747659a878acaaf8fa1a6201
1aa8ec5aeb01ccf50d1dc6e675dea291
8d4c199c1c126fee9c112ce16c736159
3234d5eaea167f5e60d01ad618fd33bb
c262fb3d5227933d6149e45ab0246d58
5f5d66d835fbfc8e8d51e0462194d835
8f66f166ccef5616abba26dd38046a87
9476359e2dc7a5b4dc045e3fbe39d6e6
-----END OpenVPN Static key V1-----
</tls-auth>
key-direction 1

BIN
test/lab.p12 Normal file

Binary file not shown.