homelab/infra/firewall.tf

71 lines
1021 B
Terraform
Raw Normal View History

2022-06-19 17:04:15 +00:00
resource "hcloud_firewall" "HomeLab" {
name= "firewall-1"
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-08-27 07:37:25 +00:00
# rule {
# direction = "in"
# protocol = "tcp"
# port = "22"
# source_ips = [
# "0.0.0.0/0",
# "::/0"
# ]
#}
2022-06-19 17:04:15 +00:00
}