blob: c467c5ee8d3b77490f1057b2ffa1520066aafdf2 [file] [log] [blame]
Bartosz Stebel9fed3c92020-07-09 15:13:42 +02001local kube = import "../../../kube/kube.libsonnet";
2local vpn = import "vpn.libsonnet";
3
4{
5 local top = self,
6 tls: vpn.PKI("implr-vpn"),
7
8 servers: {
9 praisethesun: vpn.Server("openvpn-implr-praisethesun", 11223, top.tls) {
10 cfg+: {
11 namespace: "implr-vpn",
12 configFile: |||
13 dev tun
14 tmp-dir /dev/shm/
15 proto udp
16 port 11223
17 topology subnet
18 server 172.17.1.0 255.255.255.0
19 keepalive 10 60
20 persist-tun
21 persist-key
Bartosz Stebel474e0d12021-04-30 20:07:51 +020022 cipher AES-256-CBC
23 dh none
24 ca /mnt/pki/ca.crt
25 cert /mnt/pki/tls.crt
26 key /mnt/pki/tls.key
27 |||
28 }
29 },
30 curssys: vpn.Server("openvpn-implr-curssys", 11224, top.tls) {
31 cfg+: {
32 namespace: "implr-vpn",
33 configFile: |||
34 dev tun
35 tmp-dir /dev/shm/
36 proto udp
37 port 11224
38 topology subnet
39 server 172.20.1.0 255.255.255.0
40 keepalive 10 60
41 persist-tun
42 persist-key
Bartosz Stebel9fed3c92020-07-09 15:13:42 +020043 cipher AES-256-CBC
44 dh none
45 ca /mnt/pki/ca.crt
46 cert /mnt/pki/tls.crt
47 key /mnt/pki/tls.key
48 |||
49 }
50 },
51 },
52 clients: {
53 kektop: vpn.Client("kektop", top.servers.praisethesun),
54 admin1: vpn.Client("admin1", top.servers.praisethesun),
55 desk1: vpn.Client("desk1", top.servers.praisethesun),
Bartosz Stebel474e0d12021-04-30 20:07:51 +020056 desk2: vpn.Client("desk2", top.servers.curssys),
57 thonk: vpn.Client("thonk", top.servers.curssys),
Bartosz Stebel9fed3c92020-07-09 15:13:42 +020058 }
59}