Actions34
- LAN Actions
- NIC Actions
- Firewall Rule Actions
- IP Block Actions
- NAT Gateway Actions
- NAT Gateway Rule Actions
- Flow Log Actions
NAT Gateway Rule → Create
AI-generatedSummary
Create a NAT gateway rule on a specified IONOS NAT gateway
Inputs
- datacenterId (required) — The unique ID of the datacenter
- natGatewayId (required) — The unique ID of the NAT gateway
- natGatewayRuleName (required) — The name of the NAT gateway rule
- sourceSubnet (required) — The source subnet in CIDR notation (e.g., 10.0.0.0/24)
- publicIp (required) — The public IP to use for NAT
- additionalFields — Optional additional configuration for the rule. Add fields via the UI's 'Add Field' button: protocol (TCP/UDP/ICMP/ALL), targetSubnet (CIDR), targetPortRangeStart, targetPortRangeEnd.
Output shape
API response containing the created NAT gateway rule object
Returned data follows the IONOS Cloud API response format for rule creation.
Examples
Example 1: Create a rule allowing TCP traffic from 10.0.0.0/24 via public IP 203.0.113.5 on NAT gateway gw-1234 in datacenter dc-5678
datacenterId=dc-5678, natGatewayId=gw-1234, natGatewayRuleName=allow-tcp-source, sourceSubnet=10.0.0.0/24, publicIp=203.0.113.5, additionalFields.protocol=TCP