KORTHVEILSecurity firewall
Guides

The Korthveil phone app: pair a phone with your firewall

Download as PDF All guides

The Korthveil app for iPhone and Android shows your firewalls on your phone: whether each one is healthy, its internet lines, attacks happening now, its alerts and its Wi-Fi. You can act on an alert from the phone (block the attacker until a time you choose, isolate a device, allow, mark it as normal, or acknowledge it) and get notifications.

There is no Korthveil account and no cloud service in between: the phone talks only to your own firewall. No password is stored on the phone. When you pair it, the phone makes its own key inside its secure hardware (the Secure Enclave on iPhone, the Keystore on Android); the key never leaves the phone. The firewall gives that key a certificate with the role you choose. Face ID, a fingerprint or the phone's passcode opens the app.

The app is being built (step 1 of adr/0351). It is not in the App Store or Google Play yet; this guide describes how pairing works on the firewall today.

At a glance:

What Where
Pair a phone (QR code) System › Wizards › Pair a phone, or System › Administration › Phone app › Pair a phone
See paired phones, remove a lost one System › Administration › Phone app
Mark an alert as normal (also from the phone) Monitoring › Alerts › This is normal
Notifications on the phone Monitoring › Alerts › Push to phones (ntfy)
Who did what from a phone Monitoring › Logs & audit › Audit log: actor phone:<name>

Only superusers and administrators pair and remove phones, and only from the console.

Step 1: Choose what the phone may do

Open System › Wizards and press Pair a phone (or System › Administration › Phone app › Pair a phone). Choose the phone's role:

  • Read-only (the safest): sees health, internet lines, attacks, alerts and Wi-Fi, and gets notifications. Changes nothing.
  • Operator: also acknowledges alerts, marks them as normal and isolates devices. No blocking and no settings.
  • Administrator: everything an administrator can do in the console, including blocking and allowing addresses. A phone is never a superuser.

Type a name for the phone if you like (for example "Kim's iPhone"); otherwise the phone's own name is used. Press Next.

Step 2: Choose how the phone reaches the firewall

The wizard lists the console addresses the phone can try, in order: the address you are using now first, then the firewall's own addresses on your internal networks, IPv4 and IPv6 alike. Tick the ones the phone can reach (at most four) and press Show the QR code.

Tick at least one IP address (or a .local name): the phone tries those first. An iPhone accepts a firewall reached by a DNS name (for example fw.example.com) only when the console has a publicly trusted certificate, because iOS checks the certificate before the app can check the fingerprint. If only a name is ticked and iOS refuses it, the app says so: make a new code with the firewall's IP address, or give the console a publicly trusted certificate (System › Certificates & encryption › Certificates).

Away from home, the phone reaches the firewall through your VPN (see the Remote-access VPN wizard). The QR code also carries the fingerprint of the console's certificate, so the phone talks to this firewall only, and to nothing that pretends to be it.

Step 3: Scan the QR code

  1. Open the Korthveil app on the phone and tap Add a firewall.
  2. Tap Scan the QR code and point the camera at the code in the console.
  3. Confirm with Face ID, your fingerprint or the passcode.

The code works once, for 10 minutes; the wizard shows the time left. When the phone has paired, the wizard shows it by itself. If the code expires, press Make a new code; Cancel makes a waiting code unusable at once.

Can't scan? Open Can't scan? Copy the pairing link, copy it, and in the app tap Paste a pairing link. Treat the link like a password: whoever has it within the 10 minutes can pair a phone with the role you chose.

Wrong codes count like failed sign-ins: after several, the address they come from is locked out for a while.

Step 4: Use the app

Before the first firewall is paired, the app opens on its welcome screen without asking for anything. Once a firewall is paired, the app opens locked; Face ID, a fingerprint or the passcode opens it, and it locks again after a minute in the background. It lists your firewalls; tap one for its home screen:

  • Health: the version and how long it has run, whether it is the active firewall of a pair, the licence, and whether an update is available.
  • Internet lines: each internet port, up or down, its addresses (IPv4 and IPv6) and its ping time.
  • Attacks now: how many attackers in the last minutes, and the busiest.
  • Alerts: what is wrong now, most serious first, in colour with a word (Critical, Medium) so colour is never the only sign.
  • Wi-Fi: networks on, devices connected, problems.

Open alerts shows each alert with its options. Options your role may not use are shown greyed with the reason. Every option is the same action as in the console, checked again by the firewall, and written to the audit log with the phone as the actor:

Option What it does Role
Block Blocks the alert's internet address (IPv4 or IPv6) for 1 hour, 1 day, 1 week, 30 days, or until you lift it Administrator
Isolate Takes the alert's device off the internet for 10, 60 or 240 minutes Operator
Allow Lifts the block on the alert's address Administrator
This is normal Acknowledges the alert; the same alert is still listed but not sent again for 30 days Operator
Acknowledge Stops the alert's repeats Every role

This is normal is also on Monitoring › Alerts in the console, with Undo to send the alert again when it fires.

Notifications

The app shows the notifications of your ntfy topics (Monitoring › Alerts › Push to phones (ntfy)). Without one, add a phone push there first. To get them while the app is closed, press Get them when the app is closed in the app: it opens the free ntfy app with your topic. A topic that needs an access token stays with the ntfy app, because the Korthveil app keeps no passwords.

A Korthveil push service that only says "you have an alert" (with no content) is planned; the phone will then read the alert from your firewall itself.

Remove a phone

Lost a phone, or someone leaves? Open System › Administration › Phone app and press the bin icon on the phone's row, then confirm. The phone stops working with this firewall at once; the removal is in the audit log. Removed phones stay listed for 90 days.

On the phone, Remove from this phone forgets a firewall and deletes the phone's key for it. That doesn't remove the phone on the firewall: do that in the console.

What exactly happens

  • The phone's key is an elliptic-curve P-256 key made in the Secure Enclave or the Android Keystore; it cannot be copied off the phone. A device without that hardware cannot pair: the app says so instead of keeping a weaker key. The phone sends a certificate request with the single-use code; the firewall checks the request's signature and issues a client certificate for 397 days from its own phones' certificate authority. The app renews it 60 days before the end.
  • After pairing, the phone signs in with that certificate (mutual TLS) on the console's usual address and port. Browsers are never asked for it: the console only asks for certificates issued by the phones' authority.
  • Every request from a phone is checked with the firewall's list of phones, so a removed phone is refused on its very next request.
  • The pairing code itself is never stored (only a fingerprint of it) and never written to a log.
  • Nothing of the app is backed up to iCloud or Google, and the app holds no analytics or tracking code.

Download as PDF All guides