Generate vpn keys on mesh
This commit is contained in:
parent
8322e0a553
commit
5ee100c67d
|
@ -454,6 +454,18 @@ function remove_user_vpn {
|
||||||
new_username="$1"
|
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 {
|
function generate_stunnel_keys {
|
||||||
openssl req -x509 -nodes -days 3650 -sha256 \
|
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" \
|
-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 TEXTDOMAIN=${PROJECT_NAME}-image-mesh
|
||||||
export TEXTDOMAINDIR="/usr/share/locale"
|
export TEXTDOMAINDIR="/usr/share/locale"
|
||||||
|
|
||||||
|
source /usr/local/bin/${PROJECT_NAME}-app-vpn
|
||||||
|
|
||||||
# The browser application to use
|
# The browser application to use
|
||||||
BROWSER=midori
|
BROWSER=midori
|
||||||
BROWSER_OPTIONS='-p'
|
BROWSER_OPTIONS='-p'
|
||||||
|
@ -616,6 +618,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then
|
||||||
configure_toxcore
|
configure_toxcore
|
||||||
create_tox_user
|
create_tox_user
|
||||||
#setup_tahoelafs
|
#setup_tahoelafs
|
||||||
|
mesh_setup_vpn
|
||||||
setup_ipfs
|
setup_ipfs
|
||||||
mesh_amnesic
|
mesh_amnesic
|
||||||
make_root_read_only
|
make_root_read_only
|
||||||
|
|
Loading…
Reference in New Issue