| type | how-to | |||
|---|---|---|---|---|
| title | Firewall (UFW) | |||
| description | Install and manage a UFW firewall baseline for an Odoo server. | |||
| tags |
|
|||
| audience |
|
|||
| updated | 2026-10-08 |
From the main menu Firewall (UFW), the tool installs and manages a UFW firewall for the server. It shows
ufw status verbose each time you enter.
Applies a secure baseline:
- Installs UFW if missing.
default deny incoming,default allow outgoing.- Allows the SSH port — before enabling UFW, so you are not locked out. The tool proposes the port SSH
listens on (
sshd -T, andssh.socketon Ubuntu 24.04), and asks for confirmation if you choose another. - Allows HTTP (80) and HTTPS (443) if chosen.
- Optionally allows PostgreSQL (5432) from a single app-server IP.
- Enables UFW (last step).
Warning: double-check the SSH port before applying — a wrong SSH rule with
deny incomingcan lock you out of the server. The plan is previewed before anything runs.
- Allow a port —
ufw allow <port>/<tcp|udp>. - Delete a rule (by number) — lists the numbered rules and deletes one only if that number still shows the
same rule when the plan runs: fail2ban adds its bans at the top of the list, which shifts the numbers. A rule
that lets SSH in (its port, or the
OpenSSHprofile) is deleted only after you confirm the risk. - Enable / Disable UFW — enabling allows the ports SSH listens on first; when none is detected, you confirm before it goes up.
The PostgreSQL rule takes one address (the app server's), never a network or any.
Fail2ban bans through UFW (ufw for SSH and recidive, the tool's ufw-odoo-web for
the web ports), so its bans only take effect when UFW is installed and active — this menu is how you make that
true.