> 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/upgrading-and-recovery/failsafe-and-recovery.md).

# Failsafe and Recovery

Your LAN Turtle Hub includes three methods to recover the device if you find yourself locked out.

## Failsafe Mode

The LAN Turtle Hub Failsafe Mode attempts to reset the configuration to an accessible state, if a network change, boot payload, or other change is preventing access to the device.

When triggered, Failsafe mode will:

* Disable the boot payload
* Set the RJ45 Ethernet to DHCP
* Disable the Wireguard VPN (if any)
* Disable the OpenVPN VPN (if any)
* Disable the administrative firewall, allowing SSH and the management UI on all interfaces

### Entering Failsafe Mode

To enter Failsafe Mode, we will use the hidden button on the back of the LAN Turtle Hub (the opposite side of the device from the status LED).  The button is located behind a small pinhole in the back of the LAN Turtle Hub.

To press this button, use a blunt metal object such as a paperclip, earring stud, or SIM card tool.

1. Plug the LAN Turtle Hub into a power source
2. Wait for the LAN Turtle Hub to complete booting.  When the status LED stops flashing green, booting is complete.
3. **Press and hold** the button using your metal tool.
4. Continue to **press and hold the button** .  The status LED will blink blue for 5 seconds. &#x20;
5. **When the status LED is solid blue** release the button.  This will activate Failsafe Mode.  The LED will blink blue rapidly, and the LAN Turtle Hub will reboot.

{% hint style="warning" %}
**Don't panic!**

If you hold the button down for too long, the LAN Turtle Hub will progress to Factory Reset Mode and the LED will begin blinking red.

Don't panic!

Don't let go of the button!  Keep holding it down for 20 seconds or more, **until the status LED turns solid green**.  Once the LED is green, you can release the button and try again!
{% endhint %}

Once the LAN Turtle Hub has rebooted, you can log in via USB-C, even if a previous network configuration or firewall configuration had blocked access.

Remember to re-enable any features and firewall options you want, after you've fixed your configuration!

## Factory Reset

If the management UI is not available, a factory reset can be performed using the hidden button on the LAN Turtle Hub.

A factory reset will erase all data and changes to the device, including but not limited to:

* Login password
* Network configuration
* WiFi configuration
* SSH servers
* VPN configuration and credentials
* Payloads
* Stored data
* Modifications to files elsewhere on the firmware

{% hint style="danger" %}
A factory reset can not be undone!&#x20;
{% endhint %}

### Performing a Factory Reset

To perform a factory reset when the management UI is not available, we will use the hidden button on the back of the LAN Turtle Hub (the opposite side of the device from the status LED).  The button is located behind a small pinhole in the back of the LAN Turtle Hub.

To press this button, use a blunt metal object such as a paperclip, earring stud, or SIM card tool.

1. Plug the LAN Turtle Hub into a power source
2. Wait for the LAN Turtle Hub to complete booting.  When the status LED stops flashing green, booting is complete.
3. **Press and hold** the button using your metal tool.
4. **Continue to press and hold the button**.  The status LED will blink blue.
5. **Continue to press and hold the button**.  After 5 seconds, the status LED will turn solid blue.
6. **Continue to press and hold the button**.  After 10 seconds, the status LED will begin to blink red.
7. **Continue to press and hold the button.**  After 15 seconds, the status LED will turn solid red.
8. **Release the button** while the status LED is **solid red** to perform a factory reset.

{% hint style="warning" %}
**Don't panic!**

If you decide you don't wish to perform a factory reset yet, don't panic!

Don't let go of the button!  Keep holding it down for 20 seconds or more, **until the status LED turns solid green**.  Once the LED is green, you can release the button and try again!
{% endhint %}

## Factory Recovery Mode

The LAN Turtle Hub Factory Recovery Mode is a mechanism for flashing the stock firmware even if the LAN Turtle Hub can no longer properly boot.

Factory Recovery Mode is typically only needed in extreme situations, where modifications to the LAN Turtle Hub made outside the management UI prevent it from properly booting sufficiently to run the failsafe or factory reset methods.

Performing a factory recovery flash **will also perform a factory reset** and all data and configurations on the LAN Turtle Hub will be lost.  This can not be undone.

