feat: Changed openvpn for wireguard

This commit is contained in:
2026-07-21 17:17:33 +01:00
parent 7ebd02f6b8
commit a9d602f35e
9 changed files with 53 additions and 39 deletions
+2 -7
View File
@@ -5,13 +5,8 @@
resource "hcloud_zone" "this" {
for_each = toset(var.zone_names)
name = each.value
mode = "primary"
delete_protection = true # API-level guard, in addition to prevent_destroy below
lifecycle {
prevent_destroy = true
}
name = each.value
mode = "primary"
}
locals {
+3 -3
View File
@@ -1,4 +1,4 @@
# vpn: OpenVPN + Traefik. Not attached to the private network (see docs/architecture.md).
# vpn: WireGuard (wg-easy) + Traefik. Not attached to the private network (see docs/architecture.md).
resource "hcloud_firewall" "this" {
name = "vpn-firewall"
@@ -23,10 +23,10 @@ resource "hcloud_firewall" "this" {
source_ips = ["0.0.0.0/0", "::/0"]
}
rule { # OpenVPN tunnel - always direct to this server's public IP, never via a load balancer
rule { # WireGuard tunnel - always direct to this server's public IP, never via a load balancer
direction = "in"
protocol = "udp"
port = "1194"
port = "51820"
source_ips = ["0.0.0.0/0", "::/0"]
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
variable "server_type" {
description = "Server type for vpn (OpenVPN + Traefik)."
description = "Server type for vpn (WireGuard/wg-easy + Traefik)."
type = string
}