# Execute Response Actions with SonicWall

This configuration will establish a trusted relationship between Radiant Security and your SonicWall firewall to enabled automated and one-click execution tasks.&#x20;

<details>

<summary><i class="fa-bolt-lightning">:bolt-lightning:</i> <mark style="color:red;">Available actions</mark></summary>

The following action is available after you set up the SonicWall API action connector. Keep in mind, additional permissions are required.

* Block IP Address

</details>

At the end of this configuration, you will provide Radiant Security with these values:

* **Administrator Username**
* **Administrator Password**
* **SonicWall Base URL (public IP)**

### Prerequisites

* [ ] User Privileges: SonicWALL Administrator
* [ ] Network connectivity

{% hint style="info" %}
**Note**: Radiant Security needs to be able to connect to the Firewall HTTPs management to be able to execute the actions. Radiant Security IP addresses are listed below.
{% endhint %}

### **Radiant IP addresses:**

* 100.21.80.201
* 52.11.97.167
* 35.164.70.154

### Add an administrator in SonicWall

1. Login to your SonicWall firewall.
2. Navigate to **Device > Settings > Administration - Audit/SonicOS API.**

![](https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2Fk6CIc02MkoVTACPmEGQB%2FSonicWall_API_01.webp?alt=media\&token=dca03d4f-dd9e-41ef-ac16-37ccf1114113)

3. Enable the **SonicOS API** toggle button.
4. Enable **RFC-2617 HTTP Basic Access authentication.**
5. Click **Accept** to apply the changes.
6. Navigate to **Network > System > Interfaces.**
7. Click the interface assigned to **WAN** and click the **Pencil button** to edit it.
8. For **User Login**, enable the **HTTPS** option.

<div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FmGIKjAxY4mMKfIO1v4dF%2FSonicWall_API_02.webp?alt=media&#x26;token=6338fc3c-6f9b-4188-a39c-b7a1448d1ea3" alt="" width="216"><figcaption></figcaption></figure></div>

Click **OK** to apply the changes.

9. Navigate to **Device > Users > Local Users & Groups.**
10. Click **Add User** and enter the following information:

    * Name: `RadiantSecurityAdmin`
    * Password: Set a secure password

    Keep all of the other default settings unchanged.

<div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FO9G1lNFhT6dskcSuc0kv%2FSonicWall_API_03.webp?alt=media&#x26;token=52414b84-0809-425e-82ef-dbe6daff2749" alt="" width="364"><figcaption></figcaption></figure></div>

11. Click the **Groups** tab.
12. Select **SonicWALL Administrators** from the left panel and click the right facing arrow to add it to the right panel.
13. Click **Save**.
14. On the top panel click **Local Groups**.
    * Click **SonicWALL Administrators** to edit it.
    * Click **Administration**.
    * Enable **Members go straight to the management UI on web login**.
    * Click **Save**.

<div align="left"><figure><img src="https://2439665791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPsFulb2ZOtSPcRSc2rXE%2Fuploads%2FIn3SPwEFk6etLfFZysVQ%2FSonicWall_API_04.webp?alt=media&#x26;token=2d905be0-be82-48b6-bf37-f63d8a23951b" alt=""><figcaption></figcaption></figure></div>

### Add the action connector in Radiant Security

1. Login to [Radiant Security](https://app.radiantsecurity.ai/).
2. From the navigation menu, select **Settings** > **Action** **Connectors** and click + **Add Connector** to create a new action connector.
3. Search for and select **SonicWall API** and then click **Credentials.**
4. Under **Credential** **Name**, enter a credential name (use a descriptive name such as Sonicwall - Credentials).
5. Under **Required Credentials**, enter the information you obtained from the previous section:
   * **Username**: Administrator username
   * **Password**: Adminiator password
   * **API Base URL**: SonicWall Base URL (public IP/URL of the firewall)
6. Click **Add Connector** to save your changes.

### Authenticate on the API

The SonicWall API uses Basic Authentication, so you must encode the user and password as Base64 using the format `user:password`, and include it in the Authorization header:

Example:

```markup
user = admin
password = 12345

admin:12345 -> base64 encode -> YWRtaW46MTIzNDU=

Header:
Authorization: Basic YWRtaW46MTIzNDU=
```
