Skip to main content

Firewall

Manages a Firewall

Allow ingress traffic from anywhere to SSH and HTTP/HTTPS:

const firewall22_80_433 = provider.compute.makeFirewall({
name: `firewall-22-80-433-${stage}`,
properties: () => ({
allowed: [
{
IPProtocol: "tcp",
ports: ["22", "80", "433"],
},
],
}),
});

Allow ping from anywhere:

const firewallIcmp = provider.compute.makeFirewall({
name: `firewall-icmp-${stage}`,
properties: () => ({
allowed: [
{
IPProtocol: "icmp",
},
],
}),
});

Examples#

Properties#

Dependencies#