add mail firewall rules

This commit is contained in:
vincent 2023-10-01 19:29:19 +02:00
parent 15e1c5c018
commit cd35d16f0f
2 changed files with 36 additions and 1 deletions

View File

@ -85,3 +85,34 @@ resource "hcloud_firewall" "Gitea_SSH" {
]
}
}
resource "hcloud_firewall" "mail" {
name= "mail"
rule {
direction ="in"
protocol = "tcp"
port="25"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
rule {
direction ="in"
protocol = "tcp"
port="993"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
rule {
direction ="in"
protocol = "tcp"
port="465"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
}

View File

@ -5,7 +5,11 @@ resource "hcloud_server" "HomeLab2" {
server_type = var.server_type
location = var.location
ssh_keys = [hcloud_ssh_key.default.id]
firewall_ids = [hcloud_firewall.prod.id,hcloud_firewall.Gitea_SSH.id]
firewall_ids = [
hcloud_firewall.prod.id,
hcloud_firewall.Gitea_SSH.id,
hcloud_firewall.mail.id,
]
labels = {
}