mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-29 03:00:09 +00:00
wireguard mostly done...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
29ccc82581
commit
044bff7e8c
@ -35,6 +35,7 @@ LAN_GATE=-
|
|||||||
|
|
||||||
REBOOT=${REBOOT:=1}
|
REBOOT=${REBOOT:=1}
|
||||||
|
|
||||||
|
# Wireguard config...
|
||||||
DFL_ENDPOINT=${DFL_ENDPOINT:=$(dig +short ${DOMAIN:-$DFL_DOMAIN} | tail -1)}
|
DFL_ENDPOINT=${DFL_ENDPOINT:=$(dig +short ${DOMAIN:-$DFL_DOMAIN} | tail -1)}
|
||||||
xread "Wireguard endpoint: " ENDPOINT
|
xread "Wireguard endpoint: " ENDPOINT
|
||||||
|
|
||||||
@ -42,6 +43,7 @@ DFL_ENDPOINT_PORT=${DFL_ENDPOINT_PORT:=51820}
|
|||||||
xread "Wireguard endpoint port: " ENDPOINT_PORT
|
xread "Wireguard endpoint port: " ENDPOINT_PORT
|
||||||
|
|
||||||
CLIENT_IPS=${CLIENT_IPS:-10.42.0.0/16}
|
CLIENT_IPS=${CLIENT_IPS:-10.42.0.0/16}
|
||||||
|
ALLOWED_IPS=${ALLOWED_IPS:-0.0.0.0/0,${CLIENT_IPS}}
|
||||||
|
|
||||||
|
|
||||||
readVars
|
readVars
|
||||||
@ -75,7 +77,7 @@ OPTS_STAGE_2="\
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
echo "# Building config..."
|
echo "# Building config..."
|
||||||
buildAssets ENDPOINT ENDPOINT_PORT DNS CLIENT_IPS
|
buildAssets ENDPOINT ENDPOINT_PORT DNS CLIENT_IPS ALLOWED_IPS
|
||||||
|
|
||||||
echo "# Creating CT..."
|
echo "# Creating CT..."
|
||||||
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
||||||
|
|||||||
@ -11,12 +11,12 @@ SERVER_PUBLIC_KEY := $(SERVER_DIR)/server_id.pub
|
|||||||
CLIENT_TPL := templates/client.conf
|
CLIENT_TPL := templates/client.conf
|
||||||
CLIENT_DIR := $(SERVER_DIR)/clients/
|
CLIENT_DIR := $(SERVER_DIR)/clients/
|
||||||
|
|
||||||
CLIENT_IPS ?= ${CLIENT_IPS}
|
|
||||||
ENDPOINT_PORT ?= ${ENDPOINT_PORT}
|
|
||||||
ENDPOINT ?= ${ENDPOINT}
|
|
||||||
|
|
||||||
|
ENDPOINT ?= ${ENDPOINT}
|
||||||
|
ENDPOINT_PORT ?= ${ENDPOINT_PORT}
|
||||||
DNS ?= ${DNS}
|
DNS ?= ${DNS}
|
||||||
ALLOWED_IPS ?= 0.0.0.0/0
|
CLIENT_IPS ?= ${CLIENT_IPS}
|
||||||
|
ALLOWED_IPS ?= ${ALLOWED_IPS}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user