Skip to Content

Server Security Hardening

A security review and hardening of your Odoo server: SSH, firewall, HTTPS, Odoo settings and user rights, with a written report.

WHAT IS CHECKED AND FIXED

Six areas, one written report

Most Odoo break-ins do not need clever attacks: an open database manager, a password login on SSH or a forgotten admin account is enough. These are the doors that get closed.

πŸ”‘ Server access

  • SSH with keys only, passwords off
  • No shared or unused accounts
  • An alert for every login

🧱 Network

  • Firewall open only for web and SSH
  • Database and Odoo ports kept private
  • Scanners blocked before reaching Odoo

🟣 Odoo settings

  • Database manager hidden
  • Strong master and admin passwords
  • Proxy mode and database filter set

πŸ”’ HTTPS

  • All traffic redirected to HTTPS
  • Modern TLS settings
  • Certificate renewal tested

πŸ‘₯ Users and rights

  • Admin rights only where needed
  • Old users archived
  • Two-factor login for staff

πŸ—‚οΈ Data and updates

  • Secret files readable by root only
  • Backups kept off the server
  • Security updates applied
HOW THE WORK RUNS

Audit first, change only what you approve

1

Audit

Read-only review of the server and Odoo. Nothing is changed.

2

Report

Each finding with its risk level and the proposed fix, in plain language.

3

Fix

Changes you approve are applied one by one, with a backup first.

4

Re-check

Every fix is tested again and the report is updated.

Nothing that could lock you out is changed without your approval, and a second way in is kept open until the new access is proven.

HOW IT IS IMPLEMENTED

The checks and the fixes

Excerpts from the settings on a hardened production server.

  1. Look before touching anything

    The audit only reads: which ports are open, what the firewall allows, how SSH accepts logins and what Docker publishes.

    Read-only audit commands
    ss -ltnp                                   # everything listening, and which program
    ufw status verbose
    sshd -T | grep -E 'passwordauthentication|permitrootlogin|maxauthtries'
    docker ps --format '{{.Names}}  {{.Ports}}'  # 0.0.0.0 here means public
  2. SSH with keys only

    After your key login is tested, password logins are switched off.

    /etc/ssh/sshd_config.d/01-hardening.conf
    PasswordAuthentication no
    KbdInteractiveAuthentication no
    PermitRootLogin prohibit-password
    PermitEmptyPasswords no
    MaxAuthTries 4
    X11Forwarding no
  3. Close every port except the web

    The firewall allows SSH, HTTP and HTTPS. Because Docker can open ports past the firewall, Odoo and PostgreSQL are bound to the server itself.

    Firewall and Docker ports
    ufw default deny incoming
    ufw allow OpenSSH
    ufw allow 80,443/tcp
    ufw enable
    
    # docker-compose.yml: reachable only through nginx
    ports:
      - "127.0.0.1:8069:8069"
      - "127.0.0.1:8072:8072"
  4. Stop scanners at the door

    Bots probe every server for WordPress, PHP and leaked files. nginx answers them directly, so they never reach Odoo or its logs.

    /etc/nginx/snippets/block-scanners.conf (excerpt)
    location ~* "^/(?:wp-admin|wp-login\\.php|wp-content|xmlrpc\\.php)(?:/|$)" {
        access_log off;
        return 403;
    }
    location ~* "^/\\.(?:env|git|svn|aws|ssh|htaccess|htpasswd)(?:/|$)" {
        access_log off;
        return 403;
    }
  5. Lock down Odoo itself

    The database manager can create, copy and delete databases, so it is hidden and its master password is replaced with a long random one.

    odoo.conf
    proxy_mode = True        ; real visitor addresses behind nginx
    list_db = False          ; database manager hidden
    dbfilter = ^mycompany$   ; only your database is served
    admin_passwd = (long random password, stored in your handover document)

    Inside Odoo, admin rights are reviewed, old users archived and two-factor login is switched on: each user in their profile under Account Security, or for all staff at once with Settings β†’ Enforce two-factor authentication.

  6. Get told when something happens

    Each SSH login and every failed backup sends a Telegram message, so a strange login is noticed within seconds instead of weeks.

WHAT YOU RECEIVE

A report you can read without being technical

An example of the findings table, with illustrative entries:

FindingRiskFixStatus
SSH accepts passwordsHighKeys only, password login offFixed
Database manager is publicHighHidden, new master passwordFixed
PostgreSQL port open to the internetHighBound to the private networkFixed
3 former staff still active in OdooMediumArchived after your confirmationFixed
No two-factor login for adminsMediumEnabled for admin usersPlanned
System updates 2 months behindLowUpdated, automatic security updates onFixed
HOW YOU BENEFIT

Safer without slowing anyone down

πŸ›‘οΈCommon attacks closed

Password guessing, open databases and exposed files stop working.

πŸ“„Proof for customers

A written report helps when customers or auditors ask how your data is protected.

πŸ‘€You see what happens

Login alerts show who enters your server and from where.

QUESTIONS

Common questions

Will my team notice any change?

Only two-factor login, if you choose it. Everything else happens on the server.

Can this be done on Odoo.sh or shared hosting?

The Odoo part (users, rights, two-factor login) can. The server part needs your own server.

Is this a penetration test?

No. It is a configuration review and hardening of your own server, which closes the problems most often used in real attacks.