Keep the data that add-ins store, such as the syslog server's collected logs, on a file server instead of the firewall's own disk. The file server can be TrueNAS, Synology, a Windows server, or any Linux or Samba server.
How it works: Korthveil puts one file on the share, korthveil-<volume>.img, at the size you choose. Inside that file is an encrypted file system (LUKS2) that holds the data. Korthveil keeps the key in its own database. The file server, and anyone with access to it, sees only that one encrypted file. Korthveil never stores a database directly on the share, because databases on file shares are not safe.
Korthveil firewall file server
┌───────────────────────────────────┐ NFS 4.2 + TLS ┌────────────────────────────┐
│ add-in data (database) │ or SMB 3, sealed │ share /mnt/tank/korthveil │
│ └ file system (ext4) │ ─────────────────▶ │ korthveil-logs.img │
│ └ LUKS2 (key in Korthveil) │ TCP 2049 / 445 │ korthveil-logs.lock │
└───────────────────────────────────┘ └────────────────────────────┘
You need:
- On the file server: a share for Korthveil, with room for the size you choose (for example 64 GB).
- NFS: NFSv4.1 or 4.2. Allow the firewall's address read and write, with root not squashed for that address. NFSv3 and 4.0 are not supported.
- SMB: SMB 3 (3.0 or newer), and a user that may write to the share. Turn on encryption if the server offers it.
- On Korthveil: an administrator account. The firewall must reach the server on TCP port 2049 (NFS) or 445 (SMB). Korthveil adds the outbound rule for this itself.
1. Add the volume
- Open System › Storage & power › Network storage.
- At the bottom, type a name, such as
logs. Choose NFS share or SMB share, then click Add volume. - Fill in the server:
- NFS:
- Server: the file server's address or host name.
- Export path: for example
/mnt/tank/korthveil. - NFS version: keep 4.2.
- Encryption in transit: turn it on if the server offers NFS over TLS. Enter the server by the host name its certificate shows, and paste the CA certificate if the server's certificate is not from a public CA.
- SMB:
- Server, Share name (just the name, such as
korthveil), User, Password, and Domain or workgroup if the user belongs to one. - SMB version: keep 3.1.1.
- Encryption in transit (seal): keep it on.
- Container file size: how much room the add-ins get, in GB. The file is reserved on the share when you initialize the volume.
- Encryption at rest: keep LUKS2. Optionally, enter a recovery passphrase of 20 characters or more, which opens the data on another system if this firewall's database is ever lost.
- Add-in data stored here: tick the add-ins whose data should move to the share, such as syslog-server.
- Click Save to pending changes, then Commit.
Warnings show what to improve. For example, NFS without TLS, or SMB without seal, sends the data readable on the way. If the server offers neither, set Only through this interface (via) to an IPsec or WireGuard tunnel to the file server.
2. Initialize
After the commit, the volume shows empty: initialize to use, with Share mounted from … and the free space on the share.
- Click Initialize….
- Type the volume name to confirm.
Korthveil creates the container file, encrypts it, and makes a file system in it. Nothing else on the share is touched. Then the volume shows in use, and the chosen add-ins' data moves over. Their pages show "unavailable" for a moment while it moves.
When the file server is down
If the server stops answering, the volume shows server not answering:
- Writes wait until the server is back. Nothing is lost, and nothing is written anywhere else.
- The add-ins' stored data shows "unavailable" meanwhile.
- The firewall itself is not held up: commits, the web UI, and filtering go on as usual.
When the server answers again, the volume is used again by itself.
Removing a volume (from 1.4.2)
Remove volume now says first what happens: the add-ins that keep data on the volume get it back on the firewall after the commit, and the volume stays connected until they have. Nothing on the storage system itself is deleted.
- The data does not fit on the firewall yet: the volume stays connected and Network storage says so (still holds syslog-server (3 GB): it does not fit on the firewall's disk yet). It moves back as soon as it fits, when there is free space or a larger storage limit for the add-in. Before, the volume was disconnected anyway and the data stayed on it, unseen.
- A restart in between: the firewall remembers a removed volume that still holds data, connects it again and finishes. Before, a restart of the firewall's service at that moment left the data behind.
- The storage is gone (the share or disk was deleted first): the volume shows as unreachable with Forget. Forget stops waiting for it. The data, wherever it is, is not touched.
- Cleaned up when the last volume of a kind goes: the iSCSI and TLS helper services stop, the TLS settings for NFS are removed, and an NVMe/TCP volume's TLS key leaves the kernel's key store. Before, they stayed until the firewall restarted.
The keys of removed storage (from 1.4.2). The firewall encrypts what it keeps on a volume or in an object store with keys it keeps in its database. When the storage is removed, its key now stays 30 days, so a mistaken removal can be undone, and is then deleted: data still on that storage can no longer be opened by this firewall. Network storage › Keys of removed storage lists them with the day each goes, has Delete now, and Keep the keys of removed storage to keep them.
Good to know
- One firewall per volume. A lock file next to the container keeps a second system, such as a restored backup on new hardware, from opening the same volume. That system shows "another system has this volume open".
- Changing the size takes effect only when you initialize the volume again, which erases it. Move the add-ins off the volume first.
- FIPS mode: SMB sign-in and NFS over TLS are not available. Use NFS through an IPsec tunnel (via).
- Kerberos (NFS krb5p, SMB with Kerberos) is not available yet. It needs the firewall joined to the domain.