Daryll Gomas
Built · tested end to end

Heimdall

Open source, hardened and locked down.

Remote support for clients' computers. I took RustDesk, a free open-source remote-desktop tool, hardened its server and wrapped it in my own security: approval codes, passkey sign-in, no port forwarding and a log of every connection.

Heimdall consoleExample · invented PC

Front desk PC

Checked in just now · link used once
Waiting
Code from the client's screen

The client reads it to me over the phone. Only their browser ever showed it. Five wrong tries lock the link.

ApproveReject Signed in with a passkey
Example · invented PC and code
0ports opened on any router
~1,500lines of my own code in the server
4rounds of independent security review
3locks: code, passkey, client's OK
188commits in 3 days, 22–24 Oct 2026
01The problem

Remote support usually means trusting someone else's master key.

Small clients need help on their own computers. The usual options are per-device fees for a commercial remote-management tool, or a vendor whose one server can command every PC it manages. If that server is breached, every client is exposed.

The free open-source route has its own catch: a self-hosted RustDesk server normally needs ports forwarded through the router, any computer can register with it, and the one key that guards connections is handed to every client.

Heimdall, the Norse guardian of the rainbow bridge, opens the bridge only for those allowed.

02What I built

A locked-down service around open-source RustDesk.

  • A hardened RustDesk server. I patched the open-source server so devices check in over one encrypted web connection, and only if I approved them.
  • The Heimdall console. My own service for setup links, approvals, removal, session alerts and a 12-month connection log, behind passkey sign-in.
  • Setup with no scripts. The client opens a link, installs the official signed RustDesk app and reads me a code. Nothing to type in a terminal.
  • Its own walled-off server. A small virtual machine on its own network segment, sharing nothing with my own systems.
  • Wired into my invoicing app. A client's card has Add a PC and Connect buttons.

The stock open-source server, and mine

Question
Stock server
Hardened server
Who can sign in?
Stock serverAny device can register an ID. The server key is only checked when someone asks to connect, and every client holds that key.
Hardened serverOnly devices I approved, each pinned to its own machine identity and key.
How does it reach the internet?
Stock serverPorts forwarded through the router.
Hardened serverOne outbound, encrypted tunnel. Nothing listens publicly.
Can devices check in over the web?
Stock serverNo. WebSocket check-in isn't supported in the free server.
Hardened serverYes. That's what lets it run behind a tunnel.
Removing a device
Stock serverNo allowlist to remove it from.
Hardened serverRemove it and its connection closes within seconds.
Strangers who connect
Stock serverBasic timeouts and a registration rate limit.
Hardened serverSeconds to prove themselves, capped per address and in total.
Connection replies
Stock serverNo per-request token.
Hardened serverEach request carries a one-time token. A reply goes only to whoever asked.

Built on the open-source project's newest hardened code, not its older release. The RustDesk app on the client's PC is the official, signed app, unchanged.

03How it works

One door in. Nothing reaches back.

The architecture
How Heimdall works: the client PC runs the official RustDesk app and connects outward only, over an encrypted WebSocket, through one Cloudflare Tunnel, to a walled-off server. There the hardened RustDesk server lets in only approved, pinned PCs, and the Heimdall console handles setup links, approvals and removal. On my side: RustDesk to connect, my invoicing app with Add a PC and Connect, and an alert plus a log entry for every session. 1 · CLIENT PC 2 · ONE DOOR 3 · SERVER 4 · MY SIDE Client PC OFFICIAL RUSTDESK APP Outbound only NO PORTS FORWARDED One tunnel CLOUDFLARE TUNNEL ENCRYPTED WEBSOCKET A SHORT LIST OF PATHS all else: not found Hardened server APPROVED PCS ONLY PINNED IDENTITY + KEY ONE-TIME RELAY TOKENS strangers capped Heimdall console APPROVE · REMOVE Me, connecting RUSTDESK APP Invoicing app ADD A PC · CONNECT Alert + log EVERY SESSION How Heimdall works: the client PC runs the official RustDesk app and connects outward only, over an encrypted WebSocket, through one Cloudflare Tunnel, to a walled-off server. There the hardened RustDesk server lets in only approved, pinned PCs, and the Heimdall console handles setup links, approvals and removal. On my side: RustDesk to connect, my invoicing app with Add a PC and Connect, and an alert plus a log entry for every session. 1 · CLIENT PC 2 · ONE DOOR 3 · SERVER 4 · MY SIDE Client PC OFFICIAL RUSTDESK APP Outbound only NO PORTS FORWARDED One tunnel CLOUDFLARE TUNNEL ENCRYPTED WEBSOCKET A SHORT LIST OF PATHS all else: not found Hardened server APPROVED PCS ONLY PINNED IDENTITY + KEY ONE-TIME RELAY TOKENS strangers capped Heimdall console APPROVE · REMOVE Me, connecting RUSTDESK APP Invoicing app ADD A PC · CONNECT Alert + log EVERY SESSION
Animated diagram. The client's PC only ever connects outward. The server sits on its own network segment.

1 · Client PC

  • Official, signed RustDesk app
  • Connects outward only, over an encrypted WebSocket
  • No port forwarding needed on the client's router

