generated from ethpandaops/template-devnets
-
Notifications
You must be signed in to change notification settings - Fork 6
/
firewall.tf
87 lines (77 loc) · 1.91 KB
/
firewall.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
resource "hcloud_firewall" "machine_firewall" {
name = "${var.ethereum_network}-firewall"
# SSH
rule {
description = "Allow SSH"
direction = "in"
protocol = "tcp"
port = "22"
source_ips = ["0.0.0.0/0", "::/0"]
}
# Nginx / Web
rule {
description = "Allow HTTP"
direction = "in"
protocol = "tcp"
port = "80"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
description = "Allow HTTPS"
direction = "in"
protocol = "tcp"
port = "443"
source_ips = ["0.0.0.0/0", "::/0"]
}
# Consensus layer p2p port
rule {
description = "Allow consensus p2p port TCP"
direction = "in"
protocol = "tcp"
port = "9000-9001"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
description = "Allow consensus p2p port UDP"
direction = "in"
protocol = "udp"
port = "9000-9001"
source_ips = ["0.0.0.0/0", "::/0"]
}
# Execution layer p2p Port
rule {
description = "Allow execution p2p port TCP"
direction = "in"
protocol = "tcp"
port = "30303"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
description = "Allow execution p2p port UDP"
direction = "in"
protocol = "udp"
port = "30303"
source_ips = ["0.0.0.0/0", "::/0"]
}
# Allow all outbound traffic
rule {
description = "Allow all outbound traffic TCP"
direction = "out"
protocol = "tcp"
port = "1-65535"
destination_ips = ["0.0.0.0/0", "::/0"]
}
rule {
description = "Allow all outbound traffic UDP"
direction = "out"
protocol = "udp"
port = "1-65535"
destination_ips = ["0.0.0.0/0", "::/0"]
}
rule {
description = "Allow all outbound traffic ICMP"
direction = "out"
protocol = "icmp"
destination_ips = ["0.0.0.0/0", "::/0"]
}
}