> ## Documentation Index
> Fetch the complete documentation index at: https://team.k0labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create firewall

> Create a network firewall policy



## OpenAPI

````yaml api-docs/archived/arc.json post /v1/regions/{region}/compute/firewalls
openapi: 3.1.1
info:
  title: Compute API
  version: 1.0.0
  description: >-
    Compute API for the k0rdent Enterprise platform. Provides Kubernetes cluster
    lifecycle management, virtual machine operations, and software-defined
    networking (SDN) including subnets, IPAM, load balancing, peering,
    interconnects, and firewalls.
  contact:
    name: k0rdent Enterprise API Support
    email: api-support@example.com
    url: https://support.example.com
  license:
    name: Proprietary
    url: https://k0rdent.example.com/license
servers:
  - url: ''
    description: For documentation only
  - url: https://api.example.com
    description: Arc API Base URL
  - url: https://api.internal.example.com
    description: Atlas API Base URL
  - url: http://localhost:{port}
    description: Local Development
    variables:
      port:
        default: '4005'
        description: Compute service port
security: []
paths:
  /v1/regions/{region}/compute/firewalls:
    post:
      tags:
        - Firewalls
      summary: Create firewall
      description: Create a network firewall policy
      operationId: createFirewall
      parameters:
        - name: region
          in: path
          required: true
          schema:
            type: string
          description: Region identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                networkId:
                  type: string
                  nullable: true
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      priority:
                        type: number
                      direction:
                        type: string
                        enum:
                          - ingress
                          - egress
                      action:
                        type: string
                        enum:
                          - allow
                          - deny
                      protocol:
                        type: string
                      source:
                        type: string
                      destination:
                        type: string
                      ports:
                        type: string
                        nullable: true
              required:
                - name
                - rules
      responses:
        '201':
          description: Firewall created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/Firewall'
components:
  schemas:
    Firewall:
      type: object
      description: Network firewall / security policy
      properties:
        id:
          type: string
        name:
          type: string
        networkId:
          type: string
          nullable: true
          description: Scoped to network (null = global)
        rules:
          type: array
          items:
            type: object
            properties:
              priority:
                type: number
              direction:
                type: string
                enum:
                  - ingress
                  - egress
              action:
                type: string
                enum:
                  - allow
                  - deny
              protocol:
                type: string
                enum:
                  - TCP
                  - UDP
                  - ICMP
                  - any
              source:
                type: string
                description: Source CIDR or tag
              destination:
                type: string
                description: Destination CIDR or tag
              ports:
                type: string
                nullable: true
                description: Port or range (e.g., 80, 8000-9000)
        status:
          type: string
          enum:
            - active
            - disabled
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - rules
        - status

````