A feature that allows you to organize and manage multiple resources collectively for easier administration and access control.
Vultr Firewall groups enable the creation and application of network filtering rules that apply to attached instances. A firewall group can consist of multiple rules that filter IPv4 and IPv6 network traffic when attached to an instance.
Follow this guide to manage Vultr Firewall groups using the Vultr Customer Portal, API, CLI, or Terraform.
Send a GET
request to the List Firewall Groups endpoint to view all firewall groups in your Vultr account.
$ curl "https://api.vultr.com/v2/firewalls" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
List all firewall groups in your Vultr account.
$ vultr-cli firewall group list
Open your Terraform configuration for the existing Firewall groups.
Add or update a vultr_firewall_group
with example rules, then apply.
resource "vultr_firewall_group" "default" {
description = "default-fw"
}
resource "vultr_firewall_rule" "allow_http" {
firewall_group_id = vultr_firewall_group.default.id
protocol = "tcp"
port = "80"
ip_type = "v4"
subnet = "0.0.0.0"
subnet_size = 0
notes = "Allow HTTP"
}
resource "vultr_firewall_rule" "allow_https" {
firewall_group_id = vultr_firewall_group.default.id
protocol = "tcp"
port = "443"
ip_type = "v4"
subnet = "0.0.0.0"
subnet_size = 0
notes = "Allow HTTPS"
}
Apply the configuration and observe the following output:
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
No comments yet.