How Neti protects itself
Neti is the only machine that stays exposed, so its own surface must be as small as possible. This page lists what is exposed, how each part is defended and what is left to you. The options named here are explained in the console reference pages.
What is exposed
| Port | What answers | Open to |
|---|---|---|
| 80 and 443 | The published services (web server) | Everyone when there is at least one service with direct visitors; only the addresses of Cloudflare when every service is behind the Cloudflare proxy; closed when there are no services |
| Console port (chosen at random at installation) | The management console | Everyone, behind a secret path, password and code; can be restricted |
| SSH | The SSH server of the machine | Everyone at installation, like a fresh Debian; can be limited to a list of addresses |
| WireGuard (UDP), only once the tunnel hub is set up | The tunnel hub | Only peers with a valid key get an answer |
Nothing else listens on the public address. The backends are not part of this surface: visitors cannot address them.
The published services
- A connection that names no published service (a scan of the bare IP address, an unknown name) is closed without content, and over HTTPS without showing any certificate: a scanner does not learn which domains live here.
- With the gate on, the backend is contacted only for visitors with a valid session; all the others receive the access page of Neti. The cookies of the gate stay with Neti: the backend never receives them.
- The access page accepts few requests per minute per address; who hammers it gets an error 429, and with the automatic ban of bursts is banned.
- Toward the backend Neti writes by itself the headers with the visitor's data; those sent by the visitor do not reach the backend.
- Filtering can refuse whole countries and limit the requests before they cost any work to the backend.
The console
- Random port and path, different for every installation. A request to the console port with a wrong path gets no answer at all, and two such attempts in ten minutes ban the address for 24 hours.
- Access with password and a code by email; recognized devices skip the code for 90 days. Five failed logins in ten minutes ban the address for one hour.
- Each user has a role and permissions of their own; every action ends in the Activity record.
- Port, path and listening interface can be changed from Settings, with a timed rollback: if the new address is not confirmed within a few minutes, the old one comes back.
- The console runs as an unprivileged user. Operations that need administrator rights pass through the system agent, which accepts only known operations and validates every parameter.
The server
- Firewall: only SSH, the console and, when there are services, ports 80 and 443 are open. If every service is behind the Cloudflare proxy, 80 and 443 are open only to the addresses of Cloudflare (refreshed every week); one service with direct visitors is enough to open them to everyone. Every risky change comes back by itself if it is not confirmed. See Firewall.
- fail2ban on the console: blocks who fails the login repeatedly and who looks for pages or files that do not exist.
- CrowdSec (optional): blocks the addresses reported by its community and those that attack the server.
- Honeypot: who gets too low a risk score at the gate ends in a fake login that never lets anyone in and records every attempt. See Honeypot.
- Automatic ban of bursts (off until you turn it on): an address that fires hundreds of requests in a few seconds is banned instead of being only slowed down. See Security.
- Debian security updates are installed automatically, without reboot. Neti itself is updated from the console. See Updates.
- SSH access to the server can be limited to a list of addresses, permanent or temporary. See Remote access.
The credentials Neti keeps
- The credentials of the DNS providers are created with the only permissions needed, limited to the zone, and are tested before use. Those used for certificates are readable only by the administrator of the machine, in a separate folder for each zone. Removing a zone from Neti deletes its credentials from Neti; to revoke them completely use the provider's panel. See DNS.
- A backup contains the configuration with the secrets: keep the archives in a safe place. See Backup.
What is left to you
- Close the backends. A backend that also answers on its own public address can be reached without passing through Neti. Allow only the address of Neti, or use a private network or a tunnel.
- Use the gate for whatever is not meant for everyone. A service without gate and without filters is simply public.
- Keep the list of trusted networks short: those addresses skip the checks.
- Limit SSH to your addresses once the installation is finished.
- Install the updates of Neti when the console proposes them, and keep a recent backup away from the server.
- Protect the mailbox that receives the access codes: who reads that mail holds half of the login.