> 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/f/f5-big-ip.md).

# F5 BIG IP

F5 BIG-IP is an application delivery controller with WAF features. OctoXLabs uses the iControl REST API to add virtual servers with their pools, policies and ASM policies, the physical BIG-IP devices, 1:1 NAT objects and the backend pool members. It flags assets that are reachable from the internet.

## Use cases

* Find virtual servers that are reachable from the internet.
* List backend servers published by a BIG-IP virtual server and compare them with other sources.

```
Adapters = f5-waf
```

* Find hosts published through BIG-IP that your EDR does not cover.

```
Adapters = f5-waf AND NOT Adapters = falcon-crowdstrike
```

## Before you begin

### Network

| Source              | Destination                  | Port               | Protocol                         |
| ------------------- | ---------------------------- | ------------------ | -------------------------------- |
| OctoXLabs connector | F5 BIG-IP management address | 443 (configurable) | HTTPS (HTTP if Is Secure is off) |

### Required permissions

| Scope or role                                   | Permission | Needed for                                                         |
| ----------------------------------------------- | ---------- | ------------------------------------------------------------------ |
| Account able to log in with the `tmos` provider | Read       | `/mgmt/tm/ltm/virtual`, pools, pool members and LTM policies       |
| Read access to ASM policies                     | Read       | `/mgmt/tm/asm/policies`                                            |
| Read access to CM devices                       | Read       | `/mgmt/tm/cm/device` (optional, logged if missing)                 |
| Read access to NAT objects                      | Read       | `/mgmt/tm/ltm/nat` (only when Fetch NATs is on, logged if missing) |

Not verified: the BIG-IP role name. The account must be able to read the objects above.

## Create credentials in F5 BIG-IP

{% stepper %}
{% step %}

### Create an account

Create a BIG-IP user that can sign in to the REST API.
{% endstep %}

{% step %}

### Grant read access

Give the user read access to LTM virtual servers, pools, policies, ASM policies, CM devices and NAT objects.
{% endstep %}

{% step %}

### List external VLANs (optional)

To flag internet facing assets by VLAN, collect the names of the VLANs on the untrusted side, for example `external,wan`.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter      | Required | Type              | Default | Description                                                                                                                                                                                    |
| -------------- | -------- | ----------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IP             | Yes      | String            | None    | IP address of the BIG-IP host.                                                                                                                                                                 |
| Port           | No       | Integer           | `443`   | Port.                                                                                                                                                                                          |
| Username       | Yes      | String            | None    | Account name.                                                                                                                                                                                  |
| Password       | Yes      | String            | None    | Password.                                                                                                                                                                                      |
| Timeout        | No       | Integer (seconds) | `30`    | Time to wait for API responses.                                                                                                                                                                |
| Is Secure      | No       | Boolean           | `True`  | Use HTTPS.                                                                                                                                                                                     |
| External VLANs | No       | List of strings   | Empty   | VLAN names for the internet or untrusted side. A virtual server is flagged Internet Facing when its VIP is public or bound to one of these VLANs. Leave empty to use public IP detection only. |
| Fetch NATs     | No       | Boolean           | `True`  | Fetch standalone 1:1 NAT objects as assets, pairing each public address with its internal server.                                                                                              |

## Troubleshooting

| Error message                                               | Cause                                      | Fix                                                                   |
| ----------------------------------------------------------- | ------------------------------------------ | --------------------------------------------------------------------- |
| `Failed to get API token: <status>`                         | The login did not return HTTP 200.         | Check the user name, password and that the user can use the REST API. |
| `Request failed after <n> retries for url <url>`            | BIG-IP kept answering HTTP 401.            | Check the account.                                                    |
| `F5 pool/member enrichment skipped for VIP <name>: <error>` | The pool or its members could not be read. | Give read permission on the pool members.                             |
| `F5 physical (CM) device fetch skipped for <url>: <error>`  | No read access to `/mgmt/tm/cm/device`.    | Grant read permission. Virtual servers are still collected.           |
| `F5 NAT (ltm/nat) fetch skipped for <url>: <error>`         | No read access to `/mgmt/tm/ltm/nat`.      | Grant read permission or turn off Fetch NATs.                         |

## Change history
