> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/b/barracuda-cloudgen-firewall.md).

# Barracuda CloudGen Firewall

Barracuda CloudGen Firewall is a network firewall that exposes its configuration through a REST API. OctoXLabs reads the firewall network objects as devices and the forwarding firewall users as users.

## Use cases

* Inventory the network objects that are defined on the firewall (Devices).

```
Adapters = barracuda-cloudgen-firewall AND IpAddresses = *
```

* List the forwarding firewall users that Barracuda knows about (Users).

```
Adapters = barracuda-cloudgen-firewall
```

## Before you begin

### Network

| Source              | Destination                                                 | Port                | Protocol                         |
| ------------------- | ----------------------------------------------------------- | ------------------- | -------------------------------- |
| OctoXLabs connector | Barracuda CloudGen Firewall REST API (IP address you enter) | 8443 (configurable) | HTTPS (HTTP if Is Secure is off) |

### Required permissions

| Scope or role                 | Permission | Needed for        |
| ----------------------------- | ---------- | ----------------- |
| REST API Service access token | Read       | Devices and Users |

## Create credentials in Barracuda CloudGen Firewall

{% stepper %}
{% step %}

### Open the REST API Service

Go to **CONFIGURATION > Configuration Tree > Box > Infrastructure Services > REST API Service** and click **Lock**.
{% endstep %}

{% step %}

### Create an access token

In the left menu, click **Access Tokens**. Click the **+** button, enter a **Name** for the token and click **OK**.
{% endstep %}

{% step %}

### Generate the token

In the Access Tokens window, click **Generate new token**. Enter the **Admin name** of the user that the token authenticates as. In **Time to live**, enter the number of days the token stays valid. Click **OK**.
{% endstep %}

{% step %}

### Copy the token

Copy the generated token. You enter it as **API Token** in OctoXLabs.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter | Required | Type    | Default | Description                                                              |
| --------- | -------- | ------- | ------- | ------------------------------------------------------------------------ |
| IP        | Yes      | String  |         | IP address of the Barracuda CloudGen Firewall.                           |
| Port      | No       | Integer | 8443    | Port of the REST API.                                                    |
| API Token | Yes      | String  |         | Token created in the REST API Service. Sent in the `X-API-Token` header. |
| Is Secure | No       | Boolean | True    | Use HTTPS. If off, the connector uses HTTP.                              |
| Timeout   | No       | Integer | 30      | Seconds to wait for API responses.                                       |

## Troubleshooting

| Error message                | Cause                                                                                                                                  | Fix                                                                                                  |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Status Code: `, URL, Method` | The API answered with an unexpected HTTP status. The shared request code raises it and logs the status, URL, method and response body. | Check the URL, the credentials and the permissions listed above, then run the connection test again. |

## Change history

{% hint style="info" %}
Available starting from version 5.6.11.
{% endhint %}
