53 lines
715 B
Terraform
53 lines
715 B
Terraform
|
resource "hcloud_firewall" "base" {
|
||
|
name = "base"
|
||
|
|
||
|
rule {
|
||
|
direction = "in"
|
||
|
protocol = "icmp"
|
||
|
source_ips = [
|
||
|
"0.0.0.0/0",
|
||
|
"::/0"
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
resource "hcloud_firewall" "tailscale" {
|
||
|
name = "tailscale"
|
||
|
|
||
|
rule {
|
||
|
direction = "in"
|
||
|
protocol = "udp"
|
||
|
port = "41641"
|
||
|
source_ips = [
|
||
|
"0.0.0.0/0",
|
||
|
"::/0"
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
resource "hcloud_firewall" "web" {
|
||
|
name = "web"
|
||
|
|
||
|
# HTTP
|
||
|
rule {
|
||
|
direction = "in"
|
||
|
protocol = "tcp"
|
||
|
port = "80"
|
||
|
source_ips = [
|
||
|
"0.0.0.0/0",
|
||
|
"::/0"
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# HTTPS
|
||
|
rule {
|
||
|
direction = "in"
|
||
|
protocol = "tcp"
|
||
|
port = "443"
|
||
|
source_ips = [
|
||
|
"0.0.0.0/0",
|
||
|
"::/0"
|
||
|
]
|
||
|
}
|
||
|
}
|