Skip to main content

Firewall

Manages a Firewall

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

const firewall22_80_433 = await provider.makeFirewall({
name: `firewall-22-80-433-${stage}`,
properties: () => ({
allowed: [
{
sourceRanges: ["0.0.0.0/0"],
IPProtocol: "TCP",
ports: [22, 80, 433],
},
],
}),
});

Allow ping from anywhere:

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

Examples#

Properties#

Dependencies#