2 · One door

  • A Cloudflare Tunnel, started from inside
  • Exposes a short list of paths; everything else is refused
  • No ports opened on the home router

3 · Server

  • Hardened RustDesk server: allowlist, pinning, limits
  • Heimdall console: invites, approvals, removal
  • Its own firewall blocks everything else, in and out

4 · My side

  • Console behind a passkey
  • Invoicing app: Add a PC, Connect
  • An alert on every session request, and a 12-month connection log

Adding a PC, step by step

Step
The client
Me
01
MeAdd a PCFrom the client's card in my invoicing app. The console opens, waiting for my passkey.
02
MeCreate a setup link LockOne link, one PC. It works once.
03
The clientOpen the link, install LockThe official RustDesk app downloads, tied to this one setup link.
04
The clientThe PC checks inIt's held as waiting. It can't be reached yet.
05
The clientRead me the code LockA 7-digit code that only their browser shows.
MeType it, approve LockFive wrong tries lock the link for good.
06
MeThe PC is pinned LockFrom then on the server accepts only that PC's own key.
07
The clientAccept the sessionEach session needs their click, unless they set up unattended access themselves.
MeConnectOne button on the client's card. An alert fires and the connection is logged.

If anything doesn't match (a second download, a different PC on the same link, too many wrong codes), the link is marked compromised and can only be cancelled.

How access is locked down

Lock 1 · adding a PC

A code only the client sees

No PC joins until the client reads me the 7-digit code from their own screen. A stranger's machine doesn't get that approval.

Lock 2 · the console

A passkey, not a password

Approving and removing PCs sit behind my passkey. The console has no password to phish, guess or reuse.

Lock 3 · every session

The client says yes

Every session needs the client to click Accept on their own screen, unless they chose to set up unattended access with a password. Either way, an alert fires and the connection is logged.

Walls inside walls

  • A short list of paths through the tunnel. Everything else gets a "not found". No port forwarding is needed, on my router or a client's.
  • A segment that can't reach home. My desk can reach the server; the server is blocked from reaching back into my network.
  • Only approved, pinned PCs. The device list is checked before anything else happens, then again inside the sign-in.
  • Every session announced. An alert on every session request, and a connection log kept for 12 months.
04Tools

Open source, then made mine.

RustDeskofficial signed client app, unchanged
Rustmy patch to the open-source server
Gothe Heimdall console and its API
Passkeys (WebAuthn)console sign-in
Cloudflare Tunnelthe one door, outbound only
Ubuntu VM + nftablesdefault-deny firewall, its own segment
UniFithe router wall around the segment
Python + Flaskmy invoicing app: Add a PC, Connect
Automated testsGo, Rust and a real-browser run
Claude Code, CodexAI writes the code; I specify and verify
05Proof

Three days, from the records.

~1,500lines of my own code added to the open-source server
4review rounds on that patch; the last found nothing new
2firewalls around the server: its own and the router's
  1. Rules firstThe security and usability rules, then a standalone server and agent built to them, with two reviews.
  2. Its own walled-off serverA small virtual machine on its own network segment. The containment test passed, then passed again with the router's firewall alone.
  3. The decision to patchThe free server can't take check-ins over a WebSocket, so I added a patch for it. The public address stayed switched off until it passed review.
  4. First real connection across the internetA real RustDesk client reached a test Windows 11 PC through the tunnel and the hardened server. Review round four found no new issues.
  5. Setup with no scriptsSetup link, install, 7-digit code, approve, connect. This flow went through three review rounds of its own.
  6. Full dress rehearsal passedOne continuous run as a brand-new client, starting in my invoicing app, with no lab shortcuts.
  7. Connection logA 12-month log of every connection, and the client's setup page, added and checked.

Dates and results come from the project's status log, its review files and the git history.

06How it's tested and run

Reviewed first, then tested over a real connection.

  1. Rules firstI wrote the security and usability rules before any code: a separate server, database, login and network path from everything else I run.
  2. Four rounds of independent reviewCodex, an AI reviewer, went through the server patch four times, and a second AI model red-teamed the plan. Each finding was fixed or written down as a known trade-off. The last round's one condition, a test with a real client, was then met.
  3. Kept offline until it passedThe public address stayed switched off until the patched server had passed review.
  4. A real connection across the internetA real RustDesk client reached a test Windows 11 PC through the tunnel and the hardened server, from two different public addresses.
  5. The firewalls, tested twiceA containment test checked that the server can't reach my network, first with its own firewall, then with the router's firewall alone. Both had to pass.
  6. A full dress rehearsalOne continuous run as a brand-new client: setup link, install, code, approve, connect, then unattended access.
  7. Automated testsGo and Rust test suites, plus a real-browser test that walks the whole invite, download, code and approve flow.
07What I'd do next Proposed · not built

Stronger keys, more platforms.

  • Hardware security keys for console sign-in.
  • Mac support.
08Skill tags
SecurityNetworking RustDeskRustGoPasskeys Cloudflare TunnelnftablesUniFiNetwork segmentation Threat modelingClaude CodeCodex