This solution provides defense-in-depth for remote access:
- Network Layer: Tailscale mesh VPN with WireGuard encryption
- Host Layer: Windows Firewall restricts VNC to Tailscale subnet
- Application Layer: VNC password authentication
- System Layer: Hardening reduces attack surface
| Threat | Mitigation |
|---|---|
| VNC exposed to internet | Firewall blocks non-Tailscale sources |
| VNC password interception | Traffic encrypted by Tailscale |
| Unauthorized VNC access | VNC password + Tailscale auth required |
| Brute force attacks | Rate limiting by VNC, Tailscale auth |
| Man-in-the-middle | WireGuard encryption end-to-end |
| Unauthorized network access | Tailscale requires authenticated login |
| Threat | Notes |
|---|---|
| Malware on target machine | AV should handle; out of scope |
| Physical access attacks | Physical security is separate |
| Tailscale account compromise | Use strong password + 2FA |
| VNC client vulnerabilities | Keep VNC viewer updated |
| USB-based attacks during deployment | Verify USB contents |
What it does:
- Creates encrypted WireGuard tunnels between devices
- Authenticates devices via Tailscale account
- Assigns private IPs (100.64.0.0/10 CGNAT range)
Why it's secure:
- WireGuard uses modern cryptography (ChaCha20, Curve25519)
- No exposed ports on public internet
- NAT traversal without port forwarding
- Device authorization via admin console
Rules created:
ALLOW: TCP 5900 from 100.64.0.0/10 (Tailscale subnet)
BLOCK: TCP 5900 from all other sources
Why it works:
- Only Tailscale-connected devices get 100.x.x.x IPs
- Even if attacker knows VNC port, connection blocked at firewall
- Firewall logging enabled for audit trail
Configuration:
- 16-character randomly generated password
- Mix of letters, numbers, special characters
- Stored in
output/credentials.txt
Recommendations:
- Delete credentials file after noting password
- Store password in secure password manager
- Do not reuse password
Changes applied:
| Setting | Value | Rationale |
|---|---|---|
| Remote Assistance | Disabled | Reduces attack surface |
| RemoteRegistry service | Disabled | Prevents remote registry access |
| Telemetry | Reduced | Privacy, less network exposure |
| Autoplay | Disabled | Prevents USB-based attacks |
Automatic restart on failure:
- Ensures service availability
- 60-second delay prevents rapid restart loops
- Three restart attempts before giving up
Storage:
- Plain text in
output/credentials.txt - One-time use case (USB deployment)
Best Practices:
- Copy password to secure password manager
- Delete
credentials.txtafter use - Shred or overwrite if on USB drive
Types:
- Reusable: Can be used on multiple devices
- Single-use: One device only
- Pre-authorized: No admin approval needed
Recommendations:
- Use single-use, pre-authorized keys
- Set expiration (24 hours recommended)
- Don't embed in scripts long-term
- Rotate keys regularly
100.64.0.0/10 = 100.64.0.0 - 100.127.255.255
This is the CGNAT range allocated to Tailscale. Only devices on your Tailscale network will have IPs in this range.
VNC Viewer ──► Tailscale (encryption) ──► Windows Firewall ──► VNC Server
│ │
└──────────── Must be 100.x.x.x ────────────┘
Location: logs/setup_YYYYMMDD_HHMM.log
Contains:
- All installation steps
- Configuration changes
- Error messages
- Verification results
Location: %SystemRoot%\System32\LogFiles\Firewall\pfirewall.log
Contains:
- Blocked connection attempts
- Useful for detecting attacks
Location: HKLM\SOFTWARE\RemoteAccessSetup
Tracks:
- Installation timestamps
- Component states
- Tailscale IP assigned
- Verify USB contents - Ensure no tampering
- Review scripts - Understand what will be installed
- Test with --dry-run - Preview changes
- Prepare auth key - Short expiration, single-use
- Delete credentials file - Don't leave password on disk
- Verify firewall rules - Run
90-verify-setup.bat - Test connection - Ensure VNC works over Tailscale
- Check Tailscale admin - Verify device appears correctly
- Keep systems updated - Windows Update, Tailscale, TightVNC
- Monitor Tailscale admin - Review connected devices
- Rotate VNC password - If compromise suspected
- Review firewall logs - Check for attack attempts
When running 99-rollback.bat:
- Credentials file is overwritten before deletion
- Registry markers are removed
- Firewall rules are deleted
- Services are uninstalled
Note: Log files are preserved for troubleshooting. Manually delete if needed.
| Approach | VNC over Tailscale | VNC with Port Forward | TeamViewer/AnyDesk |
|---|---|---|---|
| Exposure | Tailscale network only | Public internet | Cloud service |
| Encryption | WireGuard | None/TLS | Proprietary |
| Authentication | Tailscale + VNC | VNC only | Account + device |
| Self-hosted | Yes | Yes | No |
| Firewall bypass | No | Yes (opens port) | Uses relay |