This guide explains what each security option does, what it protects against, what it does not protect against, and the recommended configurations. Read §1 before exposing JVNC to the internet.
Everything you've read about VNC being unsafe is about stock VNC. Here is each classic warning and what JVNC does about it:
| The classic danger | How JVNC answers it |
|---|---|
| Bots scan port 5900 and brute-force the password. | Per-address lockout (5 failed handshakes → 15-minute ban, plus a 1-second delay on every try), so brute force dies. And the public-address rule (default on) refuses any internet-address connection unless it presents an approved client certificate — a random bot is dropped before it can try a single password. |
| The password can be captured in transit. | The password never crosses the wire: JVNC uses a PBKDF2 challenge/response, so there is nothing to sniff or replay. |
| VNC is unencrypted — coffee-shop Wi-Fi can read your screen and keystrokes. | Built-in TLS 1.2/1.3 encrypts everything (screen, keystrokes, files, codes), and the client pins the server certificate so nobody can sit in the middle. |
| An exposed port is inherently unsafe. | Approved client certificates (mutual TLS): without the private key from one of your enrolled devices, the handshake cannot complete at all — so even an open port only answers your own machines. Add TOTP for a second factor. |
| You must open port 5900 and juggle modem + router + firewall rules + a changing home IP. | You don't have to open anything. Reverse connection has the PC dial out to your waiting viewer (routers allow outbound by default — zero inbound rules), and a VPN (Tailscale/WireGuard) puts both machines on a private network so nothing faces the internet. Either way there is no port to forward and no dynamic-IP allow-list to maintain. |
Bottom line: the scary articles describe the old way. Put the server behind a VPN (or use reverse connection), turn on password + TLS + client certificate, and you have none of those exposures.
All layers are independent and can be combined. With every layer off, the server speaks plain, unencrypted VNC and any VNC viewer can connect (suitable only on a trusted LAN/VPN). With any layer on, only the JVNC Client can connect.
%APPDATA%\JVNC\server.pfx, RSA-2048,
10 years). TLS 1.2/1.3 encrypts everything: screen, keystrokes, files, codes.client.pfx). The server accepts only
fingerprints in its Approved client fingerprints list.otpauth:// URI into any QR-code generator and scan it.HMAC-SHA256(code, server nonce), so a captured
exchange cannot be replayed. The server accepts the current window ±1 (clock drift up to 30 s).192.168.0.0/24, 100.64.0.0/10. Empty means anyone.100.64.0.0/10 covers all Tailscale devices.%APPDATA%\JVNC as sensitive.| Layer | Mechanism |
|---|---|
| Password at rest | PBKDF2-HMAC-SHA256, 100 000 iterations, 16-byte random salt, 32-byte verifier. Only the verifier is stored; the password is not recoverable from it. |
| Password on the wire | Server → 16-byte salt + 16-byte random nonce. Client → HMAC-SHA256(key = PBKDF2(password, salt), msg = nonce) (32 bytes). Constant-time comparison. The password never leaves the client; a captured proof is useless for any other connection. |
| Encryption | TLS 1.2 / 1.3 via Windows SChannel (SslStream); RSA-2048 self-signed X.509 certificate, SHA-256, 10-year validity, created on first use and kept in %APPDATA%\JVNC\server.pfx. |
| Server identity | Trust-on-first-use pinning of the SHA-1 certificate thumbprint per host on the client; any change requires explicit re-acceptance after a warning. |
| Client identity | Mutual TLS: the client presents its own RSA-2048 certificate; the server accepts only thumbprints in its approved list (checked in the TLS validation callback, so unapproved clients never reach the protocol). |
| One-time code | RFC 6238 TOTP (HMAC-SHA1, 6 digits, 30-second step, 160-bit base32 secret), accepted for the current step ±1. Sent as HMAC-SHA256(key = code, msg = 16-byte server nonce), never as the bare code. |
| Secrets at rest | Windows DPAPI (CryptProtectData, current-user scope, application entropy) for the TOTP secret and any remembered client passwords. |
| Network filtering | IP/CIDR allow list evaluated before any bytes are exchanged; optional bind to a single interface; non-private source addresses (anything outside RFC 1918, 100.64/10, link-local, loopback, IPv6 ULA) refused unless mutual TLS is on. |
| Brute-force control | Per-address counter: 5 failed handshakes → 15-minute ban; 1-second delay on every failure; success resets the counter. |
| Protocol | When any layer is on, the server greets with JVNC-000.01 + a flags byte instead of the RFB version, performs the layers in order (TLS → password → TOTP), then runs standard RFB 3.8 inside the encrypted stream. With every layer off it is byte-for-byte standard RFB. |
| Failure hygiene | Any handshake failure closes the socket, counts toward lockout and is logged with the reason; all held keys and mouse buttons are released when a client disconnects. |
| Scenario | Settings |
|---|---|
| Same LAN, trusted household/office | Password (default) is enough; TLS recommended. |
| Over a VPN (Tailscale/WireGuard) | Password + TLS (+ TOTP); allow list 100.64.0.0/10 (Tailscale) or your VPN subnet; bind to the VPN address. |
| Router port forward (internet) | Password + TLS + client certificate + TOTP; public-address rule on; allow list if your remote locations have fixed addresses; non-default port. |
| Public exposure without a client certificate | Not recommended. If unavoidable: TLS + TOTP + allow list + non-default port, and understand the residual risk (6-digit code + rate limit). |
%APPDATA%\JVNC\server.log periodically: rejected addresses, bans, unapproved certificate
attempts and successful handshakes are all recorded with timestamps.%APPDATA%\JVNC\server.pfx if you want clients' pins to survive a reinstall; otherwise
clients will see a "certificate changed" warning once and can accept the new one.| Threat | Mitigation |
|---|---|
| Internet scanning / opportunistic login attempts | Client certificate; public-address rule; lockout; non-default port; or no open port (VPN). |
| Password/code guessing | PBKDF2 password + TOTP + lockout (5 tries / 15 min per address). |
| Eavesdropping on the network | TLS. |
| Man-in-the-middle | Certificate pinning (compare fingerprint on first connect). |
| Replay of a captured login | Nonce-bound TOTP proof; TLS. |
| Stolen settings file | DPAPI-protected secret; certificate requires the profile's private key. |
| Stolen device | Remove its fingerprint; rotate the TOTP secret. |
| Compromised PC/laptop OS | Out of scope — no remote-access tool can protect against this. |