Skip to content
Snippets Groups Projects
Commit 5ee100c6 authored by Bob Mottram's avatar Bob Mottram
Browse files

Generate vpn keys on mesh

parent 8322e0a5
No related branches found
No related tags found
No related merge requests found
......@@ -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" \
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment