> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/lan-turtle-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/lan-turtle-hub/payload-development/duckyscript-for-lan-turtle/mgmt_firewall.md).

# MGMT\_FIREWALL

## MGMT\_FIREWALL

The `MGMT_FIREWALL` command manipulates access to the LAN Turtle Hub management web UI.

By default, access is allowed on all interfaces.  Access can be restricted to the USB, RJ45 Ethernet or WiFi client connection.

Access is always available from the WiFi Management AP (if one is configured).

### Options

The `MGMT_FIREWALL` command expects the firewall mode:

```
MGMT_FIREWALL ALL | ETHERNET | USB | WIFI
```

#### ALL

Allow access to the management UI from all interfaces.

#### ETHERNET

Allow access to the management UI only from the RJ45 Ethernet interface.

#### USB

Allow access to the management UI only from the USB-C connection.

#### WIFI

Allow access only from the WiFi client connection (if one exists).

### Example

`MGMT_FIREWALL ETHERNET`

{% hint style="warning" %}
WiFi access

Remember - if you remove access from non-WiFi interfaces, you will *only* be able to configure the LAN Turtle Hub when the WiFi is active!
{% endhint %}

{% hint style="danger" %}
Locked out?

Accidentally locked out of the management interface?  See the [Failsafe and Recovery](https://documentation.hak5.org/lan-turtle-hub/upgrading-and-recovery/failsafe-and-recovery.md) guide for more information to get back into your device!
{% endhint %}
