Import missing OpenVPN tools

This commit is contained in:
Kumi 2019-02-01 15:12:12 +00:00
parent 20c410b5c4
commit 56e0c24499
3 changed files with 42 additions and 0 deletions

19
misc/base.conf Normal file
View file

@ -0,0 +1,19 @@
# VPN360 Client Configuration
# (c) 2018 Kumi Systems e.U.
# https://kumi.systems
client
dev tap
proto tcp
remote public.vpn360 443
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
remote-cert-tls server
key-direction 1
cipher AES-256-CBC
verb 3

20
misc/make_config Normal file
View file

@ -0,0 +1,20 @@
#!/bin/bash
# First argument: Client identifier
KEY_DIR=/etc/openvpn/ca/keys
OUTPUT_DIR=/etc/openvpn/client-configs/files
BASE_CONFIG=/etc/openvpn/client-configs/base.conf
cat ${BASE_CONFIG} \
<(echo -e '<ca>') \
${KEY_DIR}/ca.crt \
<(echo -e '</ca>\n<cert>') \
${KEY_DIR}/${1}.crt \
<(echo -e '</cert>\n<key>') \
${KEY_DIR}/${1}.key \
<(echo -e '</key>\n<tls-auth>') \
${KEY_DIR}/ta.key \
<(echo -e '</tls-auth>') \
> ${OUTPUT_DIR}/${1}.ovpn

View file

@ -20,6 +20,9 @@ sudo chown vpn.vpn . /etc/openvpn/ca -R
sudo cp misc/vpnmanager.service /etc/systemd/system/
chmod +x misc/cron
sudo cp misc/cron /etc/cron.d/vpnmanager
sudo mkdir -p /etc/openvpn/client-configs/files
chmod +x misc/make_config
sudo cp misc/make_config misc/base.conf /etc/openvpn/client-configs
sudo systemctl daemon-reload
sudo systemctl enable vpnmanager
sudo systemctl start vpnmanager