Learn how to list NAT Gateway firewall rules in Vultr via portal or API.
NAT Gateway firewall rules control which traffic is permitted or denied through the gateway based on IP protocol, port, and source subnet. Listing rules allows you to review active policies, verify security configurations, troubleshoot connectivity issues, and audit traffic controls for workloads using the NAT Gateway.
Follow this guide to list NAT Gateway subscription firewall rules using the Vultr Customer Portal or API.
Navigate to Products, expand the Network drop-down and select VPC Networks.
Select your target VPC Network with NAT Gateway connectivity.
Scroll to the NAT Firewall section.
The section displays all configured firewall rules in a table with the following columns:
Send a GET request to the List VPCs endpoint to retrieve available VPCs.
$ curl "https://api.vultr.com/v2/vpcs" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
The output displays all VPCs in your account. Note the id field for the target VPC.
Send a GET request to the List NAT Gateway subscriptions endpoint to retrieve the gateway ID. Replace VPC_ID with the ID from the previous step.
$ curl "https://api.vultr.com/v2/vpcs/VPC_ID/nat-gateway" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
The output displays NAT Gateway subscriptions for the VPC. Note the id field for the target gateway.
Send a GET request to the List NAT Gateway Firewall Rules endpoint to retrieve all firewall rules. Replace VPC_ID and NAT_GATEWAY_ID with your values.
$ curl "https://api.vultr.com/v2/vpcs/VPC_ID/nat-gateway/NAT_GATEWAY_ID/global/firewall-rules" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
The output displays all firewall rules configured for the gateway in the firewall_rules array. Each rule object contains:
id: Unique identifier for the ruleaction: Rule action (accept)protocol: Network protocol (tcp or udp)port: Target port number as a stringsubnet: Source subnet in CIDR notationsubnet_size: Subnet mask sizenotes: Rule descriptionThe response includes a meta object with the total count and pagination links.