Skip to content

Commit

Permalink
update fw
Browse files Browse the repository at this point in the history
  • Loading branch information
xanhacks committed Oct 26, 2024
1 parent d51ae27 commit 457262d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions terraform/firewall.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ resource "linode_firewall" "dynamic_challenge_firewall" {
]
}

inbound {
label = "allow-docker-cadvisor"
action = "ACCEPT"
protocol = "TCP"
ports = "1080"
// IPv4 from the VPC
ipv4 = [
for interface in linode_instance.deploy_dynamic.interface : "${interface.ipv4[0].vpc}/32"
if interface.purpose == "vpc"
]
}

inbound {
label = "allow-dynamic-challenges"
action = "ACCEPT"
Expand Down Expand Up @@ -53,6 +65,18 @@ resource "linode_firewall" "static_challenge_firewall" {
ipv6 = ["::/0"]
}

inbound {
label = "allow-docker-cadvisor"
action = "ACCEPT"
protocol = "TCP"
ports = "1080"
// IPv4 from the VPC
ipv4 = [
for interface in linode_instance.deploy_dynamic.interface : "${interface.ipv4[0].vpc}/32"
if interface.purpose == "vpc"
]
}

inbound {
label = "allow-static-http-https"
action = "ACCEPT"
Expand Down Expand Up @@ -101,6 +125,15 @@ resource "linode_firewall" "deploy_dynamic_firewall" {
ipv6 = ["::/0"]
}

inbound {
label = "allow-grafana"
action = "ACCEPT"
protocol = "TCP"
ports = "9100"
ipv4 = ["0.0.0.0/0"]
ipv6 = ["::/0"]
}

inbound_policy = "DROP"

// OUTBOUND (Allow all)
Expand Down

0 comments on commit 457262d

Please sign in to comment.