|
@@ -56,58 +56,39 @@ openvpn:
|
|
-----BEGIN X509 CRL-----
|
|
-----BEGIN X509 CRL-----
|
|
-----END X509 CRL-----
|
|
-----END X509 CRL-----
|
|
|
|
|
|
- # Openvn deployment scripts
|
|
|
|
- scripts:
|
|
|
|
- # Initscript, executed by dedicated initialization container, main purpose - set firewall rules, or some similar, before openvpn start.
|
|
|
|
- initscript: |-
|
|
|
|
- #!/bin/bash
|
|
|
|
- iptables -I FORWARD 1 -m state --state NEW -s 10.100.10.0/24 -i openvpn-tun -j DROP
|
|
|
|
- iptables -I FORWARD 1 -m state --state NEW -s 10.100.10.0/24 -d 192.168.205.10 -i openvpn-tun -j ACCEPT
|
|
|
|
- iptables -I INPUT 1 -m state --state NEW -s 10.100.10.0/24 -i openvpn-tun -j DROP
|
|
|
|
- iptables -I INPUT 1 -m state --state NEW -s 10.100.10.0/24 -d 217.74.42.72 -i openvpn-tun -j ACCEPT
|
|
|
|
- # Main openvpn container startup script, aka ENTRYPOINT
|
|
|
|
- startscript: |-
|
|
|
|
- #!/bin/bash
|
|
|
|
- mkdir /dev/net
|
|
|
|
- mknod /dev/net/tun c 10 200
|
|
|
|
- exec "/usr/sbin/openvpn" "--config" "/etc/openvpn/configuration/openvpn.conf"
|
|
|
|
- # Stop script, executed by separate container on Pod termination.
|
|
|
|
- stopscript: |-
|
|
|
|
- #!/bin/bash
|
|
|
|
- iptables -D FORWARD -m state --state NEW -s 10.100.10.0/24 -i openvpn-tun -j DROP
|
|
|
|
- iptables -D FORWARD -m state --state NEW -s 10.100.10.0/24 -d 192.168.205.10 -i openvpn-tun -j ACCEPT
|
|
|
|
- iptables -D INPUT -m state --state NEW -s 10.100.10.0/24 -i openvpn-tun -j DROP
|
|
|
|
- iptables -D INPUT -m state --state NEW -s 10.100.10.0/24 -d 217.74.42.72 -i openvpn-tun -j ACCEPT
|
|
|
|
- # The health check script
|
|
|
|
- healthcheck: |-
|
|
|
|
- #!/bin/bash
|
|
|
|
- # ping something, or check connection status on port 7505
|
|
|
|
-
|
|
|
|
|
|
+ # Openvn healthcheck script
|
|
|
|
+ # healthcheck: |-
|
|
|
|
+ # #!/bin/bash
|
|
|
|
+ # echo state | nc localhost 7505 | grep -i connected
|
|
|
|
|
|
# Inbound IP and port
|
|
# Inbound IP and port
|
|
# ip, port and protocol for loadbalancer service, in case it's a server
|
|
# ip, port and protocol for loadbalancer service, in case it's a server
|
|
-inbound_IP: 10.1.2.3
|
|
|
|
|
|
+inbound_IP: 192.168.21.75
|
|
# must be same, as port in openvpn config
|
|
# must be same, as port in openvpn config
|
|
inbound_port: 1194
|
|
inbound_port: 1194
|
|
# must be same, as proto in openvpn config
|
|
# must be same, as proto in openvpn config
|
|
inbound_proto: UDP
|
|
inbound_proto: UDP
|
|
|
|
|
|
-# Openvpn settings, musb be the same, as in config, used in router daemonset
|
|
|
|
-dev_name: openvpn-tun
|
|
|
|
-net: 10.100.0.0
|
|
|
|
-mask: 255.255.0.0
|
|
|
|
|
|
+# Virtual flow ip for openvpn service
|
|
|
|
+virtIP_addr: 192.168.21.71
|
|
|
|
+virtIP_dev: team0
|
|
|
|
+
|
|
|
|
+# Networks CIDR which has to be routed through openvpn
|
|
|
|
+netOpenvpn:
|
|
|
|
+ - 10.10.0.0/16
|
|
|
|
+ - 10.1.200.0/24
|
|
|
|
|
|
# CCD configmap
|
|
# CCD configmap
|
|
ccd:
|
|
ccd:
|
|
- client: ifconfig-push 10.100.10.2 255.255.0.0
|
|
|
|
- someclient: |-
|
|
|
|
- ifconfig-push 10.100.10.3 255.255.0.0
|
|
|
|
- iroute 192.168.250.0 255.255.255.0
|
|
|
|
|
|
+ test: |-
|
|
|
|
+ ifconfig-push 10.10.10.10 255.255.0.0
|
|
|
|
+ iroute 10.1.200.0 255.255.255.0
|
|
|
|
+# push "route 192.168.200.0 255.255.248.0"
|
|
|
|
|
|
# Router container
|
|
# Router container
|
|
router:
|
|
router:
|
|
- image: "jcr.infoclinica.ru/sys/kubectl"
|
|
|
|
- tag: "1.18.9-3"
|
|
|
|
|
|
+ image: "images.sdsys.ru/sys/ovpn-rsa" #nicolaka/netshoot
|
|
|
|
+ tag: "200207025"
|
|
pullPolicy: IfNotPresent
|
|
pullPolicy: IfNotPresent
|
|
resources:
|
|
resources:
|
|
limits:
|
|
limits:
|
|
@@ -115,5 +96,4 @@ router:
|
|
memory: 50Mi
|
|
memory: 50Mi
|
|
requests:
|
|
requests:
|
|
cpu: 50m
|
|
cpu: 50m
|
|
- memory: 50Mi
|
|
|
|
-
|
|
|
|
|
|
+ memory: 50Mi
|