---
title: "Create Firewall NAT Rule"
method: POST
path: "/network/firewall/nat"
tags: ["Network"]
---

# Create Firewall NAT Rule

`POST /network/firewall/nat`

Create and apply a firewall NAT rule

## Request body

- GithubComAlchemillahqSylveInternalInterfacesServicesNetworkUpsertFirewallNATRuleRequest
  - `description` string
  - `destObjId` integer
  - `destRaw` string
  - `dnatTargetObjId` integer
  - `dnatTargetRaw` string
  - `dstPortObjId` integer
  - `dstPortsRaw` string
  - `egressInterfaces` string[], required
  - `enabled` boolean
  - `family` 'any' | 'inet' | 'inet6', required
  - `ingressInterfaces` string[], required
  - `log` boolean
  - `name` string, required
  - `natType` 'snat' | 'dnat' | 'binat', required
  - `policyRouteGateway` string
  - `policyRoutingEnabled` boolean
  - `priority` integer
  - `protocol` 'any' | 'tcp' | 'udp' | 'icmp', required
  - `redirectPortObjId` integer
  - `redirectPortsRaw` string
  - `sourceObjId` integer
  - `sourceRaw` string
  - `translateMode` 'interface' | 'address'
  - `translateToObjId` integer
  - `translateToRaw` string

## Response `201`

Created

- GithubComAlchemillahqSylveInternalAPIResponseUint
  - `data` integer
  - `error` string
  - `message` string
  - `status` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `413` — Payload Too Large
- `500` — Internal Server Error

---

[API](https://skmtc.net/alchemillahq/apis/sylve-api.md) · [All operations](https://skmtc.net/alchemillahq/apis/sylve-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alchemillahq/sylve-api/revisions/7a7bea85004e/schema)
