---
title: Enable Ubuntu firewall
slug: how-tos/oOLM-enable-ubuntu-firewall
createdAt: 2025-09-22T14:17:38.138Z
---

The `ufw allow` lines open the required ports:

- SSH server: `22`
- Factry Historian HTTP server: `8000`
- Factry Historian gRPC server: `8001`
- Grafana over the reverse proxy: `443`
- Grafana HTTP server: `3000`

```bash
sudo ufw allow 22
sudo ufw allow 8000
sudo ufw allow 8001
sudo ufw allow 443
sudo ufw allow 3000
sudo ufw enable
```

The final `ufw enable` line enables the Ubuntu firewall.

:::hint{type="info"}
Ports `3000` and `8000` serve plaintext HTTP. Once you serve Grafana and Factry Historian over HTTPS following [Installing a TLS certificate](docId\:r42agmz027IB-yUBHi4AG), that guide blocks these two ports.
:::
