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 ENDPOINT = aws_eip.vpn.public_ip
REGION = data.aws_region.current.name REGION = data.aws_region.current.name
CONFIG_BUCKET = aws_s3_bucket.configs.id CONFIG_BUCKET = aws_s3_bucket.configs.id
WIREGUARD_INTERFACE = var.wireguard_interface WIREGUARD_NETWORK = var.wireguard_network
WIREGUARD_PORT = var.wireguard_vpn_port WIREGUARD_PORT = var.wireguard_vpn_port
CLIENT_ROUTE = var.client_route CLIENT_ROUTE = var.client_route
AUTO_UPGRADE = var.auto_upgrade AUTO_UPGRADE = var.auto_upgrade

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

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

Loading…
Cancel
Save