adding wip code on improvements to wgas

ctalarms-whitelist
lalanza808 4 years ago
parent 66075fd19d
commit 6725ecb118

@ -24,7 +24,7 @@ module "vpn_asg" {
ENDPOINT = aws_eip.vpn.public_ip
REGION = data.aws_region.current.name
CONFIG_BUCKET = aws_s3_bucket.configs.id
WIREGUARD_INTERFACE = var.wireguard_interface
WIREGUARD_NETWORK = var.wireguard_network
WIREGUARD_PORT = var.wireguard_vpn_port
CLIENT_ROUTE = var.client_route
AUTO_UPGRADE = var.auto_upgrade

@ -19,6 +19,7 @@ export WGAS_SUDO=true
export WGAS_DNS=$INSTANCE_PRIVATE_IP
export WGAS_ROUTE=${CLIENT_ROUTE}
export WGAS_PORT=${WIREGUARD_PORT}
export WGAS_NETWORK=${WIREGUARD_NETWORK}
# Update package meta
@ -59,8 +60,8 @@ else
wg genkey | tee $WG_HOME/privkey | wg pubkey > $WG_HOME/pubkey
cat << EOF > $WG_HOME/wg0.conf
[Interface]
Address = ${WIREGUARD_INTERFACE}
ListenPort = ${WIREGUARD_PORT}
Address = $WGAS_NETWORK
ListenPort = $WGAS_PORT
PrivateKey = $(cat $WG_HOME/privkey)
SaveConfig = true
EOF

@ -41,7 +41,7 @@ variable "public_subnets" {
description = "List of subnets for deploying WireGuard VPN servers into"
}
variable "wireguard_interface" {
variable "wireguard_network" {
default = "10.66.66.1/24"
description = "VPN tunnel interface IP and CIDR"
}

Loading…
Cancel
Save