# Firewall Setup & Rules

### 1. Update sources and install

Update your system and install the package and dependencies using these commands

{% tabs %}
{% tab title="Debian / Ubuntu" %}

```bash
sudo apt-get update -y
sudo apt-get install ufw -y
```

{% endtab %}
{% endtabs %}

### 2. Enable firewall and add allow rules for SSH and ORport

{% tabs %}
{% tab title="Debian / Ubuntu" %}

```bash
sudo ufw allow 22
sudo ufw allow 9001
sudo ufw enable
```

When prompted with the message '`Command may disrupt existing ssh connections'`, type '**y**' and hit **ENTER**.
{% endtab %}
{% endtabs %}
