mirror of
https://github.com/mr0xb/home-iac.git
synced 2026-08-28 03:44:57 -04:00
initial commit
This commit is contained in:
commit
5e3d71294d
10 changed files with 274 additions and 0 deletions
45
terraform/unifi/firewall.tf
Normal file
45
terraform/unifi/firewall.tf
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
resource "unifi_firewall_rule" "block_iot_to_trusted" {
|
||||
name = "Isolate IOT"
|
||||
ruleset = "LAN_IN"
|
||||
action = "drop"
|
||||
protocol = "all"
|
||||
|
||||
src_network_id = unifi_network.iot.id
|
||||
src_network_type = "NETv4"
|
||||
dst_network_id = unifi_network.trusted.id
|
||||
dst_network_type = "NETv4"
|
||||
|
||||
state_new = true
|
||||
state_established = false
|
||||
state_invalid = true
|
||||
state_related = false
|
||||
}
|
||||
|
||||
resource "unifi_firewall_rule" "allow_trusted_to_iot" {
|
||||
name = "Allow Trusted to IOT"
|
||||
ruleset = "LAN_IN"
|
||||
action = "accept"
|
||||
protocl = "all"
|
||||
|
||||
src_network_id = unifi_network.trusted.id
|
||||
src_network_type = "NETv4"
|
||||
dst_network_id = unifi_network.iot.id
|
||||
dst_network_type = "NETv4"
|
||||
}
|
||||
|
||||
resource "unifi_firewall_rule" "block_iot_to_trusted" {
|
||||
name = "Isolate IOT"
|
||||
ruleset = "LAN_IN"
|
||||
action = "drop"
|
||||
protocol = "all"
|
||||
|
||||
src_network_id = unifi_network.iot.id
|
||||
src_network_type = "NETv4"
|
||||
dst_network_id = unifi_network.trusted.id
|
||||
dst_network_type = "NETv4"
|
||||
|
||||
state_new = true
|
||||
state_established = false
|
||||
state_invalid = true
|
||||
state_related = false
|
||||
}
|
||||
Loading…
Reference in a new issue