homelab/infra/firewall.tf

88 lines
1.2 KiB
Terraform
Raw Normal View History

2022-09-03 07:01:47 +00:00
resource "hcloud_firewall" "prod" {
name= "prod"
2022-06-19 17:04:15 +00:00
rule {
direction ="in"
protocol = "tcp"
port = "80"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
rule {
direction ="in"
protocol = "tcp"
port = "443"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
2022-08-27 07:37:25 +00:00
# torrent UDH port
2022-06-19 17:04:15 +00:00
rule {
direction ="in"
2022-08-27 07:37:25 +00:00
protocol = "udp"
2022-06-19 17:04:15 +00:00
port = "6881"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
2022-08-27 07:37:25 +00:00
# wireguard port
2022-06-19 17:04:15 +00:00
rule {
direction ="in"
protocol = "udp"
port = "51820"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
2022-08-27 07:37:25 +00:00
# torrent listen port
2022-06-19 17:04:15 +00:00
rule {
direction ="in"
2022-08-27 07:37:25 +00:00
protocol = "tcp"
port = "50000"
2022-06-19 17:04:15 +00:00
source_ips = [
"0.0.0.0/0",
"::/0"
]
2022-08-27 07:37:25 +00:00
2022-06-19 17:04:15 +00:00
}
rule {
2022-08-27 07:37:25 +00:00
direction ="in"
protocol = "icmp"
2022-06-19 17:04:15 +00:00
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
2022-09-03 07:01:47 +00:00
}
resource "hcloud_firewall" "ssh" {
name= "ssh"
rule {
direction ="in"
protocol = "tcp"
port="22"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
2022-06-19 17:04:15 +00:00
}
2022-10-08 07:12:41 +00:00
resource "hcloud_firewall" "Gitea_SSH" {
name= "Gitea SSH"
rule {
direction ="in"
protocol = "tcp"
port="2222"
source_ips = [
"0.0.0.0/0",
"::/0"
]
}
}