### Preparing for Factory Recovery Mode

Before entering Factory Recovery Mode, you must download the LAN Turtle Hub firmware from the [Hak5 Download Portal](https://downloads.hak5.org/turtle).  Typically you will choose the latest release.

{% hint style="danger" %}
Be sure to download the proper firmware, for ***the LAN Turtle Hub only**.* Firmware for other products or variants **will not function and will not boot properly.**
{% endhint %}

### Entering Factory Recovery Mode

To enter Factory Recovery Mode, we will use the hidden button on the back of the LAN Turtle Hub (the opposite side of the device from the status LED).  The button is located behind a small pinhole in the back of the LAN Turtle Hub.

To press this button, use a blunt metal object such as a paperclip, earring stud, or SIM card tool.

1. **Unplug the LAN Turtle Hub** from any computer or power source.  We must start this process with the LAN Turtle Hub powered off.
2. **Press and hold the button** using the metal tool.
3. **With the button held down** plug the LAN Turtle Hub into a computer or laptop.
4. **Continue to press and hold the button**.  The status LED will blink green once per second.
5. **Continue to press and hold the button**.  After 5 slow blinks, the status LED will blink green rapidly.
6. **Continue to press and hold the button**.  The status LED will go solid red.
7. **Release the button**.  The status LED will remain solid red.  If the status LED is **not** solid red, **unplug** the LAN Turtle Hub and begin the process again.

Now that the LAN Turtle Hub LED is solid red, you are in a special low-level failsafe recovery mode.

The LAN Turtle Hub will assign your computer an IP address of `172.16.84.84` via DHCP.  If this does not occur, you may need to refresh your interface DHCP via the network management window of your operating system.

Using a browser, navigate to <http://172.16.84.1> . &#x20;

{% hint style="warning" %}
Please note the address!

The correct address for failsafe recovery mode is [http://172.16.84.1 ](http://172.16.84.1)

It **must** be **http** (**not** https), and it does **not** include the management UI port! &#x20;

Using https or port 1471 will **not** work for Factory Recovery Mode.
{% endhint %}

<figure><img src="https://1990822252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F378Pamwi1kPq8YWam8pQ%2Fuploads%2FYxHnFLW4kzfu47Dmxuqr%2Fimage.png?alt=media&amp;token=18e1d4f5-0d2a-4698-9b01-c9b8c1006a50" alt=""><figcaption><p>The LAN Turtle Hub recovery system</p></figcaption></figure>

At the LAN Turtle Failsafe Recovery page, select the firmware file you downloaded previously.

{% hint style="danger" %}
This firmware file **MUST BE** for the LAN Turtle Hub!  Flashing firmware for other devices (or other LAN Turtle variants) ***will not function properly and may not boot at all**.*
{% endhint %}

Click the `Upload and Flash` button **once**.  Uploading the firmware and initiating the recovery flash may take a few seconds.

Your LAN Turtle Hub will now erase the internal storage and flash the factory firmware image.

**This process may take up to 10 minutes or longer**.

During the flashing process, the status LED will flash alternating red and blue, and may flash solid red or blue.

**You must not unplug the LAN Turtle Hub, the device it is plugged in to, or put the device it is plugged in to in sleep or suspend mode during the flashing.**

Once the LAN Turtle Hub has finished flashing, it will automatically reboot.  The status LED will blink green as the device performs first-time boot tasks such as allocating writeable flash and creating SSH identity files.  The boot process may take **5 minutes or more** once flashing has completed.

At the end of the boot process, the status LED will blink magenta (or pink), and the LAN Turtle Hub is ready to be configured as if it were a new freshly unboxed device.

Once the status LED is blinking magenta, you may close the browser tab used for recovery, and navigate to <http://172.16.84.1:1471> to begin the setup process!

{% hint style="danger" %}
While performing a factory recovery flash, you MUST NOT:

* Unplug the LAN Turtle Hub
* Plug USB devices into the LAN Turtle Hub
* Unplug the computer or laptop the LAN Turtle Hub is connected to
* Put the computer or laptop the LAN Turtle Hub is connected to into sleep or suspend mode

A factory recovery flash will take up to 10-15 minutes to complete and must not be interrupted!
{% endhint %}
