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

# Get Firewall Rules

> Get the list of firewall rules for a server. A rule the server's
firewall refused at the last sync has the reason in `sync_error` and
is not in effect.




## OpenAPI

````yaml get /servers/{server}/firewall
openapi: 3.1.0
info:
  title: APIFiddle Sample Definition
  version: 0.0.0
  description: Example workspace
servers:
  - url: https://rdp.sh/api/v1
    description: Default production endpoint.
security: []
paths:
  /servers/{server}/firewall:
    get:
      summary: Get firewall rules
      description: |
        Get the list of firewall rules for a server. A rule the server's
        firewall refused at the last sync has the reason in `sync_error` and
        is not in effect.
      operationId: getFirewallRules
      parameters:
        - $ref: '#/components/parameters/server'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                title: GetFirewallRulesOk
                properties:
                  status:
                    type: boolean
                  rules:
                    type: array
                    items:
                      $ref: '#/components/schemas/firewallRule'
                  options:
                    type: object
          description: Firewall rules retrieved successfully.
        '403':
          description: Unauthorized access.
      security:
        - Authorization: []
components:
  parameters:
    server:
      in: path
      name: server
      schema:
        type: string
      required: true
  schemas:
    firewallRule:
      type: object
      properties:
        pos:
          type: integer
          description: Rule position index
        type:
          type: string
          enum:
            - in
            - out
        action:
          type: string
          enum:
            - ACCEPT
            - DROP
            - REJECT
        proto:
          type: string
        dport:
          type: string
        sport:
          type: string
        source:
          type: string
        dest:
          type: string
        comment:
          type: string
        enable:
          type: integer
        sync_error:
          type: string
          nullable: true
          description: >
            `null`, or the reason the server's firewall refused the rule at the
            last sync.

            A rule with `sync_error` set is not in effect.
          examples:
            - >-
              Parameter verification failed. dport: invalid format - invalid
              port ' 443'
      description: Firewall rule object.
  securitySchemes:
    Authorization:
      in: header
      name: Authorization
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.