Retrieves information about the firewall rules configured for the specified edge gateway, including the globalConfig, defaultPolicy, and the configured rules.

1

Log in to vCloud Air as an administrator. See Log in to vCloud Air for information.

2

Create a login session with vCloud Director. See Create a Session for a Virtual Data Center in a Service for information.

3

Using the vCloud API, query vCloud Director for the ID of the edge gateway for which you require firewall rules configuration details. See Querying the vCloud API for information.

To get the details for the firewall rules configuration for an edge gateway, issue the following request:

GET https://vchs.vmware.com/hybridity/api/gateways/gatewayId/firewall/config

In the request header, include the OATH token and the Accept header that you obtained when creating a login session:

Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "vcloud-auth-token"

If the request is successful, the server returns HTTP response code 200 and the details of the edge gateway firewall configuration.

Request Header – List the Edge Gateway Firewall Configuration

GET https://vchs.vmware.com/hybridity/api/gateways/gw-5/firewall/config
Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "d6eFLOqQYfuEn2MJTp7BQ2ISEO+ZYaEgTcqBy8wZQ6js="

Request body not required.

Response Body – List the Edge Gateway Firewall Configuration

{
  "featureType" : "firewall_4.0"
  "enabled" : true,
  "defaultPolicy" : {
    "action" : "deny",
    "loggingEnabled" : false
  },
  "firewallRules" : {
    "firewallRules" : [ 
{
      "name" : " ",
      "ruleType" : "user",
      "enabled" : true,
      "loggingEnabled" : false,
      "description" : "",
      "matchTranslated" : false,
      "action" : "accept",
      "application" : {
        "applicationId" : [ ],
        "service" : [ {
          "protocol" : "icmp",
          "icmpType" : "any"
        } ]
      }
    }, {
      "ruleType" : "user",
      "enabled" : true,
      "loggingEnabled" : false,
      "description" : "",
      "matchTranslated" : false,
      "action" : "accept",
      "source" : {
        "exclude" : false,
        "ipAddress" : [ "192.168.32.0/24" ],
        "groupingObjectId" : [ ],
        "vnicGroupId" : [ ]
      },
      "destination" : {
        "exclude" : false,
        "ipAddress" : [ ],
        "groupingObjectId" : [ ],
        "vnicGroupId" : [ "external" ]
      },
      "application" : {
        "applicationId" : [ ],
        "service" : [ {
          "protocol" : "tcp",
          "port" : [ "80" ],
          "sourcePort" : [ "any" ]
        } ]
      }
    }, {
      "ruleType" : "user",
      "enabled" : true,
      "loggingEnabled" : false,
      "description" : "",
      "matchTranslated" : false,
      "action" : "accept",
      "source" : {
        "exclude" : false,
        "ipAddress" : [ "any" ],
        "groupingObjectId" : [ ],
        "vnicGroupId" : [ ]
      },
      "destination" : {
        "exclude" : false,
        "ipAddress" : [ "192.168.4.50" ],
        "groupingObjectId" : [ ],
        "vnicGroupId" : [ ]
      },
      "application" : {
        "applicationId" : [ ],
        "service" : [ {
          "protocol" : "tcp",
          "port" : [ "121" ],
          "sourcePort" : [ "any" ]
        } ]
      }
    }, {
      "ruleType" : "user",
      "enabled" : true,
      "loggingEnabled" : false,
      "description" : "",
      "matchTranslated" : false,
      "action" : "accept",
      "source" : {
        "exclude" : false,
        "ipAddress" : [ "any" ],
        "groupingObjectId" : [ ],
        "vnicGroupId" : [ ]
      },
      "destination" : {
        "exclude" : false,
        "ipAddress" : [ "192.168.4.51" ],
        "groupingObjectId" : [ ],
        "vnicGroupId" : [ ]
      },
      "application" : {
        "applicationId" : [ ],
        "service" : [ {
          "protocol" : "udp",
          "port" : [ "2049" ],
          "sourcePort" : [ "any" ]
        } ]
      }
    }, {
      "name" : "default rule for ingress traffic",
      "ruleType" : "default_policy",
      "enabled" : true,
      "loggingEnabled" : false,
      "description" : "default rule for ingress traffic",
      "action" : "deny"
    } ]
  }
}