Retrieve configured NAT Gateway port forwarding rules for auditing and troubleshooting.
Port forwarding rules define which external ports on the NAT Gateway route traffic to specific internal instances.
Follow this guide to list NAT Gateway subscription port forwarding 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 Port Forwarding section.
The port forwarding rules table displays all configured rules with the following information:
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 Port Forwarding Rules endpoint. 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/port-forwarding-rules" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Verify that the response contains all port forwarding rules configured for the NAT Gateway. Each rule includes the id, name, protocol, external_port, internal_ip, internal_port, enabled status, and description fields.