A process that prepares and configures a server or service for use after initial deployment.
Vultr Firewall is a web-based service that filters network traffic to instances in your Vultr account using groups. A Vultr Firewall group consists of multiple IPv4 and IPv6 network rules that enable you to define specific ports and traffic sources to your instances.
Follow this guide to create a new Vultr Firewall group to manage network traffic filtering rules using the Vultr Customer Portal, API, CLI, or Terraform.
Send a GET
request to the List Firewall Groups endpoint and verify all active firewall groups in your Vultr account.
$ curl "https://api.vultr.com/v2/firewalls" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a POST
request to the Create Firewall Group endpoint to create a new Vultr Firewall group.
$ curl "https://api.vultr.com/v2/firewalls" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Visit the List Firewall Groups API page to view additional attributes to apply on the firewall group.
List all Vultr Firewall groups in your account.
$ vultr-cli firewall group list
Create a new Vultr Firewall group.
$ vultr-cli firewall group create --description <label>
Run vultr-cli firewall group create --help
to view additional options to apply on the firewall group.
Ensure the Vultr Terraform provider is configured in your Terraform project.
Create a firewall group (and optionally a rule), then apply.
resource "vultr_firewall_group" "web" {
description = "web-fw"
}
resource "vultr_firewall_rule" "allow_http" {
firewall_group_id = vultr_firewall_group.web.id
protocol = "tcp"
port = "80"
ip_type = "v4"
subnet = "0.0.0.0"
subnet_size = 0
notes = "Allow HTTP"
}
Apply the configuration and observe the following output:
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
No comments yet.