TCP · Port 5900IANA Registered

Port 5900 — VNC (Virtual Network Computing)

Cross-platform remote graphical desktop sharing system using the RFB (Remote Framebuffer) protocol.

⚡ Primary Use Cases & Environments

  • ✓Remote desktop support for macOS and Linux workstations

🛡️ Security & Vulnerability Analysis

Standard VNC encrypts neither authentication passwords beyond a weak 8-character DES hash nor the session display stream. Always tunnel VNC through an SSH connection (port 22) or WireGuard VPN.

🔧 Network Diagnostics & Inspection

1. Check Active Listening Sockets (Local Host)
Terminal Command
$ sudo ss -tuln | grep :5900
Inspects whether any local process daemon is bound to port 5900.
2. Remote Port & Service Scan (Nmap)
Terminal Command
$ nmap -p 5900 -sV --script vnc-info <target-ip>
Probes target IP to determine whether port 5900 is open, closed, or filtered.
3. Wireshark Capture / Display Filter
vnc or tcp.port == 5900Wireshark Filter

🔥 Firewall Configuration Rules (UFW & iptables)

UFW (Uncomplicated Firewall)
Terminal Command
$ sudo ufw allow from 127.0.0.1 to any port 5900 proto tcp
Applies a persistent Linux UFW firewall rule for port 5900.
iptables Command
Terminal Command
$ sudo iptables -A INPUT -p tcp -s 127.0.0.1 --dport 5900 -j ACCEPT
Appends a direct netfilter kernel rule to the INPUT chain for port 5900.

❓ Frequently Asked Questions (FAQ)

How do I securely access VNC over an SSH tunnel?

Run "ssh -L 5901:127.0.0.1:5900 user@remote-host". Then open your VNC client and connect to "127.0.0.1:5901".

Related Networking Tools & Guides