Generate vpn keys on mesh

This commit is contained in:
Bob Mottram 2017-09-30 14:01:05 +01:00
parent 8322e0a553
commit 5ee100c67d
2 changed files with 15 additions and 0 deletions

View File

@ -454,6 +454,18 @@ function remove_user_vpn {
new_username="$1"
}
function mesh_setup_vpn {
vpn_generate_keys
if [ ${VPN_TLS_PORT} -ne 443 ]; then
firewall_add VPN-TLS ${VPN_TLS_PORT} tcp
fi
generate_stunnel_keys
systemctl restart openvpn
}
function generate_stunnel_keys {
openssl req -x509 -nodes -days 3650 -sha256 \
-subj "/O=$VPN_ORGANISATION/OU=$VPN_UNIT/C=$VPN_COUNTRY_CODE/ST=$VPN_AREA/L=$VPN_LOCATION/CN=$HOSTNAME" \

View File

@ -31,6 +31,8 @@ PROJECT_NAME='freedombone'
export TEXTDOMAIN=${PROJECT_NAME}-image-mesh
export TEXTDOMAINDIR="/usr/share/locale"
source /usr/local/bin/${PROJECT_NAME}-app-vpn
# The browser application to use
BROWSER=midori
BROWSER_OPTIONS='-p'
@ -616,6 +618,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then
configure_toxcore
create_tox_user
#setup_tahoelafs
mesh_setup_vpn
setup_ipfs
mesh_amnesic
make_root_read_only