summaryrefslogtreecommitdiff
path: root/Terraform/Azure/VPN-Server-WireGuard/security_groups.tf
diff options
context:
space:
mode:
Diffstat (limited to 'Terraform/Azure/VPN-Server-WireGuard/security_groups.tf')
-rw-r--r--Terraform/Azure/VPN-Server-WireGuard/security_groups.tf32
1 files changed, 32 insertions, 0 deletions
diff --git a/Terraform/Azure/VPN-Server-WireGuard/security_groups.tf b/Terraform/Azure/VPN-Server-WireGuard/security_groups.tf
new file mode 100644
index 0000000..ffc63ad
--- /dev/null
+++ b/Terraform/Azure/VPN-Server-WireGuard/security_groups.tf
@@ -0,0 +1,32 @@
+resource "azurerm_network_security_group" "azure_sg_vyos" {
+ name = join("-", [var.prefix, "VyOS", "SG"])
+ location = var.location
+ resource_group_name = var.resource_group
+ tags = var.tags
+
+ # For SSH Traffic
+ security_rule {
+ name = "SSH-VyOS"
+ priority = 101
+ direction = "Inbound"
+ access = "Allow"
+ protocol = "Tcp"
+ source_port_range = "*"
+ destination_port_range = "22"
+ source_address_prefix = "*"
+ destination_address_prefix = "*"
+ }
+
+ # For Wireguard Traffic
+ security_rule {
+ name = "Wireguard"
+ priority = 103
+ direction = "Inbound"
+ access = "Allow"
+ protocol = "Udp"
+ source_port_range = "*"
+ destination_port_range = "51820"
+ source_address_prefix = "*"
+ destination_address_prefix = "*"
+ }
+} \ No newline at end of file