Skip to content

Instantly share code, notes, and snippets.

@coltenkrauter
Created November 4, 2024 15:37
Show Gist options
  • Save coltenkrauter/976bef06dc69aa4ae101fbc26db98c7b to your computer and use it in GitHub Desktop.
Save coltenkrauter/976bef06dc69aa4ae101fbc26db98c7b to your computer and use it in GitHub Desktop.
Instructions to remove `ip_bans.yaml` in Home Assistant OS on TrueNAS Scale VM.

Remove IP Ban in Home Assistant OS on TrueNAS Scale VM

This guide explains how to access the TrueNAS Scale VM's serial shell, delete the ip_bans.yaml file in Home Assistant OS, and optionally edit configuration.yaml.

Accessing the Serial Shell in TrueNAS Scale VM

  1. Open TrueNAS Scale UI:

    • Log into your TrueNAS Scale dashboard.
  2. Navigate to Virtual Machines:

    • Go to Virtual Machines in the side menu.
  3. Access the Home Assistant VM:

    • Locate your Home Assistant VM in the list and click on it.
  4. Launch Serial Shell:

    • Select Shell (or Serial Console depending on your TrueNAS version) to access the command line for your Home Assistant OS.

Commands to Remove IP Ban File

Once in the shell, run the following commands:

# Navigate to the Home Assistant config directory in the TrueNAS Scale VM environment
cd /mnt/data/supervisor/homeassistant

# Delete the IP ban file to clear all blocked IPs
rm ip_bans.yaml

# (Optional) Edit configuration.yaml with vi for adjustments
vi configuration.yaml

# Restart Home Assistant to apply changes
ha core restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment